RFR: 8144874: Reimplement TraceClassResolution with UL
Max Ockner
max.ockner at oracle.com
Fri Dec 18 21:06:20 UTC 2015
Here is a sample output:
_______________________________
[0.698s][info ][classresolve] java.nio.CharBuffer
java.nio.HeapCharBuffer CharBuffer.java:387
[0.698s][info ][classresolve] sun.misc.Version java.lang.System
Version.java:101
[0.698s][info ][classresolve] java.util.Properties java.lang.String
Properties.java:971
[0.698s][info ][classresolve] java.util.Properties java.lang.String
Properties.java:971
[0.698s][info ][classresolve] sun.misc.Version java.lang.String
Version.java:103
[0.698s][info ][classresolve] sun.misc.Version java.lang.StringBuilder
Version.java:106
[0.698s][info ][classresolve] sun.misc.Version java.lang.StringBuilder
Version.java:106
[0.698s][info ][classresolve] sun.misc.Version java.lang.StringBuilder
Version.java:106
[0.698s][info ][classresolve] sun.misc.Version java.lang.StringBuilder
Version.java:106
[0.698s][info ][classresolve] java.lang.StringLatin1 java.lang.String
StringLatin1.java:508
[0.698s][info ][classresolve] sun.misc.Version java.lang.StringBuilder
Version.java:109
[0.698s][info ][classresolve] java.lang.StringLatin1 java.lang.String
StringLatin1.java:508
[0.698s][info ][classresolve] sun.misc.Version java.io.PrintStream
Version.java:109
[0.698s][info ][classresolve] java.nio.CharBuffer
java.nio.HeapCharBuffer CharBuffer.java:387
Java(TM) SE Runtime Environment (fastdebug build
9-internal+0-2015-12-17-142159.mockner.TraceClassResolution[0.698s][info
][classresolve] sun.misc.Version java.lang.String Version.java:111
[0.698s][info ][classresolve] java.lang.String java.lang.StringLatin1
String.java:1680
[0.698s][info ][classresolve] sun.misc.Version java.io.PrintStream
Version.java:115
__________________________
Note that there are existing issues in TraceClassResolution Logging
without Unified Logging. Below is the output from java
-XX:+TraceClassResolution -version. Issues:
- random empty lines.
- output from "java - version" is mashed up with TraceClassResolution
output.
- some TraceClassResolution lines are concatenated onto the end of a
"java - version output line". This is tied to the last issue, since
there are newlines in the "java -version output", but they are not
attached to the other java -version text since other output is allowed
to be printed at the same time.
RESOLVE java.io.FileDescriptor$1 java.io.FileDescriptor
FileDescriptor.java:165
java version "1.9.0-internal"RESOLVE java.io.BufferedOutputStream
java.io.OutputStream BufferedOutputStream.java:143
RESOLVE sun.nio.cs.StreamEncoder java.nio.ByteBuffer StreamEncoder.java:224
RESOLVE java.nio.ByteBuffer java.nio.Buffer ByteBuffer.java:1131
RESOLVE java.io.PrintStream java.lang.String PrintStream.java:528
RESOLVE java.io.PrintStream java.io.BufferedWriter PrintStream.java:544
RESOLVE java.io.BufferedWriter java.lang.System BufferedWriter.java:234
RESOLVE java.nio.CharBuffer java.nio.HeapCharBuffer CharBuffer.java:387
RESOLVE sun.misc.Version java.io.PrintStream Version.java:103
RESOLVE java.nio.CharBuffer java.nio.HeapCharBuffer CharBuffer.java:387
Java(TM) SE Runtime Environment (build
1.9.0-internal-mockner_2015_11_30_16_45-b00RESOLVE sun.misc.Version
java.lang.String Version.java:105
RESOLVE java.lang.String java.lang.StringLatin1 String.java:1680
RESOLVE sun.misc.Version java.io.PrintStream Version.java:109
RESOLVE java.io.PrintStream java.lang.String PrintStream.java:583
RESOLVE java.lang.String java.lang.StringLatin1 String.java:2900
RESOLVE java.lang.String java.lang.StringLatin1 String.java:2901
RESOLVE java.nio.CharBuffer java.nio.HeapCharBuffer CharBuffer.java:387
)RESOLVE java.nio.CharBuffer java.nio.HeapCharBuffer CharBuffer.java:387
RESOLVE java.util.Properties java.lang.String Properties.java:971
RESOLVE java.util.Properties java.lang.String Properties.java:971
RESOLVE java.util.Properties java.lang.String Properties.java:971
RESOLVE java.util.Properties java.lang.String Properties.java:971
RESOLVE java.util.Properties java.lang.String Properties.java:971
RESOLVE java.util.Properties java.lang.String Properties.java:971
RESOLVE sun.misc.Version java.lang.StringBuilder Version.java:115
RESOLVE sun.misc.Version java.lang.StringBuilder Version.java:115
RESOLVE sun.misc.Version java.lang.StringBuilder Version.java:115
RESOLVE sun.misc.Version java.lang.StringBuilder Version.java:115
RESOLVE java.lang.StringLatin1 java.lang.String StringLatin1.java:507
RESOLVE java.nio.CharBuffer java.nio.HeapCharBuffer CharBuffer.java:387
Java HotSpot(TM) 64-Bit Server VM (build
1.9.0-internal-mockner_2015_11_30_16_45-b00, mixed mode)RESOLVE
java.nio.CharBuffer java.nio.HeapCharBuffer CharBuffer.java:387
RESOLVE java.lang.Thread java.lang.ThreadGroup Thread.java:757
RESOLVE java.lang.ThreadGroup java.lang.System ThreadGroup.java:969
RESOLVE java.lang.ThreadGroup java.lang.Object ThreadGroup.java:945
RESOLVE java.lang.Thread java.lang.Object Thread.java:234
RESOLVE java.lang.Shutdown java.lang.Object (super)
On 12/18/2015 12:19 AM, Ioi Lam wrote:
>
>
> On 12/17/15 12:00 PM, Max Ockner wrote:
>> New webrev: http://cr.openjdk.java.net/~mockner/classresolve
>>
>> On 12/16/2015 6:27 PM, Ioi Lam wrote:
>>> Hi Max,
>>>
>>> [1] I think you need to rebase your changes and send out a new
>>> webrev. The latest version of argument.cpp already has these
>>>
>>> static AliasedFlag const aliased_jvm_logging_flags[] = {
>>> { "-XX:+TraceMonitorInflation", "-Xlog:monitorinflation=debug" },
>>> { "-XX:-TraceMonitorInflation", "-Xlog:monitorinflation=off" },
>>> { NULL, NULL }
>>> };
>>
>> Fixed.
>>
>>>
>>> which would conflict with similar lines that you added.
>>>
>>> [2] In the test case ClassResolutionTest.java:
>>>
>>> Is there any need for adding "-Xmx64m"? If not, I think it should be
>>> removed.
>>
>> Removed.
>>
>>>
>>> [3] Also, could you send out a sample log that covers all of the
>>> different logging lines that you have touched?
>>
>> What would you like to see? The webrev contains all of the lines that
>> were touched, and there is only one level of logging here
>> (-Xlog:classresolve=info)
> I was looking for the output of something like
>
> java -Xlog:classresolve=info <some_test_program>
>
> Feel free to edit the output to remove the redundant lines and just
> show a good sample of what the output looks like. It's much easier to
> spot problems by looking at the output, rather than looking at the
> code and try to synthesize the output in my head.
>
> I would suggest doing the same for all other UL code reviews. It will
> help the reviewers a lot.
>
> Thanks
> - Ioi
>
>>
>>>
>>> I think the "RESOLVE" in the following output is redundant and
>>> should be removed.
>>>
>>> [classresolve] RESOLVE
>>> ClassResolutionTest$ClassResolutionTestMain$Thing1Handler
>>> ClassResolutionTest$ClassResolutionTestMain$Thing1
>>
>> I agree. This is now gone.
>>
>>>
>>> Thanks
>>> - Ioi
>>>
>>> On 12/16/15 12:44 PM, Max Ockner wrote:
>>>> Hello all,
>>>> Please review my code for another Unified Logging conversion.
>>>>
>>>> Bug: https://bugs.openjdk.java.net/browse/JDK-8144874
>>>> Webrev: http://cr.openjdk.java.net/~mockner/classresolve/
>>>>
>>>> Summary: "-XX:+TraceClassResolution" reimplemented using Unified
>>>> Logging with classresolve tag and Info level. Support is maintained
>>>> for TraceClassResolution using the alias table.
>>>>
>>>> Tested with: Selection Resolution tests, jtreg tests. This change
>>>> also adds a jtreg test for the implementation of classresolve, and
>>>> for the maintained support of TraceClassResolution.
>>>>
>>>> Thanks,
>>>> Max
>>>
>>
>
More information about the hotspot-runtime-dev
mailing list