mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
perf tools: Decompress kernel module when reading DSO data
Currently perf decompresses kernel modules when loading the symbol table but it missed to do it when reading raw data. Signed-off-by: Namhyung Kim <[email protected]> Acked-by: Jiri Olsa <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: David Ahern <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Wang Nan <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
This commit is contained in:
parent
3c84fd5304
commit
1d6b3c9ba7
1 changed files with 16 additions and 0 deletions
|
|
@ -475,7 +475,23 @@ static int __open_dso(struct dso *dso, struct machine *machine)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (dso__needs_decompress(dso)) {
|
||||
char newpath[KMOD_DECOMP_LEN];
|
||||
size_t len = sizeof(newpath);
|
||||
|
||||
if (dso__decompress_kmodule_path(dso, name, newpath, len) < 0) {
|
||||
free(name);
|
||||
return -dso->load_errno;
|
||||
}
|
||||
|
||||
strcpy(name, newpath);
|
||||
}
|
||||
|
||||
fd = do_open(name);
|
||||
|
||||
if (dso__needs_decompress(dso))
|
||||
unlink(name);
|
||||
|
||||
free(name);
|
||||
return fd;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue