-
Notifications
You must be signed in to change notification settings - Fork 70
java: Show a "profiling skipped" stack when profiling is skipped for a process #263
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
Conversation
…profiled processes
Also change semantics - error -> skipped
82b8084 to
aa13fdb
Compare
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.
Minor comments, looks good.
I think you are also missing a test for bad/incompatible java version, but I understand if it is too hard to do and not worth it
We have |
Description
When profiling of a process is skipped by gProfiler for whatever reason, the following happens:
--perf-mode=none) - we won't see its stacks and we won't know it existed.perf(if any) when merging the stacks. So we'll see the native Java code, which is seldom interesting.This PR amends the Java profiler to return a specialized stack per "skip" case (safemode, AP already loaded in a process, ...). This way, the user sees the cause of the error immediately, and doesn't have to skim through the logs in order to understand. Also, it makes the skip explicit ("gProfiler found this process and decided to skip", instead of "maybe gProfiler missed it..."). Explicitness is good.
Motivation and Context
Make it easier to understand when & why gProfiler decides to skip Java profiling.
How Has This Been Tested?
java;[Profiling skipped: async-profiler is already loaded].java;[Profiling skipped: profiling this JVM is not supported].java;[Profiling skipped: disabled due to hserr]Automatic tests for all the above ^^