mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
perf tools: Get rid of dso__needs_decompress() call in symbol__disassemble()
There's no need to call dso__needs_decompress() twice in the function. Signed-off-by: Jiri Olsa <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: David Ahern <[email protected]> Cc: Michael Petlan <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[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
bcd4287ead
commit
2354ae9bdc
1 changed files with 3 additions and 1 deletions
|
|
@ -1629,6 +1629,7 @@ static int symbol__disassemble(struct symbol *sym, struct annotate_args *args)
|
|||
char symfs_filename[PATH_MAX];
|
||||
struct kcore_extract kce;
|
||||
bool delete_extract = false;
|
||||
bool decomp = false;
|
||||
int stdout_fd[2];
|
||||
int lineno = 0;
|
||||
int nline;
|
||||
|
|
@ -1662,6 +1663,7 @@ static int symbol__disassemble(struct symbol *sym, struct annotate_args *args)
|
|||
tmp, sizeof(tmp)) < 0)
|
||||
goto out;
|
||||
|
||||
decomp = true;
|
||||
strcpy(symfs_filename, tmp);
|
||||
}
|
||||
|
||||
|
|
@ -1748,7 +1750,7 @@ out_free_command:
|
|||
out_remove_tmp:
|
||||
close(stdout_fd[0]);
|
||||
|
||||
if (dso__needs_decompress(dso))
|
||||
if (decomp)
|
||||
unlink(symfs_filename);
|
||||
|
||||
if (delete_extract)
|
||||
|
|
|
|||
Loading…
Reference in a new issue