Granulate / gprofiler

gProfiler is a system-wide profiler, combining multiple sampling profilers to produce unified visualization of what your CPU is spending time on.
https://profiler.granulate.io
Apache License 2.0
743 stars 54 forks source link

Collect "stripped" / "not stripped" in metadata for Golang binaries #804

Closed Jongy closed 1 year ago

Jongy commented 1 year ago

For golang processes, we collect (golang version, libc, link) as metadata. It'll be useful to collect the "stripped" / "not stripped" status (per reported by file), to help debugging cases where symbols are missing due to stripping.

$ file /bin/ls
/bin/ls: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=897f49cafa98c11d63e619e7e40352f855249c13, for GNU/Linux 3.2.0, stripped

so my ls is stripped. Do not implement by actually running file, though - use pyelftools like we currently use it, to find the information file looks at, and add a filed stripped: boolean in the metadata.