Skip to content

perf tools: Use plain debug files for compressed objects

Jiri Olsa lkml 1 version Applied

Status from this message: Thanks, applied.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest13 patches 5 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/13perf tools: Get rid of dso__needs_decompress call in read_object_codetools/perf/tests/code-reading.c+3 -10 replies
2/13perf tools: Get rid of dso__needs_decompress call in symbol__disassembletools/perf/util/annotate.c+3 -10 replies
3/13perf tools: Get rid of dso__needs_decompress call in __open_dsotools/perf/util/dso.c+3 -10 replies
4/13perf tools: Make decompress_to_file function statictools/perf/util/dso.c tools/perf/util/dso.h+2 -20 replies
5/13perf tools: Make is_supported_compression function statictools/perf/util/dso.c tools/perf/util/dso.h+1 -20 replies
6/13perf tools: Add compression id into struct kmod_pathtools/perf/tests/kmod-path.c tools/perf/util/dso.c tools/perf/util/dso.h+33 -294 replies
7/13perf tools: Store compression id into struct dsotools/perf/util/dso.c tools/perf/util/dso.h tools/perf/util/machine.c+8 -20 replies
8/13perf tools: Use compression id in decompress_kmodule functiontools/perf/util/dso.c+3 -220 replies
9/13perf tools: Move the temp file processing into decompress_kmoduletools/perf/util/dso.c+12 -170 replies
10/13perf tools: Add is_compressed callback to compressions arraytools/perf/util/compress.h tools/perf/util/dso.c tools/perf/util/lzma.c +1 more+33 -30 replies
11/13perf tools: Add lzma_is_compressed functiontools/perf/util/lzma.c+17 -20 replies
12/13perf tools: Add gzip_is_compressed functiontools/perf/util/zlib.c+14 -20 replies
13/13perf tools: Remove ext from struct kmod_pathtools/perf/tests/kmod-path.c tools/perf/util/dso.c tools/perf/util/dso.h+69 -850 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/13] perf tools: Use plain debug files for compressed objects

hi,
currently we don't allow to open plain debug files for compressed kernel module objects, ending up with following warning:

  $ perf report --stdio
  lzma: failed The input is not in the .xz format
  lzma: failed The input is not in the .xz format
  lzma: failed The input is not in the .xz format
  lzma: failed The input is not in the .xz format
  # To display the perf.data header info, please use --header/--header-only options.

The reason is behind the logic we open the DSO object files, when we try all possible 'debug' objects until we find the data. So even if the DSO is represented by 'krava.xz' module, we can end up opening ~/.debug/....23432432/debug' file which is not compressed and we fail with above error.

This patchset adds the code to detect un/compressed files and return plain debug file when available even for compressed kernel modules.

Also available in here:
git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
perf/fixes

thanks,
jirka

---
Jiri Olsa (13):
perf tools: Get rid of dso__needs_decompress call in read_object_code perf tools: Get rid of dso__needs_decompress call in symbol__disassemble perf tools: Get rid of dso__needs_decompress call in __open_dso perf tools: Make decompress_to_file function static
perf tools: Make is_supported_compression function static perf tools: Add compression id into struct kmod_path
perf tools: Store compression id into struct dso
perf tools: Use compression id in decompress_kmodule function perf tools: Move the temp file processing into decompress_kmodule perf tools: Add is_compressed callback to compressions array perf tools: Add lzma_is_compressed function
perf tools: Add gzip_is_compressed function
perf tools: Remove ext from struct kmod_path

 tools/perf/tests/code-reading.c |   4 +++-
 tools/perf/tests/kmod-path.c    | 136 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------------------------------------------------------
 tools/perf/util/annotate.c      |   4 +++-
 tools/perf/util/compress.h      |   2 ++
 tools/perf/util/dso.c           | 111 ++++++++++++++++++++++++++++++++++++++++++++++++++-------------------------------------------------------
 tools/perf/util/dso.h           |  13 +++++--------
 tools/perf/util/lzma.c          |  20 +++++++++++++++++++
 tools/perf/util/machine.c       |   4 +++-
 tools/perf/util/zlib.c          |  18 +++++++++++++++++
 9 files changed, 172 insertions(+), 140 deletions(-)