otel-profiling-agent
otel-profiling-agent copied to clipboard
feat: Propagate the uprobe link into sample type
With #651 it is possible to attach uprobes, but their results are currently merged together. This PR introduces the use of cookies (available from kernel 5.15+) to keep track of the links that lead to the events being generated.
It now uses the symbol part of the uprobe link and propages it into the sample type. That is something that we currently don't do well enough.
So let's look at this example:
--uprobe-link /nix/store/r7pnxs3cfl3qxwacj38iakpm5v1ch6lz-glibc-2.40-66/lib/libc.so.6:malloc --uprobe-link /nix/store/r7pnxs3cfl3qxwacj38iakpm5v1ch6lz-glibc-2.40-66/lib/libc.so.6:open --uprobe-link /proc/4501/root/usr/lib/aarch64-linux-gnu/libc.so.6:open --uprobe-link /proc/4501/root/usr/lib/aarch64-linux-gnu/libc.so.6:malloc
There would be resulting two sample types
uprobe_malloc_events:countuprobe_open_events:count