How to get reference processing logging?

Stefan Karlsson stefan.karlsson at oracle.com
Wed Dec 7 12:32:41 UTC 2016


Hi Andrew,

On 2016-12-07 12:08, Andrew Haley wrote:
> I've tried "-Xlog:gc::ref" and "-Xlog:gc=ref" but neither works.
>
> I want to see this output:
>
>   log_debug(gc, ref)("Ref Counts: Soft: " SIZE_FORMAT " Weak: " SIZE_FORMAT " Final: " SIZE_FORMAT " Phantom: " SIZE_FORMAT,
>                      stats.soft_count(), stats.weak_count(), stats.final_count(), stats.phantom_count());
>   log_develop_trace(gc, ref)("JNI Weak Reference count: " SIZE_FORMAT, count_jni_refs());
>
>
> I tried -Xlog:help and searc hed on the web for information about the
> -Xlog syntax, but no luck.

 From -Xlog:help::
"-Xlog Usage: -Xlog[:[what][:[output][:[decorators][:output-options]]]]
	 where 'what' is a combination of tags and levels on the form 
tag1[+tag2...][*][=level][,...]
	 Unless wildcard (*) is specified, only log messages tagged with 
exactly the tags specified will be matched."

With:
  tag1 = gc
  tag2 = ref
  level = trace

you get -Xlog:gc+ref=trace.

hth,
StefanK

>
> Thanks,
>
> Andrew.
>


More information about the hotspot-dev mailing list