perf symbol: Properly seto DSO binary/symtab types
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v5 Latest11 patches 9 repliesIn review
- v410 patches 3 repliesSuperseded
- v310 patches 4 repliesSuperseded
Earlier versions · 2
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v2 | 10 patches | 7 replies | Superseded | |
| v1 | 7 patches | 2 replies | Superseded |
Patches in v5 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/11 | perf tools: Remove redundant dso data inittools/ | +0 | 0 replies | |
| 2/11 | perf tools: Check ELF section type with nametools/ | +2 | 1 reply | |
| 3/11 | perf tools: Try linked debug files for DSO debug infotools/ | +1 | 1 reply | |
| 4/11 | perf symbol: Update symtab type of vmlinux from build-id cachetools/ | +4 | 0 replies | |
| 5/11 | perf symbol: Set binary/symtab type for split kallsymstools/ | +7 | 0 replies | |
| 6/11 | perf symbol: Get rid of machine_or_dso_e_machine()tools/ | +3 | 1 reply | |
| 7/11 | perf tools: Factor out dso__find_binary_type()tools/ tools/ | +139 | 5 replies | |
| 8/11 | perf symbol: Set binary type for JIT map DSOstools/ | +1 | 0 replies | |
| 9/11 | perf symbol: Do not set binary type from symtab typetools/ tools/ | +2 | 1 reply | |
| 10/11 | perf annotate: Simplify symbol__disassemble() with dso binary_typetools/ | +24 | 0 replies | |
| 11/11 | perf test: Fix dso data teststools/ | +7 | 0 replies |
Reviews trailers per patch
10 of 11 patches have a Reviewed-by or Acked-by.
| Patch | Ian Rogers |
|---|---|
| 1/11 | R-b |
| 2/11 | |
| 3/11 | R-b |
| 4/11 | R-b |
| 5/11 | R-b |
| 6/11 | R-b |
| 7/11 | R-b |
| 8/11 | R-b |
| 9/11 | R-b |
| 10/11 | R-b |
| 11/11 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v5 00/11] perf symbol: Properly seto DSO binary/symtab types
Hello,
Currently we have 3 types for a DSO.
* binary type: determines where to read binary instruction or data of the DSO. Basically used by annotate. Some (special) DSOs like kallsyms or JIT may not have the data though.
* symtab type: determines where to read symbol tables. Set when symbols in the DSO are loaded.
* debug info type: determines where to read debug info. Used by srcline, DWARF unwinding, data type profiling and so on. Often debug info is saved in a separate file.
Some DSOs may have the same type for 3 and others can have all different. Previously it generally assumed binary type would be same as symtab type but now I think we should not and only set the binary type as it's used.
Also it should make sure that symtab type is set properly after loading symbols in the DSO.
Probably this patchset won't make any practical difference in runtime behaviors but I think it's good to track them accurately.
v5 changes)
* reset errno before dso__get_filename()
* check ELF section type being SHT_PROGBITS
v4: https://lore.kernel.org/r/[email protected]
* add Ian's Reviewed-by tags
* make sure to grab _dso__data_open_lock only once
* check open file count before closing the cache
* clear errno so that it won't have a stale value
v3: https://lore.kernel.org/r/[email protected]
* set KALLSYM type for split kallsyms DSOs
* take dso lock in dso__find_binary_type()
* handle EMFILE failures in dso__find_binary_type()
* drop the libbfd change as it need a separate patchset
* lookup binary type in dso__e_machine_endian()
* get rid of machine_or_dso_e_machine() due to a lock problem
* fixed a bug symbol__disassemble() for BPF and kcore
v2: https://lore.kernel.org/r/[email protected]
* add dso__find_binary_type() for checking ".text" section
* make perf annotate use the dso's binary type directly
v1: https://lore.kernel.org/r/[email protected]
Thanks,
Namhyung
Namhyung Kim (11):
perf tools: Remove redundant dso data init
perf tools: Check ELF section type with name
perf tools: Try linked debug files for DSO debug info perf symbol: Update symtab type of vmlinux from build-id cache perf symbol: Set binary/symtab type for split kallsyms perf symbol: Get rid of machine_or_dso_e_machine()
perf tools: Factor out dso__find_binary_type()
perf symbol: Set binary type for JIT map DSOs
perf symbol: Do not set binary type from symtab type perf annotate: Simplify symbol__disassemble() with dso binary_type perf test: Fix dso data tests
tools/perf/tests/dso-data.c | 7 ++ tools/perf/util/disasm.c | 124 ++++++------------------------ tools/perf/util/dso.c | 144 +++++++++++++++++++++++++++++++---- tools/perf/util/dso.h | 13 ++++ tools/perf/util/symbol-elf.c | 3 +- tools/perf/util/symbol.c | 50 ++++-------- 6 files changed, 190 insertions(+), 151 deletions(-)
Signature · 1 line
2.56.0.385.gd3acb90ef8-goog