Request for Review: 7120511: Add diagnostic commands
David Holmes
david.holmes at oracle.com
Thu Jan 5 18:19:38 PST 2012
Hi Fred,
Curious about one thing. For the uptime, how does this:
+ void VMUptimeDCmd::execute(TRAPS) {
+ if (_date.value()) {
+ output()->date_stamp(true, "", ": ");
+ }
+ output()->time_stamp().update_to(tty->time_stamp().ticks());
+ output()->stamp();
+ output()->print_cr(" s");
+ }
compare to simply doing "current time - VM start time" ? I guess the
difference will be the difference between when os::elapsed_counter() was
initialized and the VM start time is initialized. But the above seems a
very non-obvious way of getting the uptime.
David
-----
On 6/01/2012 1:19 AM, Frederic Parain wrote:
> This changeset aims to add a first set of diagnostic commands
> to the HotSpot JVM. It also includes minor modifications to
> the diagnostic command framework implementation to ease
> development of new diagnostic commands.
>
> The webrev is here:
>
> http://cr.openjdk.java.net/~fparain/7120511/webrev.00/
>
>
> Here's the list of new diagnostic commands:
>
> Thread.print
> Print all threads with stacktraces.
>
> GC.class_histogram
> Provides statistics about the Java heap usage
>
> GC.heap_dump
> Generate a HPROF format dump of the Java heap
>
> GC.run_finalization
> Call java.lang.System.runFinalization().
>
> GC.run
> Call java.lang.System.gc().
>
> VM.uptime
> Print VM uptime.
>
> VM.flags
> Print VM flag options and their current values.
>
> VM.system_properties
> Print system properties
>
> VM.command_line
> Print the command line used to start this VM instance.
>
>
> Thanks,
>
> Fred
>
More information about the serviceability-dev
mailing list