I've been using BCC to profile my code. As part of it I'm looking at the offset we get when using the sym() function, which gets a function name from an address and a pid, and optionally displays the offset.
I got the following results when profiling with the profile.py tool :
count1e8 offset 54
main offset 100
__libc_start_main offset 231
[unknown]
- profile (7446)
9
I tweaked the output a little bit to read the offset in base 10 instead of 16.
I do not understand what the offset mean in this context, the doc reads as 'instruction offset from the beginning of the symbol', but I can't match the offsets from the output with any files (source, asm, elf). How do I read count1e8 offset 54?
The goal would ultimately be to trace back this offset to either the ASM instruction or the source file line which originated this instruction.