Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8275334: Move class loading Events to a separate section in hs_err files #5968

Conversation

stefank
Copy link
Member

@stefank stefank commented Oct 15, 2021

The generic "Events" section in hs_err files tend to fill up with class loading events. I propose that we move class loading events to its own section.

We already have a section for class unloading, so adding a class loading section is also good for symmetry reasons.

This is what this will look like after the patch:

Classes loaded (20 events):
Event: 4,426 Loading class com/sun/org/apache/xerces/internal/xinclude/MultipleScopeNamespaceSupport done
Event: 4,426 Loading class com/sun/org/apache/xerces/internal/xinclude/XIncludeNamespaceSupport done
Event: 4,428 Loading class com/sun/org/apache/xerces/internal/parsers/AbstractSAXParser$LocatorProxy
Event: 4,428 Loading class org/xml/sax/ext/Locator2
Event: 4,428 Loading class org/xml/sax/ext/Locator2 done
Event: 4,428 Loading class com/sun/org/apache/xerces/internal/parsers/AbstractSAXParser$LocatorProxy done
Event: 4,430 Loading class com/sun/org/apache/xerces/internal/impl/XMLScanner$NameType
Event: 4,430 Loading class com/sun/org/apache/xerces/internal/impl/XMLScanner$NameType done
Event: 4,435 Loading class org/xml/sax/helpers/LocatorImpl
Event: 4,435 Loading class org/xml/sax/helpers/LocatorImpl done
Event: 4,498 Loading class java/util/Vector$ListItr
Event: 4,498 Loading class java/util/Vector$ListItr done
Event: 4,499 Loading class java/lang/StrictMath
Event: 4,499 Loading class java/lang/StrictMath done
Event: 4,623 Loading class java/util/BitSet
Event: 4,623 Loading class java/util/BitSet done
Event: 4,656 Loading class java/util/ArrayList$ListItr
Event: 4,657 Loading class java/util/ArrayList$ListItr done
Event: 4,693 Loading class java/util/ArrayList$SubList
Event: 4,694 Loading class java/util/ArrayList$SubList done

Classes unloaded (20 events):
Event: 3,445 Thread 0x00007f061c2578d0 Unloading class 0x0000000100088000 'avrora/Main'
Event: 4,864 Thread 0x00007f061c2578d0 Unloading class 0x00000001000a3c00 'java/lang/invoke/LambdaForm$MH+0x00000001000a3c00'
Event: 4,864 Thread 0x00007f061c2578d0 Unloading class 0x00000001000a3400 'java/lang/invoke/LambdaForm$MH+0x00000001000a3400'
Event: 4,864 Thread 0x00007f061c2578d0 Unloading class 0x00000001000a1c00 'java/lang/invoke/LambdaForm$MH+0x00000001000a1c00'
Event: 4,864 Thread 0x00007f061c2578d0 Unloading class 0x00000001000a1400 'java/lang/invoke/LambdaForm$MH+0x00000001000a1400'
Event: 4,864 Thread 0x00007f061c2578d0 Unloading class 0x00000001000a1000 'java/lang/invoke/LambdaForm$MH+0x00000001000a1000'
Event: 4,864 Thread 0x00007f061c2578d0 Unloading class 0x00000001000a0c00 'java/lang/invoke/LambdaForm$MH+0x00000001000a0c00'
Event: 4,864 Thread 0x00007f061c2578d0 Unloading class 0x00000001000a0800 'java/lang/invoke/LambdaForm$MH+0x00000001000a0800'
Event: 4,864 Thread 0x00007f061c2578d0 Unloading class 0x00000001000a0400 'java/lang/invoke/LambdaForm$MH+0x00000001000a0400'
Event: 4,864 Thread 0x00007f061c2578d0 Unloading class 0x00000001000a0000 'java/lang/invoke/LambdaForm$MH+0x00000001000a0000'
Event: 4,864 Thread 0x00007f061c2578d0 Unloading class 0x000000010012c000 'jdk/internal/reflect/GeneratedMethodAccessor1'
Event: 4,864 Thread 0x00007f061c2578d0 Unloading class 0x0000000100123000 'java/lang/invoke/LambdaForm$MH+0x0000000100123000'
Event: 4,864 Thread 0x00007f061c2578d0 Unloading class 0x0000000100121800 'java/lang/invoke/LambdaForm$MH+0x0000000100121800'
Event: 4,864 Thread 0x00007f061c2578d0 Unloading class 0x0000000100121000 'java/lang/invoke/LambdaForm$MH+0x0000000100121000'
Event: 4,864 Thread 0x00007f061c2578d0 Unloading class 0x000000010009fc00 'java/lang/invoke/LambdaForm$MH+0x000000010009fc00'
Event: 4,864 Thread 0x00007f061c2578d0 Unloading class 0x000000010009ec00 'java/lang/invoke/LambdaForm$MH+0x000000010009ec00'
Event: 4,864 Thread 0x00007f061c2578d0 Unloading class 0x000000010009e800 'java/lang/invoke/LambdaForm$MH+0x000000010009e800'
Event: 4,864 Thread 0x00007f061c2578d0 Unloading class 0x000000010009e400 'java/lang/invoke/LambdaForm$MH+0x000000010009e400'
Event: 4,864 Thread 0x00007f061c2578d0 Unloading class 0x000000010009cc00 'java/lang/invoke/LambdaForm$MH+0x000000010009cc00'
Event: 5,914 Thread 0x00007f061c2578d0 Unloading class 0x0000000100123000 'jdk/internal/reflect/GeneratedMethodAccessor2'
...
Events (20 events):
Event: 5,565 Thread 0x00007f061c2f97e0 flushing nmethod 0x00007f060dada610
Event: 5,565 Thread 0x00007f061c2f97e0 flushing nmethod 0x00007f060dadd990
Event: 5,565 Thread 0x00007f061c2f97e0 flushing nmethod 0x00007f060dadfd90
Event: 5,565 Thread 0x00007f061c2f97e0 flushing nmethod 0x00007f060dae9e90
Event: 5,565 Thread 0x00007f061c2f97e0 flushing nmethod 0x00007f060daea490
Event: 5,565 Thread 0x00007f061c2f97e0 flushing nmethod 0x00007f060daeee90
Event: 5,565 Thread 0x00007f061c2f97e0 flushing nmethod 0x00007f060daf0710
Event: 5,565 Thread 0x00007f061c2f97e0 flushing nmethod 0x00007f060daf2410
Event: 5,565 Thread 0x00007f061c2f97e0 flushing nmethod 0x00007f060dafe810
Event: 5,565 Thread 0x00007f061c2f97e0 flushing nmethod 0x00007f060db01d10
Event: 5,565 Thread 0x00007f061c2f97e0 flushing nmethod 0x00007f060db63c90
Event: 5,681 Thread 0x00007f05901b3bd0 Thread exited: 0x00007f05901b3bd0
Event: 5,681 Thread 0x00007f058c2319d0 Thread exited: 0x00007f058c2319d0
Event: 5,687 Thread 0x00007f05cc533030 Thread exited: 0x00007f05cc533030
Event: 5,687 Thread 0x00007f058c229ff0 Thread exited: 0x00007f058c229ff0
Event: 5,715 Thread 0x00007f058401fb00 Thread exited: 0x00007f058401fb00
Event: 5,715 Thread 0x00007f05cc449b80 Thread exited: 0x00007f05cc449b80
Event: 5,715 Thread 0x00007f05cc45b6f0 Thread exited: 0x00007f05cc45b6f0
Event: 5,872 Thread 0x00007f0584179750 Thread added: 0x00007f0584179750
Event: 5,872 Protecting memory [0x00007f05f85f8000,0x00007f05f85fc000] with protection modes 0

Before the patch:

Classes unloaded (20 events):
Event: 4,911 Thread 0x00007fe1282560f0 Unloading class 0x00000001000a3c00 'java/lang/invoke/LambdaForm$MH+0x00000001000a3c00'
Event: 4,911 Thread 0x00007fe1282560f0 Unloading class 0x00000001000a3400 'java/lang/invoke/LambdaForm$MH+0x00000001000a3400'
Event: 4,911 Thread 0x00007fe1282560f0 Unloading class 0x00000001000a1c00 'java/lang/invoke/LambdaForm$MH+0x00000001000a1c00'
Event: 4,911 Thread 0x00007fe1282560f0 Unloading class 0x00000001000a1400 'java/lang/invoke/LambdaForm$MH+0x00000001000a1400'
Event: 4,911 Thread 0x00007fe1282560f0 Unloading class 0x00000001000a1000 'java/lang/invoke/LambdaForm$MH+0x00000001000a1000'
Event: 4,911 Thread 0x00007fe1282560f0 Unloading class 0x00000001000a0c00 'java/lang/invoke/LambdaForm$MH+0x00000001000a0c00'
Event: 4,911 Thread 0x00007fe1282560f0 Unloading class 0x00000001000a0800 'java/lang/invoke/LambdaForm$MH+0x00000001000a0800'
Event: 4,911 Thread 0x00007fe1282560f0 Unloading class 0x00000001000a0400 'java/lang/invoke/LambdaForm$MH+0x00000001000a0400'
Event: 4,911 Thread 0x00007fe1282560f0 Unloading class 0x00000001000a0000 'java/lang/invoke/LambdaForm$MH+0x00000001000a0000'
Event: 4,911 Thread 0x00007fe1282560f0 Unloading class 0x000000010012c000 'jdk/internal/reflect/GeneratedMethodAccessor1'
Event: 4,911 Thread 0x00007fe1282560f0 Unloading class 0x0000000100123000 'java/lang/invoke/LambdaForm$MH+0x0000000100123000'
Event: 4,911 Thread 0x00007fe1282560f0 Unloading class 0x0000000100121800 'java/lang/invoke/LambdaForm$MH+0x0000000100121800'
Event: 4,911 Thread 0x00007fe1282560f0 Unloading class 0x0000000100121000 'java/lang/invoke/LambdaForm$MH+0x0000000100121000'
Event: 4,911 Thread 0x00007fe1282560f0 Unloading class 0x000000010009fc00 'java/lang/invoke/LambdaForm$MH+0x000000010009fc00'
Event: 4,911 Thread 0x00007fe1282560f0 Unloading class 0x000000010009ec00 'java/lang/invoke/LambdaForm$MH+0x000000010009ec00'
Event: 4,911 Thread 0x00007fe1282560f0 Unloading class 0x000000010009e800 'java/lang/invoke/LambdaForm$MH+0x000000010009e800'
Event: 4,911 Thread 0x00007fe1282560f0 Unloading class 0x000000010009e400 'java/lang/invoke/LambdaForm$MH+0x000000010009e400'
Event: 4,911 Thread 0x00007fe1282560f0 Unloading class 0x000000010009cc00 'java/lang/invoke/LambdaForm$MH+0x000000010009cc00'
Event: 5,964 Thread 0x00007fe1282560f0 Unloading class 0x00000001000a3400 'jdk/internal/reflect/GeneratedMethodAccessor2'
Event: 6,059 Thread 0x00007fe1282560f0 Unloading class 0x00000001000a3400 'jdk/internal/reflect/GeneratedMethodAccessor3'
...
Events (20 events):
Event: 4,662 loading class java/util/BitSet
Event: 4,663 loading class java/util/BitSet done
Event: 4,697 loading class java/util/ArrayList$ListItr
Event: 4,697 loading class java/util/ArrayList$ListItr done
Event: 4,738 loading class java/util/ArrayList$SubList
Event: 4,739 loading class java/util/ArrayList$SubList done
Event: 4,745 Thread 0x00007fe0940ebe70 Thread added: 0x00007fe0940ebe70
Event: 4,745 Protecting memory [0x00007fe109bb9000,0x00007fe109bbd000] with protection modes 0
Event: 4,803 Thread 0x00007fe0c03f1850 Thread added: 0x00007fe0c03f1850
Event: 4,803 Protecting memory [0x00007fe109ab8000,0x00007fe109abc000] with protection modes 0
Event: 4,809 Thread 0x00007fe0c412be00 Thread added: 0x00007fe0c412be00
Event: 4,809 Protecting memory [0x00007fe1097b5000,0x00007fe1097b9000] with protection modes 0
Event: 5,839 Thread 0x00007fe0c412be00 Thread exited: 0x00007fe0c412be00
Event: 5,846 Thread 0x00007fe0c03f1850 Thread exited: 0x00007fe0c03f1850
Event: 5,874 Thread 0x00007fe0940ebe70 Thread exited: 0x00007fe0940ebe70
Event: 5,874 Thread 0x00007fe0c03044d0 Thread exited: 0x00007fe0c03044d0
Event: 5,874 Thread 0x00007fe0dc465540 Thread exited: 0x00007fe0dc465540
Event: 5,894 Thread 0x00007fe0c02e7420 Thread exited: 0x00007fe0c02e7420
Event: 6,024 Thread 0x00007fe09c184030 Thread added: 0x00007fe09c184030
Event: 6,024 Protecting memory [0x00007fe1095b2000,0x00007fe1095b6000] with protection modes 0

Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8275334: Move class loading Events to a separate section in hs_err files

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/5968/head:pull/5968
$ git checkout pull/5968

Update a local copy of the PR:
$ git checkout pull/5968
$ git pull https://git.openjdk.java.net/jdk pull/5968/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 5968

View PR using the GUI difftool:
$ git pr show -t 5968

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/5968.diff

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Oct 15, 2021

👋 Welcome back stefank! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr label Oct 15, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Oct 15, 2021

@stefank The following label will be automatically applied to this pull request:

  • hotspot

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the hotspot label Oct 15, 2021
@mlbridge
Copy link

@mlbridge mlbridge bot commented Oct 15, 2021

Webrevs

Copy link
Member

@tstuefe tstuefe left a comment

Looks good.

@openjdk
Copy link

@openjdk openjdk bot commented Oct 15, 2021

@stefank This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8275334: Move class loading Events to a separate section in hs_err files

Reviewed-by: stuefe, coleenp

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 113 new commits pushed to the master branch:

  • da8da3a: 8269698: Specification for methods of java.awt.im.InputContext should mention that they do nothing
  • 8e02064: 8049520: FileCredentialsCache loads cache once and is never refreshed
  • 172aed1: 8274338: com/sun/jdi/RedefineCrossEvent.java failed "assert(m != __null) failed: NULL mirror"
  • ced7909: 8275286: Check current thread when calling JRT methods that expect it
  • c0f3e1d: 8271071: accessibility of a table on macOS lacks cell navigation
  • 4cb7124: 8262912: ciReplay: replay does not simulate unresolved classes
  • 322b130: 8275106: Cleanup Iterator usages in java.desktop
  • c355704: 8041125: ColorConvertOp filter much slower in JDK 8 compared to JDK7
  • 9623d5b: 8275265: java/nio/channels tests needing large heap sizes fail on x86_32
  • 21df412: 8275240: Change nested classes in jdk.attach to static nested classes
  • ... and 103 more: https://git.openjdk.java.net/jdk/compare/8a4d2b4aa76e6aae1cb27f476c6cc71dcd9779f0...master

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready label Oct 15, 2021
Copy link
Contributor

@coleenp coleenp left a comment

Looks good. Thank you!

@stefank
Copy link
Member Author

@stefank stefank commented Oct 18, 2021

Thanks for reviewing!
/integrate

@openjdk
Copy link

@openjdk openjdk bot commented Oct 18, 2021

Going to push as commit bb7dacd.
Since your change was applied there have been 122 commits pushed to the master branch:

  • 3150069: 8271949: dumppath in -XX:FlightRecorderOptions does not affect
  • bfcf6a2: 8275277: assert(dest_attr.is_in_cset() == (obj->forwardee() == obj)) failed: Only evac-failed objects must be in the collection set here but is not
  • 96fef40: 8189591: No way to locally suppress doclint warnings
  • 7fc3a8d: 8275149: (ch) ReadableByteChannel returned by Channels.newChannel(InputStream) throws ReadOnlyBufferException
  • 831802d: 8275163: Deflater::deflate methods omit javadoc for ReadOnlyBufferException
  • ad9e234: 8275145: file.encoding system property has an incorrect value on Windows
  • f178185: 8275249: Suppress warnings on non-serializable array component types in jdk.jlink
  • ee64ce9: 8274937: Revert the timeout setting for DynamicLoaderConstraintsTest
  • 8c4da9c: 8275013: Improve discussion of serialization method declarations in java.io.Object{Input, Output}Stream
  • da8da3a: 8269698: Specification for methods of java.awt.im.InputContext should mention that they do nothing
  • ... and 112 more: https://git.openjdk.java.net/jdk/compare/8a4d2b4aa76e6aae1cb27f476c6cc71dcd9779f0...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Oct 18, 2021
@openjdk openjdk bot added integrated and removed ready rfr labels Oct 18, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Oct 18, 2021

@stefank Pushed as commit bb7dacd.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@stefank stefank deleted the 8275334_separate_class_loading_events_hs_err_section branch Jan 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot integrated
3 participants