hotspot.log overlapping log statements (JITWatch)
David Holmes
david.holmes at oracle.com
Mon Feb 24 22:54:12 PST 2014
Hi Chris,
If all the trace/logging output is directed to the default output stream
(or the same file) then they will be intermixed. Fixing this would be
non-trivial due to the need for explicit locking around compound
trace/logging statements; and locking in tracing/log output can itself
be problematic.
Using different log files where possible would assist, but then you have
no temporal relationship between the different entries.
David
On 21/02/2014 7:46 AM, Chris Newland wrote:
> Hi all,
>
> I've written a visualiser/analyser for the hotspot.log JIT compilation log
> called JITWatch[1] and I'm encountering problems with log statements from
> various parts of the VM/HotSpot overlapping and producing garbled output
> in hotspot.log[2].
>
> For example, if I combine the VM switches
>
> -XX:+UnlockDiagnosticVMOptions
> -XX:+TraceClassLoading
> -XX:+LogCompilation
> -XX:+PrintAssembly
>
> then I get overlap between classloading statements, log compilation XML,
> and disassembled native code:
>
> Decoding compiled method 0x009dfec8:
> Code:
> [Entry Point]
> [Constants]
> # {method} 'hashCode' '()I' in 'java/lang/String'
> # [sp+0x20] (sp of caller)
> 0x009dffc0: nop
> 0x009dffc1: nop
> 0x009dffc2: nop
> <writer thread='3340'/> <-- assembly interrupted by XML
> [Loaded java.lang.Enum <-- assembly interrupted by classloader
> <writer thread='2660'/>
>
> 0x009dffc3: nop
> 0x009dffc4: nop
> 0x009dffc5:
> <writer thread='3340'/>
> from shared objects file]
> <writer thread='2660'/>
> nop
> 0x009dffc6: nop
>
> I couldn't find this in the Oracle or OpenJDK bug trackers and was
> wondering if this is a known problem and if it is fixable?
>
> It seems to happen fairly infrequently but means that JITWatch can't parse
> the compilation information when the garbling occurs.
>
> Thanks for any pointers you can give me.
>
> Kind regards,
>
> Chris
> @chriswhocodes
>
> [1] https://github.com/AdoptOpenJDK/jitwatch/wiki
> [2] https://github.com/AdoptOpenJDK/jitwatch/issues/3
>
>
>
>
More information about the hotspot-dev
mailing list