summaryrefslogtreecommitdiff
path: root/tools/perf/util/annotate.h
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2023-03-29 02:55:41 +0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2023-04-04 15:39:56 +0300
commit56d9117c5004e7192d8062da67fef220e4fdcd19 (patch)
tree065234f28e25cabfb0a12f17da5f9c0e3c6e6871 /tools/perf/util/annotate.h
parent217b7d41ea2038e52991b7a600a0b958330d8ae6 (diff)
downloadlinux-56d9117c5004e7192d8062da67fef220e4fdcd19.tar.xz
perf annotate: Own objdump_path and disassembler_style strings
Make struct annotation_options own the strings objdump_path and disassembler_style, freeing them on exit. Add missing strdup for disassembler_style when read from a config file. Committer notes: Converted free(obj->member) to zfree(&obj->member) in annotation_options__exit() Signed-off-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Andres Freund <andres@anarazel.de> Cc: German Gomez <german.gomez@arm.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@arm.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Nathan Chancellor <nathan@kernel.org> Cc: Nick Desaulniers <ndesaulniers@google.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Sandipan Das <sandipan.das@amd.com> Cc: Tom Rix <trix@redhat.com> Cc: llvm@lists.linux.dev Link: https://lore.kernel.org/r/20230328235543.1082207-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/annotate.h')
-rw-r--r--tools/perf/util/annotate.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/util/annotate.h b/tools/perf/util/annotate.h
index e7238c694465..1c6335b8333a 100644
--- a/tools/perf/util/annotate.h
+++ b/tools/perf/util/annotate.h
@@ -94,8 +94,8 @@ struct annotation_options {
int min_pcnt;
int max_lines;
int context;
- const char *objdump_path;
- const char *disassembler_style;
+ char *objdump_path;
+ char *disassembler_style;
const char *prefix;
const char *prefix_strip;
unsigned int percent_type;