How to connect JProfiler to an application running on localhost?

前端 未结 2 691
你的背包
你的背包 2020-12-06 17:56

I have an application running on my localhost and I want to profile the application to see how can I enhance the performance of the application. I am doing the setup steps a

相关标签:
2条回答
  • 2020-12-06 18:25

    Manually adding a VM parameter to a run configuration in eclipse is not recommended for profiling with JProfiler.

    For more on the eclipse IDE integration, see this screen cast and this help page. You can then profile JBoss with an eclipse run configuration without adding any VM parameters.

    There are other ways to profile without manually adding any VM parameters:

    1. The easiest way to get started is to use the "Quick attach" feature in JProfiler. With "Session->Quick Attach" you get a list of running JVMs that you can profile without having to add any JVM parameters.

    2. If you miss source code navigation to eclipse in the above step, the same action is available in eclipse if the JProfiler plugin is installed.

    enter image description here

    1. For standalone configuration, use the integration wizard by invoking "Session->Integration Wizards->New Server Integration" from JProfiler's main menu. The integration wizard will modify the start script, so that you don't have to add any VM parameters.

    For the error message that you got, I suspect that C:\Users\user\.jprofiler6\config.xml does not exist. Reducing the parameter to -agentpath:C:\Users\user~1.DOS\SOFTWA~1\JPROFI~1\bin\WINDOW~1\jprofilerti.dll=port=8849 will work, then the JBoss VM will wait until you connect with a session of type "Attach to JVM (local or remote)" from JProfiler. Anyway, adding VM parameters manually is only necessary in special situations.

    0 讨论(0)
  • 2020-12-06 18:29

    I know that this is an old thread. Also I am not sure wether the problem described here is the same than the one that I mean.

    A colleage of mine had a very similar problem: he could not see any local running JVM using the "Quick Attach" feature on Windows. Trying to add the jvm agent parameter or to reinstall JProfiler also didn't help.

    The solution was to delete a folder called %USERPROFILE%\AppData\Local\Temp\hsperfdata_username after stopping all java processes. Probably something related to the permissions of this folder was messed up.

    0 讨论(0)
提交回复
热议问题