-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8365729: JFR: provide event for Unsafe.allocateMemory #26834
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 stuefe! A progress list of the required criteria for merging this PR into |
|
❗ This change is not yet ready to be integrated. |
|
/label remove core-libs |
|
/label remove hotspot |
|
@tstuefe |
|
@tstuefe
|
|
@tstuefe |
|
@tstuefe |
|
@tstuefe this pull request can not be integrated into git checkout JFR-Unsafe.allocateMemory
git fetch https://git.openjdk.org/jdk.git master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push |
|
/keepalive |
|
@tstuefe The pull request is being re-evaluated and the inactivity timeout has been reset. |
A frequent scenario I encounter when analyzing native OOM scenarios at customers is that third-party libraries use Unsafe.allocateMemory to allocate chunks of native memory. Netty is one such example.
Typically, we can ascertain with NMT that yes, someone calls Unsafe.allocateMemory. But from then on, we fly blind. We have to guess since we don't have stack traces. Folks then start using tools like hooking in a different libc implementation (e.g. jemalloc) or asyncprofiler to continue analysis. Using tools may not be possible in production scenarios.
It would therefore be nice to have a JFR event for these events to enable this analysis with JFR.
There is one minor issue, though, that since this event is externally triggered, we cannot predict its frequency. Therefore, such an event should be throttleable and throttled by default.
Progress
Integration blocker
Issue
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/26834/head:pull/26834$ git checkout pull/26834Update a local copy of the PR:
$ git checkout pull/26834$ git pull https://git.openjdk.org/jdk.git pull/26834/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 26834View PR using the GUI difftool:
$ git pr show -t 26834Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/26834.diff