This repository has been archived by the owner on Jan 21, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Add root frame with executable path when available (PROF-9924) #12
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Gandem
force-pushed
the
nayef/file-path-frame
branch
5 times, most recently
from
June 11, 2024 15:54
37a7f30
to
2a0ffef
Compare
Gandem
changed the title
Add additional frame with executable path when available
Add additional frame with executable path when available (PROF-9924)
Jun 11, 2024
Gandem
changed the title
Add additional frame with executable path when available (PROF-9924)
Add root frame with executable path when available (PROF-9924)
Jun 11, 2024
Gandem
force-pushed
the
nayef/file-path-frame
branch
from
June 11, 2024 16:17
2a0ffef
to
d0a485a
Compare
Gandem
force-pushed
the
nayef/file-path-frame
branch
from
June 11, 2024 16:29
d0a485a
to
5adaf07
Compare
r1viollet
reviewed
Jun 12, 2024
r1viollet
previously approved these changes
Jun 12, 2024
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.
LGTM
I will be happy to try this out!
r1viollet
reviewed
Jun 12, 2024
also add the label in the datadog reported as well
Gandem
force-pushed
the
nayef/file-path-frame
branch
from
June 12, 2024 09:40
5adaf07
to
ef40d69
Compare
r1viollet
approved these changes
Jun 12, 2024
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.
LGTM
nsavoire
approved these changes
Jun 12, 2024
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.
LGTM !
Gandem
added a commit
that referenced
this pull request
Jun 26, 2024
* Add additional frame with executable path when available * datadog reporter: set different function name and executable name for root frame * reporter: rename pid label to process_id also add the label in the datadog reported as well
Gandem
added a commit
that referenced
this pull request
Jun 27, 2024
* Add additional frame with executable path when available * datadog reporter: set different function name and executable name for root frame * reporter: rename pid label to process_id also add the label in the datadog reported as well
Gandem
added a commit
that referenced
this pull request
Jun 28, 2024
* Add additional frame with executable path when available * datadog reporter: set different function name and executable name for root frame * reporter: rename pid label to process_id also add the label in the datadog reported as well
Gandem
added a commit
that referenced
this pull request
Jun 28, 2024
* Add additional frame with executable path when available * datadog reporter: set different function name and executable name for root frame * reporter: rename pid label to process_id also add the label in the datadog reported as well
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Objective / Motivation
Add a root frame with the path of the executable when the information is available.
How this is done
This is done in three steps.
First, we need to provide the reporter with the PID <-> Executable path name mapping. This is done by:
GetExecutablePath()
on the process object, that either returns the main executable for a core dump, or reads/proc/pid/exe
for live processes)SynchronizeProcess
, the process manager will callProcessMetadata
indicating which pid has which exec name.ProcessMetadata
calls.Then we need to have the PID for the sample we're currently producing. This is done by:
ReportCountForTrace
ReportCountForTrace
so that it includes the PID of the frame, this PID will be added to thetraceInfo
structure.Now we have the PID for each trace, and the PID <-> executable path mapping 🎉 🌮 We use this when producing the pprof in the datadog reporter:
This is an example profile link that showcases this working locally.
(Note that the java program present in that image is indeed launched via
ld
hence why we seeld
there)