GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — #1406, #1756: Parse only essential libraries at load time by apangin · Pull Request #1769 · async-profiler/async-profiler Conversation
Collaborator
Description
Related issues
Motivation and context
Parsing only the essential libraries makes agent load fast and guarantees How has this been tested?
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
|
There was an error while loading. Please reload this page.
linux-x64
linux-arm64
macos
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
change looks good to me, one small suggestion related to zing support
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| } | ||
|
|
||
| const char* base_name = strrchr(file, '/'); | ||
| return base_name != NULL && (strncmp(base_name + 1, "libjvm.", 7) == 0 || strncmp(base_name + 1, "libj9", 5) == 0); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I would vote to also give priority to some zing libs as well
https://github.com/async-profiler/async-profiler/blob/master/src/cpuEngine.cpp#L70
If the profiler is run with Zing it possible to hit the "Could not set pthread hook" error due to the fact that "libazsys" was never parsed
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the review. I remember about Zing libraries, but they are not a problem as far as I can see, since CpuEngine::setupThreadHook() is called from Profiler::start -> _engine->start() after the full library scan is made in Profiler::start(). Or am I missing something?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The problem is that due to the 2048 lib limit it's possible that this library is never parsed & skipped due to the mentioned limit
So #1756 won't be fixed
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
What I mean that in the full scan, this lib is at the end of the list so it might be skipped
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Ah, that's true. I've added libazsys to the early parsing phase too. Thanks for the right call!
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The change in symbols_macos.cpp is not really needed (no Zing on macOS), but it's harmless - I added it to keep files in sync.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The change in symbols_macos.cpp is not really needed (no Zing on macOS), but it's harmless - I added it to keep files in sync.
Was going to raise that, but yes I agree keeping the files in sync looks better & easier to understand the overall purpose
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Runtime attach fails on JVMs with many native libraries JVM application pauses when using asprof
There was an error while loading. Please reload this page.