mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-04 09:34:12 +08:00
perf srcline: Conditionally suppress addr2line warnings
It has symbol_conf.disable_add2line_warn to suppress some warnings. Let's make it consistent with others. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Acked-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Leo Yan <leo.yan@linaro.org> Cc: Milian Wolff <milian.wolff@kdab.com> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20221215192817.2734573-6-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
3b27222dd6
commit
d5e33ce06b
@ -573,13 +573,15 @@ static int addr2line(const char *dso_name, u64 addr,
|
||||
* "??"/"??:0" lines.
|
||||
*/
|
||||
if (fprintf(a2l->to_child, "%016"PRIx64"\n,\n", addr) < 0 || fflush(a2l->to_child) != 0) {
|
||||
pr_warning("%s %s: could not send request\n", __func__, dso_name);
|
||||
if (!symbol_conf.disable_add2line_warn)
|
||||
pr_warning("%s %s: could not send request\n", __func__, dso_name);
|
||||
goto out;
|
||||
}
|
||||
|
||||
switch (read_addr2line_record(a2l, &record_function, &record_filename, &record_line_nr)) {
|
||||
case -1:
|
||||
pr_warning("%s %s: could not read first record\n", __func__, dso_name);
|
||||
if (!symbol_conf.disable_add2line_warn)
|
||||
pr_warning("%s %s: could not read first record\n", __func__, dso_name);
|
||||
goto out;
|
||||
case 0:
|
||||
/*
|
||||
@ -588,14 +590,17 @@ static int addr2line(const char *dso_name, u64 addr,
|
||||
*/
|
||||
switch (read_addr2line_record(a2l, NULL, NULL, NULL)) {
|
||||
case -1:
|
||||
pr_warning("%s %s: could not read delimiter record\n", __func__, dso_name);
|
||||
if (!symbol_conf.disable_add2line_warn)
|
||||
pr_warning("%s %s: could not read delimiter record\n",
|
||||
__func__, dso_name);
|
||||
break;
|
||||
case 0:
|
||||
/* As expected. */
|
||||
break;
|
||||
default:
|
||||
pr_warning("%s %s: unexpected record instead of sentinel",
|
||||
__func__, dso_name);
|
||||
if (!symbol_conf.disable_add2line_warn)
|
||||
pr_warning("%s %s: unexpected record instead of sentinel",
|
||||
__func__, dso_name);
|
||||
break;
|
||||
}
|
||||
goto out;
|
||||
|
Loading…
Reference in New Issue
Block a user