Commit Graph

8 Commits

Author SHA1 Message Date
b2a48fe38d libsysprof-analyze: kallsyms constructor with provided file
This allows parsing a kallsyms file that is provided by the application.
Such use could be necessary if a capture did not embed /proc/kallsyms.gz.
2023-05-23 11:03:34 -07:00
fd69b1051c libsysprof-analyze: add fallback Kernel symbols
If we fail to load a /proc/kallsyms.gz from the capture file, we can still
provide an "In Kernel+address" symbol. I prefer this to force loading the
kallsyms from the current system because that:

 1. Requires privileged access and therefore means potentially an
    authorization dialog.
 2. May not even be from the same system that the capture was recorded
    leading to incorrect symbolization.
2023-05-23 10:57:26 -07:00
22828daad1 libsysprof-anzlyze: deduplicate and sort kernel address ranges
Turns out we do need this, and we cannot trust kallsyms all that much even
from duplicated entries on immediate next lines.
2023-05-15 14:31:18 -07:00
65318afa51 libsysprof-analyze: use define for final address range 2023-05-15 14:30:29 -07:00
131d9fba29 libsysprof-analyze: implement kallsyms symbolizer
This does a simple binary search across the parsed kallsyms using the
addresses we've parsed. We need to be sure we've created the array properly
so that our bounds checking will prevent infinite loops in the tight
binary search loop.
2023-05-15 13:32:34 -07:00
525b30a42f libsysprof-analyze: give symbolizer access to address context
The kallsym symbol resolver will need this to short-circuit unless we're
within a kernel address context.
2023-05-15 13:07:48 -07:00
c6135ac538 libsysprof-analyze: parse embedded /proc/kallsyms.gz
This is useful so that even if we do not get __symbols__ in the capture
file we can decode symbols from the target machine.
2023-05-15 13:03:46 -07:00
a27f700c06 libsysprof-analyze: add scaffolding for kallsyms parsing
We will want to start embedding this content in the capture file (but
after gzipping it as it's otherwise quite large). This will get things in
place so that we can parse that .gz file into the address ranges and
decode symbols found within the capture file.
2023-05-14 18:45:03 -07:00