-XX:+TraceClassUnloading enabled w/ -Xloggc ?
Charlie Hunt
chunt at salesforce.com
Wed Oct 31 16:51:01 UTC 2012
Hi Bengt,
I also just noticed Bernd's reply as I was drafting this note to you.
It appears there was a change made possibly after the Java 7 fork. I checked 6u33, (which isn't too old), and got:
$ /home/chunt/jdks/jdk1.6.0_33/bin/java -Xloggc:/tmp/gc.log -XX:+PrintFlagsFinal -version | grep TraceClassUnloading
bool TraceClassUnloading := true {product rw}
java version "1.6.0_33"
Java(TM) SE Runtime Environment (build 1.6.0_33-b03)
Java HotSpot(TM) 64-Bit Server VM (build 20.8-b03, mixed mode)
I didn't check any Java 6u* after 33. But, the Java 7 versions I checked shows it disabled with -Xloggc, as you showed with what looks to be a fairly recent HotSpot, or from built directly from hotspot-main's repository.
Perhaps someone had already noticed this peculiarity previously and the change was integrated into HotSpot after the fork for Java 7? Or, if it's in a 6u* after 6u33, then perhaps it got back ported to Java 6 since 6u33 came after the Java 7 fork.
Ooh, before I forget ... yeah, I noticed +PrintGC and +PrintGCDetails were auto-enabled with -Xloggc. My question, which I may not have made very clear, was if -Xloggc was auto-enabling +TraceClassUnloading, then why wouldn't it be auto-enabled with +PrintGC or +PrintGCDetails. That's a mute point now since a change has been made to to leave TraceClassUnloading disabled with -Xloggc. ;-)
Thanks (both you and Bernd) for the additional info and forensics.
charlie ...
On Oct 31, 2012, at 10:41 AM, Bengt Rutisson wrote:
Charlie,
I don't see any code that enables TraceClassUnloading when -Xloggc is
used. Are you sure that this happens?
When I run it also doesn't look like it gets enabled.
java -Xloggc:log.txt -XX:+PrintFlagsFinal -version | grep
TraceClassUnloading
bool TraceClassUnloading = false
{product rw}
java version "1.8.0-ea"
Java(TM) SE Runtime Environment (build 1.8.0-ea-b60)
Java HotSpot(TM) Client VM (build 25.0-b04, mixed mode)
We do enable PrintGC and PrintGCDetails when -Xloggc is enabled:
if (match_option(option, "-Xloggc:", &tail)) {
// Redirect GC output to the file. -Xloggc:<filename>
// ostream_init_log(), when called will use this filename
// to initialize a fileStream.
_gc_log_filename = strdup(tail);
FLAG_SET_CMDLINE(bool, PrintGC, true);
FLAG_SET_CMDLINE(bool, PrintGCTimeStamps, true);
// JNI hooks
}
Bengt
On 2012-10-29 16:06, Charlie Hunt wrote:
We stumbled across this last week ... and now curious.
With -Xloggc, -XX:+TraceClassUnloading is also enabled. But, with other GC related command line options such as; -XX:+PrintGCDetails, -XX:+PrintGC, -XX:+PrintHeapAtGC, etc. -XX:-TraceClassUnloading remains disabled by default.
Anyone know the history that led to the decision to only enable +TraceClassUnloading with -Xloggc, and not with say +PrintGCDetails?
thanks,
charlie ...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/hotspot-gc-dev/attachments/20121031/71728c02/attachment.htm>
More information about the hotspot-gc-dev
mailing list