-
Notifications
You must be signed in to change notification settings - Fork 70
java: async-profiler v2.5 and CPU mode with fdtransfer #175
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
7ed8c80 to
d7d12bd
Compare
|
Default to |
gprofiler/utils.py
Outdated
| # just wait for the process to exit | ||
| process.wait() | ||
| else: | ||
| assert communicate |
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.
assert with message?
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.
Done
|
AP build seems to fail in CI |
michelhe
left a comment
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.
.
|
Hehe didn't push it |
|
Re-ran, now it'll build successfully. |
If perf fails, then wait_for_file_by_prefix() will raise. This way, we'll see the output in either case.
gprofiler/profilers/perf.py
Outdated
| _mmap_size_fp = 129 # default number of pages used by "perf record" when perf_event_mlock_kb=516 | ||
| _mmap_size_dwarf = 257 # doubling the previous |
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.
cleaner
_mmap_sizes = { 'fp': 129, 'dwarf': 257 }
....
str(self._mmap_sizes[self._type])
|
Maybe now will pass? lol |
michelhe
left a comment
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.
kool
This is unsafe. It's not used now anyway - was added in #175 for fdtransfer, but since its only usage was removed
* utils: Add kwargs-only to run_process * utils: run_process(): Remove communicate arg - this is unsafe. It's not used now anyway - was added in #175 for fdtransfer, but since then its only usage was removed. * utils: reap_process(): Avoid wait() * utils: Extract reap_process() * php: use reap_process() * perf: use reap_process() * python_ebpf: Use reap_process() This possibly fixes #744.
Description
Bases on async-profiler/async-profiler#411 to use AP's CPU mode.
Motivation and Context
We'll have kernel stacks for profiled Java processes :)
How Has This Been Tested?
Locally.
I'll add some test as well.added a testChecklist: