Fully featured low overhead profiler for Java EE and Java SE platforms.
Ultimate profiling and monitoring solution for Gradle, Maven, Ant, JUnit and TestNG.
Easy to use performance and memory profiler for .NET framework.

what is wrong with this start alloc statement

Moderators: Vladimir Kondratyev, Anton Katilin

what is wrong with this start alloc statement

Postby Michael.Scaman » Thu Jun 11, 2015 2:39 pm

java -jar /var/lib/yjp-2015-build-15058/lib/yjp-controller-api-redist.jar localhost 10005 start-alloc-recording-adaptive

( in the script iyjp complains ... saying.. )
YourKit Java Profiler 2015 build 15058 command line tools

Usage: java -jar yjp-controller-api-redist.jar <host> <port> <command>

where <command> is one of:

print-current-status
capture-memory-snapshot
capture-hprof-snapshot
capture-performance-snapshot
start-cpu-sampling
start-cpu-tracing
stop-cpu-profiling
clear-cpu-data
start-alloc-recording-all
// record all objects
start-alloc-recording-adaptive [alloc-sampled]
// record all objects with size >= 4 KB, and only each 10th smaller object
stop-alloc-recording
clear-alloc-data
start-monitor-profiling
stop-monitor-profiling
clear-monitor-data


but... outside the script

java -jar /var/lib/yjp-2015-build-15058/lib/yjp-controller-api-redist.jar localhost 10005 start-alloc-recording-adaptive
Allocation recording started

why?
Michael.Scaman
 
Posts: 34
Joined: Mon Feb 02, 2015 3:14 pm

Re: what is wrong with this start alloc statement

Postby Michael.Scaman » Thu Jun 11, 2015 2:44 pm

seems I tell it to stop recording alloc ... but it still thinks it's recording

Allocation data cleared
Allocation recording stopped
java -jar /var/lib/yjp-2015-build-15058/lib/yjp-controller-api-redist.jar localhost 10005 start-alloc-recording-all
YourKit Java Profiler 2015 build 15058 command line tools

Usage: java -jar yjp-controller-api-redist.jar <host> <port> <command>

where <command> is one of:

print-current-status
capture-memory-snapshot
capture-hprof-snapshot
capture-performance-snapshot
start-cpu-sampling
start-cpu-tracing
stop-cpu-profiling
clear-cpu-data
start-alloc-recording-all
// record all objects
start-alloc-recording-adaptive [alloc-sampled]
// record all objects with size >= 4 KB, and only each 10th smaller object
stop-alloc-recording
clear-alloc-data
start-monitor-profiling
stop-monitor-profiling
clear-monitor-data

Examples:
java -jar yjp-controller-api-redist.jar localhost 10001 capture-memory-snapshot
java -jar yjp-controller-api-redist.jar localhost 10001 start-cpu-sampling

java -jar /var/lib/yjp-2015-build-15058/lib/yjp-controller-api-redist.jar localhost 10005 start-monitor-profiling
Exception in thread "main" com.yourkit.runtime.PresentableException: Cannot start monitor profiling: Already started
at com.yourkit.runtime.Packet.readHeader(Packet.java:64)
at com.yourkit.runtime.Packet.readHeader(Packet.java:83)
at com.yourkit.runtime.Packet.readHeaderWithStandardResponse(Packet.java:73)
at com.yourkit.api.ControllerImpl$8.perform(ControllerImpl.java:417)
at com.yourkit.api.ControllerImpl.makeRequest(ControllerImpl.java:217)
at com.yourkit.api.ControllerImpl.startMonitorProfiling(ControllerImpl.java:411)
Michael.Scaman
 
Posts: 34
Joined: Mon Feb 02, 2015 3:14 pm

Re: what is wrong with this start alloc statement

Postby Anton Katilin » Mon Jun 15, 2015 9:16 am

As the message says, the exception is thrown because the requested profiling mode is already on.

The same issue is discussed here: http://forums.yourkit.com/viewtopic.php?f=3&t=9912
Anton Katilin
 
Posts: 5574
Joined: Wed Aug 11, 2004 8:37 am


Return to Java Profiler

Who is online

Users browsing this forum: No registered users and 8 guests

cron