====== Profiling your Java applications with [[http://www.ej-technologies.com/download/jprofiler/|JProfiler]] ====== * Download JProfiler v5.2.1 from [[torrents>1470951|here]]. * Read build-in help ''Reference -> Managing Sessions -> Remote Session Invocation Table''. System should be able to find ''jprofilerti.dll'' in system path. In my case run sequence is the following: set PATH=%PATH%;%Applications%\JProfiler\bin\windows set VM_OPT=-Xmx1200m -Xbootclasspath/a:%Applications%\JProfiler\bin\agent.jar -agentlib:jprofilerti call java %VM_OPT% -jar lib/root.jar or for Linux: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/jprofiler/linux-x86 VM_OPT="-Xmx1200m -Xbootclasspath/a:$HOME/jprofiler/agent.jar -agentlib:jprofilerti" java $VM_OPT -jar lib/root.jar $* * Other options: \\ ''-agentlib:jprofilerti=**port=8849**'' to specify the port \\ ''-agentlib:jprofilerti=**nowait,id=100,config=/work/config.xml**'' to run in //nowait// mode (note: ''config.xml'' should contain the license information) \\ ===== Profiling-related staff ===== * [[habrahabr>136883|Размер Java объектов. Используем полученные знания]] * [[http://www.javaworld.com/javaworld/javaqa/2003-12/02-qa-1226-sizeof.html?page=5|Sizeof for Java: Object sizing revisited]] * [[https://www.ej-technologies.com/resources/jprofiler/help/doc/main/methodCallRecording.html|Method Call Recording: sampling versus instrumentation]]