From: Masami Hiramatsu <mhiramat@kernel.org>
To: Andi Kleen <andi@firstfloor.org>
Cc: acme@kernel.org, jolsa@kernel.org, mhiramat@kernel.org,
adrian.hunter@intel.com, linux-kernel@vger.kernel.org,
Andi Kleen <ak@linux.intel.com>
Subject: Re: [PATCH 08/12] perf, tools: Always print probe finder warnings with -v
Date: Wed, 29 Nov 2017 12:16:13 +0900 [thread overview]
Message-ID: <20171129121613.85f25039192164225b70da68@kernel.org> (raw)
In-Reply-To: <20171128002321.2878-9-andi@firstfloor.org>
On Mon, 27 Nov 2017 16:23:17 -0800
Andi Kleen <andi@firstfloor.org> wrote:
> From: Andi Kleen <ak@linux.intel.com>
>
> Normally perf script debug info resolution doesn't print
> warnings, but allow -v to override that. Useful for finding out why
> things don't work.
This must be done in call-site, since we don't need it clearly
in below case.
----
/* Try to find perf_probe_event with debuginfo */
static int try_to_find_probe_trace_events(struct perf_probe_event *pev,
struct probe_trace_event **tevs)
{
bool need_dwarf = perf_probe_event_need_dwarf(pev);
struct perf_probe_point tmp;
struct debuginfo *dinfo;
int ntevs, ret = 0;
dinfo = open_debuginfo(pev->target, pev->nsi, !need_dwarf);
----
Thanks,
>
> Signed-off-by: Andi Kleen <ak@linux.intel.com>
> ---
> tools/perf/util/probe-event.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
> index 4ef6ee967468..fb5031ac24a2 100644
> --- a/tools/perf/util/probe-event.c
> +++ b/tools/perf/util/probe-event.c
> @@ -482,7 +482,7 @@ static struct debuginfo *open_debuginfo(const char *module, struct nsinfo *nsi,
> strcpy(reason, "(unknown)");
> } else
> dso__strerror_load(dso, reason, STRERR_BUFSIZE);
> - if (!silent)
> + if (!silent || verbose)
> pr_err("Failed to find the path for %s: %s\n",
> module ?: "kernel", reason);
> return NULL;
> @@ -491,7 +491,7 @@ static struct debuginfo *open_debuginfo(const char *module, struct nsinfo *nsi,
> }
> nsinfo__mountns_enter(nsi, &nsc);
> ret = debuginfo__new(path);
> - if (!ret && !silent) {
> + if (!ret && (!silent || verbose)) {
> pr_warning("The %s file has no debug information.\n", path);
> if (!module || !strtailcmp(path, ".ko"))
> pr_warning("Rebuild with CONFIG_DEBUG_INFO=y, ");
> --
> 2.13.6
>
--
Masami Hiramatsu <mhiramat@kernel.org>
next prev parent reply other threads:[~2017-11-29 3:16 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-28 0:23 Implement dwarf variable/type resolving for perf script Andi Kleen
2017-11-28 0:23 ` [PATCH 01/12] perf, tools, pt: Clear instruction for ptwrite samples Andi Kleen
2017-11-28 0:23 ` [PATCH 02/12] perf, tools, script: Print insn/insnlen for non PT sample Andi Kleen
2017-11-28 0:23 ` [PATCH 03/12] perf, tools: Support storing additional data in strlist Andi Kleen
2017-11-28 13:31 ` Masami Hiramatsu
2017-11-28 0:23 ` [PATCH 04/12] perf, tools: Store variable name and register for dwarf variable lists Andi Kleen
2017-11-28 0:23 ` [PATCH 05/12] perf, tools, probe: Print location for resolved variables Andi Kleen
2017-11-29 1:19 ` Masami Hiramatsu
2017-11-28 0:23 ` [PATCH 06/12] perf, tools, probe: Support a quiet argument for debug info open Andi Kleen
2017-11-29 3:14 ` Masami Hiramatsu
2017-11-29 3:39 ` Andi Kleen
2017-11-30 2:36 ` Masami Hiramatsu
2017-11-28 0:23 ` [PATCH 07/12] perf, tools, script: Resolve variable names for registers Andi Kleen
2017-11-28 0:23 ` [PATCH 08/12] perf, tools: Always print probe finder warnings with -v Andi Kleen
2017-11-29 3:16 ` Masami Hiramatsu [this message]
2017-11-28 0:23 ` [PATCH 09/12] perf, tools: Downgrade register mapping message to warning Andi Kleen
2017-11-29 5:56 ` Masami Hiramatsu
2017-11-28 0:23 ` [PATCH 10/12] perf, tools: Add args and gprs shortcut for registers Andi Kleen
2017-11-28 0:23 ` [PATCH 11/12] perf, tools: Print probe warnings for binaries only once per binary Andi Kleen
2017-11-30 2:38 ` Masami Hiramatsu
2017-11-28 0:23 ` [PATCH 12/12] perf, tools, script: Implement dwarf resolving of instructions Andi Kleen
2017-12-01 2:36 ` Masami Hiramatsu
2017-11-28 5:31 ` Implement dwarf variable/type resolving for perf script Masami Hiramatsu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171129121613.85f25039192164225b70da68@kernel.org \
--to=mhiramat@kernel.org \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=ak@linux.intel.com \
--cc=andi@firstfloor.org \
--cc=jolsa@kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox