下载tptp allinon包:tptp.runtime.allInOne.win32.win32.x86-TPTP-4.5.1.zip
偶尝试了一下逐一安装TPTP,结果是失败。
下载agntctrl.win_ia32-TPTP-4.5.1.zip (runtime版本)设置agntctrl
D:eclipse_tptpagntctrl.win_ia32-TPTP-4.5in放到PATH环境变量
然后执行setconfig.bat设置环境变量
启动代理acserver:
D:eclipse_tptpagntctrl.win_ia32-TPTP-4.5.0in>acserver
下载javaprofiler.win_ia32-TPTP-4.5.1.zip (runtime版本)
按照说明设置环境变量:
a) Set TPTP_AC_HOME=<<Agent Controller Home>>
b) Set JAVA_PROFILER_HOME=%TPTP_AC_HOME%pluginsorg.eclipse.tptp.javaprofiler
c) Set PATH=%JAVA_PROFILER_HOME%;%PATH%;%TPTP_AC_HOME%in
d) Set PATH=%PATH%;%JAVA_HOME%in
启动JAVA程序:java -XrunpiAgent:server=enabledCarModel
在eclipse工程可以看到agent
这里不支持probe insertion
远程profile TOMCAT
在catalina.bat java启动参数加入:-XrunpiAgent:server=enabled
如:
rem Execute Java with the applicable properties
if not "%JPDA%" == "" goto doJpda
if not "%SECURITY_POLICY_FILE%" == "" goto doSecurity
echo "run OK"
%_EXECJAVA% %JAVA_OPTS% -XrunpiAgent:server=enabled
然后eclipse ->run->profile configuration->attach to agent
实例:
http://www.eclipse.org/tptp/home/documents/tutorials/profilingtool/profilingexample_32.html