This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Product Version = NetBeans IDE Dev (Build 201504150001) Operating System = Windows 8 version 6.2 running on amd64 Java; VM; Vendor = 1.8.0_45 Runtime = Java HotSpot(TM) 64-Bit Server VM 25.45-b02 When running the profile after attaching to a locally running java task, there is no data being shown in the "Methods" or "Objects" profiles. This makes the profiler useless for looking for memory leaks. The other profiles seem to be working just fine.
Created attachment 153382 [details] IDE log
Can you please provide more info? We would like to see exact steps how to reproduce it. What profiler settings do you use? Thanks.
According to messages.log there are some modules from 201504150001 daily build and some are installed via plugin manager from 20150322 daily build. Please uninstall 'NetBeans Dev 201504150001' and install latest daily build. Thanks.
Just installed DEV 201504270341 - same problem. I did it via "Profile External Process", where I added -agentpath:C:\Users\Lolmewn\AppData\Roaming\NetBeans\dev\lib\deployed\jdk16\windows-amd64\profilerinterface.dll=C:\Users\Lolmewn\AppData\Roaming\NetBeans\dev\lib,5140 to the startup batch script. After this, profiling works for everything except Objects.
I can, however, perform a heap dump and analyse memory consumption there. Live would be so much better though
"After this, profiling works for everything except Objects" - does it mean the Methods profiling started to work for you? We would appreciate if you could describe your steps in more details - are you attaching the profiler to an Already running local Java process or to Manually started local Java process (choices in Attach Settings dialog)? What happens if you click the Attach button? When configuring the profiler, have you selected to profile All classes or Selected classes (and what choices are selected for this mode)?
(In reply to Jiri Sedlacek from comment #6) > "After this, profiling works for everything except Objects" - does it mean > the Methods profiling started to work for you? Correct. Now I'm actually not sure anymore if this worked with the older netbeans version too... but I think it didn't. Regardless, Methods is not useful for me since I want to profile memory allocation (and find leaks). > We would appreciate if you could describe your steps in more details - are > you attaching the profiler to an Already running local Java process or to > Manually started local Java process (choices in Attach Settings dialog)? > What happens if you click the Attach button? I start up the local program via a batch file using the extra arguments provided by Netbeans. The program waits until the profiler attaches - which it does when I press the attach button. The same happens when I attach to the already-running service though, this does not seem to make a difference. > When configuring the profiler, have you selected to profile All classes or > Selected classes (and what choices are selected for this mode)? All classes.
(In reply to Lolmewn from comment #5) > I can, however, perform a heap dump and analyse memory consumption there. > Live would be so much better though This definitely works in general case for a lot of people. There must be something specific in your setup. What JDK is used for profiled application? Are there any exceptions in the stdout/stderr in profiled application? Can you try to profile some other application to see if memory profiling works there or not?
(In reply to Tomas Hurka from comment #8) > (In reply to Lolmewn from comment #5) > > I can, however, perform a heap dump and analyse memory consumption there. > > Live would be so much better though > This definitely works in general case for a lot of people. There must be > something specific in your setup. What JDK is used for profiled application? > Are there any exceptions in the stdout/stderr in profiled application? Can > you try to profile some other application to see if memory profiling works > there or not? That was a very good idea. Just profiled a random other project I have which has a main function (the project I want to profile does not since it's a plugin for something called Bukkit) and in that program Objects was actually working. I went ahead and tried another external process attach - still no luck. The batch script I use to launch the program is the following: > java -Xdebug -Xrunjdwp:transport=dt_socket,address=1002,server=y,suspend=n -jar craftbukkit.jar Using JDK 1.8.0_45
As for the output: > Profiler Agent: JNI OnLoad Initializing... > Profiler Agent: JNI OnLoad Initialized successfully > [19:31:48 INFO]: Profiler Agent: Waiting for connection on port 5140 (Protocol version: 16) > [19:31:48 INFO]: Profiler Agent: Established connection with the tool > [19:31:48 INFO]: Profiler Agent: Local accelerated session > Profiler Agent: 250 classes cached. No errors.
(In reply to Lolmewn from comment #9) > I went ahead and tried another external process attach - still no luck. The > batch script I use to launch the program is the following: > > > java -Xdebug -Xrunjdwp:transport=dt_socket,address=1002,server=y,suspend=n -jar craftbukkit.jar Please run java -version to double check that you are really using JDK 8u45. If this is OK, run your program with: java -Dorg.netbeans.lib.profiler.wireprotocol.WireIO=true craftbukkit.jar and try to attach to it as 'External Process' from NetBeans and use Memory profiling. After that please attach stdout/stderr from craftbukkit.jar and also messages.log from NetBeans - all from the same session. Thanks.
(In reply to Tomas Hurka from comment #11) > (In reply to Lolmewn from comment #9) > > I went ahead and tried another external process attach - still no luck. The > > batch script I use to launch the program is the following: > > > > > java -Xdebug -Xrunjdwp:transport=dt_socket,address=1002,server=y,suspend=n -jar craftbukkit.jar > > Please run > java -version > to double check that you are really using JDK 8u45. > > If this is OK, run your program with: > java -Dorg.netbeans.lib.profiler.wireprotocol.WireIO=true craftbukkit.jar > > and try to attach to it as 'External Process' from NetBeans and use Memory > profiling. After that please attach stdout/stderr from craftbukkit.jar and > also messages.log from NetBeans - all from the same session. Thanks. Here's the log from running java -version and from running craftbukkit.jar: http://pastebin.com/M5Dv5aYH And the messages.log from netbeans: http://pastebin.com/MRE2V5we I hope this helps. I noticed that the date modified of the netbeans log was 5:04 PM while when I pasted it it was 20 minutes later - I'm not 100% sure if everything is included, but when I closed Netbeans the date didn't change so I assume it's the correct version.
(In reply to Lolmewn from comment #12) > Here's the log from running java -version and from running craftbukkit.jar: > http://pastebin.com/M5Dv5aYH > > And the messages.log from netbeans: http://pastebin.com/MRE2V5we > > I hope this helps. Thanks for the logs (BTW: you can attach them to this issue, there is no need to use pastebin.com). Can you please try to run your application via following command: C:\Program Files\Java\jdk1.8.0_45\bin\java -Dorg.netbeans.lib.profiler.wireprotocol.WireIO=true -jar craftbukkit.jar this should fix your problem.
It somehow did... Was I using the JRE version instead of the JDK version or something? I didn't even know that mattered. I should probably edit the PATH to point to the JDK in that case instead of JRE, right?