-
Notifications
You must be signed in to change notification settings - Fork 6.1k
8369219: JNI::RegisterNatives causes a memory leak in CodeCache #27742
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
base: master
Are you sure you want to change the base?
Conversation
👋 Welcome back fandreuzzi! A progress list of the required criteria for merging this PR into |
❗ This change is not yet ready to be integrated. |
Webrevs
|
test/hotspot/jtreg/gc/NativeWrapperCollection/TestNativeWrapperCollection.java
Show resolved
Hide resolved
/label add hotspot-compiler |
@dholmes-ora |
// nmethods that don't seem to be all that relevant any longer. | ||
bool nmethod::is_cold() { | ||
if (!MethodFlushing || is_native_method() || is_not_installed()) { | ||
if (!MethodFlushing || (is_native_method() && is_in_use()) || is_not_installed()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I guess we need to decide what to do about native wrappers that are still "in use", but are "cold" because they haven't been called in a while. The above change would keep them around forever. We could instead allow them to be cleaned up like regular nmethods.
I propose to amend
nmethod::is_cold
to let GC collect not-entrant nativenmethod
instances.Passes tier1 and tier2 (fastdebug).
Progress
Issue
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/27742/head:pull/27742
$ git checkout pull/27742
Update a local copy of the PR:
$ git checkout pull/27742
$ git pull https://git.openjdk.org/jdk.git pull/27742/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 27742
View PR using the GUI difftool:
$ git pr show -t 27742
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/27742.diff
Using Webrev
Link to Webrev Comment