Skip to content

Parse StartCode, EndCode, and StartStack in Proc.Stat() #659

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

Merged

Conversation

pgimalac
Copy link
Contributor

Add the following fields to the ProcStat type and read them from /proc/<pid>/stat in Proc.Stat():

  • StartCode
  • EndCode
  • StartStack

See fields 26, 27, and 28 in https://man7.org/linux/man-pages/man5/proc_pid_stat.5.html.

It enables categorizing regions from /proc/<pid>/maps depending on their address (ie. actual code vs something else, eg. memory mapped file).

Signed-off-by: Pierre Gimalac <pierre.gimalac@datadoghq.com>
@pgimalac pgimalac force-pushed the pgimalac/proc-stat-code-heap-fields branch from 15960ea to 1992644 Compare August 22, 2024 14:48
Copy link
Member

@discordianfish discordianfish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@SuperQ SuperQ merged commit ee6ea54 into prometheus:master Jul 3, 2025
8 checks passed
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.

3 participants