Skip to content

Commit 6ba906f

Browse files
committed
Revert "perf tests: Decompress kernel module before objdump"
This reverts commit 7525a23 which is commit 94df104 upstream. It breaks the build of perf on 4.9.y, so I'm dropping it. Reported-by: Pavlos Parissis <[email protected]> Reported-by: Lei Chen <[email protected]> Reported-by: Maxime Hadjinlian <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: David Ahern <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Wang Nan <[email protected]> Cc: [email protected] Cc: Arnaldo Carvalho de Melo <[email protected]> Cc: Sasha Levin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 994baf8 commit 6ba906f

File tree

1 file changed

+1
-19
lines changed

1 file changed

+1
-19
lines changed

tools/perf/tests/code-reading.c

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,6 @@ static int read_object_code(u64 addr, size_t len, u8 cpumode,
224224
unsigned char buf2[BUFSZ];
225225
size_t ret_len;
226226
u64 objdump_addr;
227-
const char *objdump_name;
228-
char decomp_name[KMOD_DECOMP_LEN];
229227
int ret;
230228

231229
pr_debug("Reading object code for memory address: %#"PRIx64"\n", addr);
@@ -286,25 +284,9 @@ static int read_object_code(u64 addr, size_t len, u8 cpumode,
286284
state->done[state->done_cnt++] = al.map->start;
287285
}
288286

289-
objdump_name = al.map->dso->long_name;
290-
if (dso__needs_decompress(al.map->dso)) {
291-
if (dso__decompress_kmodule_path(al.map->dso, objdump_name,
292-
decomp_name,
293-
sizeof(decomp_name)) < 0) {
294-
pr_debug("decompression failed\n");
295-
return -1;
296-
}
297-
298-
objdump_name = decomp_name;
299-
}
300-
301287
/* Read the object code using objdump */
302288
objdump_addr = map__rip_2objdump(al.map, al.addr);
303-
ret = read_via_objdump(objdump_name, objdump_addr, buf2, len);
304-
305-
if (dso__needs_decompress(al.map->dso))
306-
unlink(objdump_name);
307-
289+
ret = read_via_objdump(al.map->dso->long_name, objdump_addr, buf2, len);
308290
if (ret > 0) {
309291
/*
310292
* The kernel maps are inaccurate - assume objdump is right in

0 commit comments

Comments
 (0)