Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

perf addr2line.c: Rename a2l_style to cmd_a2l_style

The a2l_style is only relevant to the command line version, so rename
to make this clearer.

Reviewed-by: James Clark <james.clark@linaro.org>
Signed-off-by: Ian Rogers <irogers@google.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Howard Chu <howardchu95@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephen Brennan <stephen.s.brennan@oracle.com>
Cc: Tony Jones <tonyj@suse.de>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Ian Rogers and committed by
Arnaldo Carvalho de Melo
ec942665 88c51002

+10 -10
+10 -10
tools/perf/util/addr2line.c
··· 90 90 return a2l; 91 91 } 92 92 93 - enum a2l_style { 93 + enum cmd_a2l_style { 94 94 BROKEN, 95 95 GNU_BINUTILS, 96 96 LLVM, 97 97 }; 98 98 99 - static enum a2l_style addr2line_configure(struct child_process *a2l, const char *dso_name) 99 + static enum cmd_a2l_style cmd_addr2line_configure(struct child_process *a2l, const char *dso_name) 100 100 { 101 101 static bool cached; 102 - static enum a2l_style style; 102 + static enum cmd_a2l_style style; 103 103 104 104 if (!cached) { 105 105 char buf[128]; ··· 149 149 } 150 150 151 151 static int read_addr2line_record(struct io *io, 152 - enum a2l_style style, 152 + enum cmd_a2l_style style, 153 153 const char *dso_name, 154 154 u64 addr, 155 155 bool first, ··· 298 298 char buf[128]; 299 299 ssize_t written; 300 300 struct io io = { .eof = false }; 301 - enum a2l_style a2l_style; 301 + enum cmd_a2l_style cmd_a2l_style; 302 302 303 303 if (!a2l) { 304 304 if (!filename__has_section(dso_name, ".debug_line")) ··· 314 314 pr_warning("%s %s: addr2line_subprocess_init failed\n", __func__, dso_name); 315 315 goto out; 316 316 } 317 - a2l_style = addr2line_configure(a2l, dso_name); 318 - if (a2l_style == BROKEN) 317 + cmd_a2l_style = cmd_addr2line_configure(a2l, dso_name); 318 + if (cmd_a2l_style == BROKEN) 319 319 goto out; 320 320 321 321 /* ··· 336 336 } 337 337 io__init(&io, a2l->out, buf, sizeof(buf)); 338 338 io.timeout_ms = addr2line_timeout_ms; 339 - switch (read_addr2line_record(&io, a2l_style, dso_name, addr, /*first=*/true, 339 + switch (read_addr2line_record(&io, cmd_a2l_style, dso_name, addr, /*first=*/true, 340 340 &record_function, &record_filename, &record_line_nr)) { 341 341 case -1: 342 342 if (!symbol_conf.disable_add2line_warn) ··· 351 351 * binutils, also force a non-zero address as we're no longer 352 352 * reading that record. 353 353 */ 354 - switch (read_addr2line_record(&io, a2l_style, dso_name, 354 + switch (read_addr2line_record(&io, cmd_a2l_style, dso_name, 355 355 /*addr=*/1, /*first=*/true, 356 356 NULL, NULL, NULL)) { 357 357 case -1: ··· 397 397 * as we're reading records beyond the first. 398 398 */ 399 399 while ((record_status = read_addr2line_record(&io, 400 - a2l_style, 400 + cmd_a2l_style, 401 401 dso_name, 402 402 /*addr=*/1, 403 403 /*first=*/false,