RFR: 8267920: Create separate Events buffer for VMOperations [v3]

Stefan Karlsson stefank at openjdk.java.net
Mon May 31 11:17:44 UTC 2021


> The Events classes collect events in a circular buffer that gets dumped into the hs_err files. There are different sections to sort out different types of events. See:
> 
>   // A log for internal exception related messages, like internal
>   // throws and implicit exceptions.
>   static ExceptionsEventLog* _exceptions;
> 
>   // Deoptization related messages
>   static StringEventLog* _deopt_messages;
> 
>   // Redefinition related messages
>   static StringEventLog* _redefinitions;
> 
>   // Class unloading events
>   static UnloadingEventLog* _class_unloading;
> 
> There's also a buffer for non-categorized events:
> 
>   // A log for generic messages that aren't well categorized.
>   static StringEventLog* _messages;
> 
> I propose that we create a separate buffer for VMOperations. This will make it easier to debug GC related bugs.
> 
> With the proposed patch, the hs_err files will now have a section that looks like this.
> 
> VM Operations (20 events):
> Event: 0,186 Executing VM operation: HandshakeAllThreads
> Event: 0,186 Executing VM operation: HandshakeAllThreads done
> Event: 0,230 Executing VM operation: ZMarkStart
> Event: 0,230 Executing VM operation: ZMarkStart done
> Event: 0,232 Executing VM operation: HandshakeAllThreads
> Event: 0,232 Executing VM operation: HandshakeAllThreads done
> Event: 0,232 Executing VM operation: HandshakeAllThreads
> Event: 0,232 Executing VM operation: HandshakeAllThreads done
> Event: 0,232 Executing VM operation: HandshakeAllThreads
> Event: 0,233 Executing VM operation: HandshakeAllThreads done
> Event: 0,233 Executing VM operation: ZMarkEnd
> Event: 0,233 Executing VM operation: ZMarkEnd done
> Event: 0,234 Executing VM operation: HandshakeAllThreads
> Event: 0,234 Executing VM operation: HandshakeAllThreads done
> Event: 0,234 Executing VM operation: ZVerify
> Event: 0,234 Executing VM operation: ZVerify done
> Event: 0,234 Executing VM operation: CleanClassLoaderDataMetaspaces
> Event: 0,234 Executing VM operation: CleanClassLoaderDataMetaspaces done
> Event: 0,235 Executing VM operation: ZRelocateStart
> Event: 0,235 Executing VM operation: ZRelocateStart done

Stefan Karlsson has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains four additional commits since the last revision:

 - Review tschatzl
 - Merge remote-tracking branch 'origin/master' into 8267914_events_vmoperations
 - Review coleenp
 - 8267920: Create separate Events buffer for VMOperations

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/4243/files
  - new: https://git.openjdk.java.net/jdk/pull/4243/files/1d22bd02..601310ab

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=4243&range=02
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=4243&range=01-02

  Stats: 1484 lines in 53 files changed: 499 ins; 717 del; 268 mod
  Patch: https://git.openjdk.java.net/jdk/pull/4243.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/4243/head:pull/4243

PR: https://git.openjdk.java.net/jdk/pull/4243


More information about the hotspot-dev mailing list