Skip to content
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

Move perf-map loading into the Process #36

Merged
merged 1 commit into from
Mar 21, 2023

Conversation

bnjbvr
Copy link
Contributor

@bnjbvr bnjbvr commented Mar 21, 2023

So I ran into a fun bug: the process I'm profiling has a self-update mechanism, so it would first start, find out there's an update, download it and restart itself (with the same PID). The perf map was loaded once for the first process; the whole Process is removed with the perf event indicating the execve event. Then the Process is recreated, but the perf map isn't reloaded, because we incorrectly marked it as already-loaded before.

This moves the code around so it's now the responsibility of the Process itself to keep track if it's already loaded the perf map or not, and we do check it once per lifetime of Process. This fixes the bug I was observing, and I can now see the perf maps correctly displayed in the Profiler UI 🥳

@mstange mstange merged commit a59b697 into mstange:main Mar 21, 2023
@mstange
Copy link
Owner

mstange commented Mar 21, 2023

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants