-XX:+TraceClassUnloading enabled w/ -Xloggc ?
Bengt Rutisson
bengt.rutisson at oracle.com
Wed Oct 31 15:41:30 UTC 2012
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 ...
More information about the hotspot-gc-dev
mailing list