RFR: 8149064: Convert TraceProtectionDomainVerification to Unified Logging
Max Ockner
max.ockner at oracle.com
Mon Feb 22 17:17:53 UTC 2016
Please review this conversion of TraceProtectionDomainverification to
Unified Logging.
Theres some output that I think should be changed, but I want to see
what others think first.
Bug: https://bugs.openjdk.java.net/browse/JDK-8149064
Webrev: http://cr.openjdk.java.net/~mockner/protectiondomain.02/
TraceProtectionDomainVerification is a non-product flag, but the output
will now be available in product builds through
-Xlog:protectiondomain=debug.
- The output is concise. "-version" produces no output, and
"Hello.java" produces 27 lines (if level=trace) or fewer. See below.
- This change doesn't rely on "#ifndef PRODUCT" and is smaller than
most logging changes that we've seen so far.
- refworkload shows now significant performance changes.
Tested with jtreg hotspot tests and refworkload.
Here is sample output for a run of Hello.java:
[0.138s][debug][protectiondomain] - class loader: a
'sun/misc/Launcher$AppClassLoader'
[0.138s][debug][protectiondomain] - protection domain: a
'java/security/ProtectionDomain'
[0.138s][debug][protectiondomain] - loading: 'java/lang/Object'
[0.139s][debug][protectiondomain] -> granted
[0.139s][debug][protectiondomain]
[0.139s][trace][protectiondomain] pd set = #1
[0.139s][debug][protectiondomain] Checking package access
[0.139s][debug][protectiondomain] - class loader: a
'sun/misc/Launcher$AppClassLoader'
[0.139s][debug][protectiondomain] - protection domain: a
'java/security/ProtectionDomain'
[0.139s][debug][protectiondomain] - loading: 'java/lang/String'
[0.139s][debug][protectiondomain] -> granted
[0.139s][debug][protectiondomain]
[0.139s][trace][protectiondomain] pd set = #1
[0.139s][debug][protectiondomain] Checking package access
[0.139s][debug][protectiondomain] - class loader: a
'sun/misc/Launcher$AppClassLoader'
[0.139s][debug][protectiondomain] - protection domain: a
'java/security/ProtectionDomain'
[0.139s][debug][protectiondomain] - loading: 'java/lang/System'
[0.139s][debug][protectiondomain] -> granted
[0.139s][debug][protectiondomain]
[0.139s][trace][protectiondomain] pd set = #1
[0.140s][debug][protectiondomain] Checking package access
[0.140s][debug][protectiondomain] - class loader: a
'sun/misc/Launcher$AppClassLoader'
[0.140s][debug][protectiondomain] - protection domain: a
'java/security/ProtectionDomain'
[0.140s][debug][protectiondomain] - loading: 'java/io/PrintStream'
[0.140s][debug][protectiondomain] -> granted
[0.140s][debug][protectiondomain]
[0.140s][trace][protectiondomain] pd set = #1
I am anticipating several comments and suggestions, but I believe there
are only minor changes remaining. I would like to remove the empty
space, though I believe this was present in the
TraceProtectionDomainVerification output to make the output more
readable. I also anticipate that you may want me to remove the "-" from
in front of some of the lines. Again, I would like input since output
seems like it was designed to look a certain way.
Thanks,
Max
More information about the hotspot-runtime-dev
mailing list