Closed burgerindividual closed 11 months ago
Can you show how your profiler is using this information, maybe with a screenshot?
The addresses you compute here are the start address of the "inline range" which contains the looked-up address. But is this information useful? A single inlined call may be compiled to multiple non-contiguous ranges of instructions, and you'll just get one arbitrary range here. There may be more instructions from the same call earlier on in the outer function.
I'm using the start address of the range to subtract from the address my profiler returns for a sample. Depending on where the instruction pointer is, it can generate different flamegraph stacks, rather than them being all combined on a callstack.
Oh, heh, I meant a screenshot of the output, e.g. of a flamegraph. Not a screenshot of the code :)
it can generate different flamegraph stacks, rather than them being all combined on a callstack.
I'm not sure I understand what you mean by that. Can you give an example?
Closing due to lack of response. Please let me know if this is still needed.
I needed this functionality for my profiler, and I thought it could potentially be useful to others. I'm not sure if my address calculation is exactly right, so that may need to be reviewed.