[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221215192817.2734573-6-namhyung@kernel.org>
Date: Thu, 15 Dec 2022 11:28:13 -0800
From: Namhyung Kim <namhyung@...nel.org>
To: Arnaldo Carvalho de Melo <acme@...nel.org>,
Jiri Olsa <jolsa@...nel.org>
Cc: Ingo Molnar <mingo@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
LKML <linux-kernel@...r.kernel.org>,
Ian Rogers <irogers@...gle.com>,
Adrian Hunter <adrian.hunter@...el.com>,
linux-perf-users@...r.kernel.org, Andi Kleen <ak@...ux.intel.com>,
Milian Wolff <milian.wolff@...b.com>,
Leo Yan <leo.yan@...aro.org>
Subject: [PATCH 5/9] 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@...nel.org>
---
tools/perf/util/srcline.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/tools/perf/util/srcline.c b/tools/perf/util/srcline.c
index 2c212e2e1b65..33321867416b 100644
--- a/tools/perf/util/srcline.c
+++ b/tools/perf/util/srcline.c
@@ -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;
--
2.39.0.314.g84b9a713c41-goog
Powered by blists - more mailing lists