Tuesday, August 21, 2012

JVM Profiler im JDK

Wenn man Programmcode optimieren will, ist es wichtig dass man weiß an welchen Stellen eine Optimierung des Codes wichtig ist. Man muß sozusagen die Hotspots im Code finden an denen die meiste Zeit vertrödelt wird. Dazu verwendet man sogennante Profiler die auf der einen Seite einen genauen Einblick in den Hauptspeicher eines laufenden Javaprogramms als auch eine genaue Analyse der Lauzeit und Häufigkeit der Verwendung von Methoden erlauben.

 Man kann jetzt natürlich einen Profiler aus dem Internet herunterladen, aber zumindest seit Version 1.6 gibt es im JDK auch den sehr guten Java Visual VM im "bin" Verzeichnis. Da dieser auf jedem PC auf dem sich das JDK befindet installiert ist hat man immer schnell einen Profile bei der Hand.


2 comments:

  1. Do you have any idea if this could be used to profile the XPage JVM on the Domino server?

    ReplyDelete
  2. To profile with java visual vm you need to replace the IBM JVM with the Oracle JVM. I do not know if this is possible on the server, but what i often use is to start the notesclient from eclipse as described on http://lekkimworld.com/pages/eclipse35_notes852.html and in Eclipse you can select a oracle JVM instead of the ibm JVM to run notes. When you run your xpage application in the notesclient (xpinc) you should be able to profile your application. Another possible way to profile your xPages Application is to use the IBM JVM profiler. It is a little bit complicated, but i think it should work with the domino server. For further informations about this profiler go to http://www-01.ibm.com/support/docview.wss?uid=swg21413628

    Ralf

    ReplyDelete

ad