I am using the IDE integeration for IDEA 4.5.
When I launch my application using the profile button I get the following messages:
[YourKit Java Profiler 4.5 EAP build 604] Using JVMPI
[YourKit Java Profiler 4.5 EAP build 604] *** HINT ***: we recommend using Java 5.0 and JVMTI when possible!
[YourKit Java Profiler 4.5 EAP build 604] Listening on port 2990...
[YourKit Java Profiler 4.5 EAP build 604] [YourKit Java Profiler 4.5 EAP build 604] Launching profiler UI (D:\java\YourKit Java Profiler 4.5 EAP build 604\bin\yjp.exe)
The UI is indeed launched, but the launching seems to be stuck in a loop since it continues launching new instances of the UI indefinitely. If I let my application run for a couple of seconds I can see about 10-15 instances of javaw.exe in the task manager already
build #604: automatic launching of UI broken
-
- Posts: 21
- Joined: Tue May 17, 2005 1:38 pm
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
-
- Posts: 21
- Joined: Tue May 17, 2005 1:38 pm
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
The problem is with JAVA_TOOL_OPTIONS environment variable, that we were using for automatic choice in runtime of JVMTI (-agentlib specified via JAVA_TOOL_OPTIONS) vs. JVMPI (-Xrun in command line) profiling API, based on actual running JVM.
If this variable is inherited by called Java, it makes it run with profiler. This was the case with the profiler UI, which was itself started with profiler agent, which was instructed to launch yjp.exe etc..
To work this around, yjp.exe clears JAVA_TOOL_OPTIONS environment variable before running "java -jar yjp.jar"
For some reason this approach does not work on Windows NT.
Anyway, the next build 606 will have this area totally reworked. We'll get rid of JAVA_TOOL_OPTIONS usage when profiling from IDE, detecting Java version using IDE's API and explicitly specifing -agentlib or -Xrun in command line of profiled application.
If this variable is inherited by called Java, it makes it run with profiler. This was the case with the profiler UI, which was itself started with profiler agent, which was instructed to launch yjp.exe etc..
To work this around, yjp.exe clears JAVA_TOOL_OPTIONS environment variable before running "java -jar yjp.jar"
For some reason this approach does not work on Windows NT.
Anyway, the next build 606 will have this area totally reworked. We'll get rid of JAVA_TOOL_OPTIONS usage when profiling from IDE, detecting Java version using IDE's API and explicitly specifing -agentlib or -Xrun in command line of profiled application.