diff options
| author | Namhyung Kim <namhyung@kernel.org> | 2025-11-25 00:07:46 -0800 |
|---|---|---|
| committer | Namhyung Kim <namhyung@kernel.org> | 2025-12-02 16:06:57 -0800 |
| commit | 25d498e636d1f8d138d65246cfb5b1fc3069ca56 (patch) | |
| tree | b7d7b1c489e9f77f8c625b2baa60b50dd0f5ca19 /tools/perf/tests/shell/jitdump-python.sh | |
| parent | 44f6b44027910eb9e6e6a67840f818038946e24f (diff) | |
perf jitdump: Add sym/str-tables to build-ID generation
It was reported that python backtrace with JIT dump was broken after the
change to built-in SHA-1 implementation. It seems python generates the
same JIT code for each function. They will become separate DSOs but the
contents are the same. Only difference is in the symbol name.
But this caused a problem that every JIT'ed DSOs will have the same
build-ID which makes perf confused. And it resulted in no python
symbols (from JIT) in the output.
Looking back at the original code before the conversion, it used the
load_addr as well as the code section to distinguish each DSO. But it'd
be better to use contents of symtab and strtab instead as it aligns with
some linker behaviors.
This patch adds a buffer to save all the contents in a single place for
SHA-1 calculation. Probably we need to add sha1_update() or similar to
update the existing hash value with different contents and use it here.
But it's out of scope for this change and I'd like something that can be
backported to the stable trees easily.
Reviewed-by: Ian Rogers <irogers@google.com>
Cc: Eric Biggers <ebiggers@kernel.org>
Cc: Pablo Galindo <pablogsal@gmail.com>
Cc: Fangrui Song <maskray@sourceware.org>
Link: https://github.com/python/cpython/issues/139544
Fixes: e3f612c1d8f3945b ("perf genelf: Remove libcrypto dependency and use built-in sha1()")
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Diffstat (limited to 'tools/perf/tests/shell/jitdump-python.sh')
0 files changed, 0 insertions, 0 deletions
