Skip to content

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
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