lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20171129121613.85f25039192164225b70da68@kernel.org>
Date:   Wed, 29 Nov 2017 12:16:13 +0900
From:   Masami Hiramatsu <mhiramat@...nel.org>
To:     Andi Kleen <andi@...stfloor.org>
Cc:     acme@...nel.org, jolsa@...nel.org, mhiramat@...nel.org,
        adrian.hunter@...el.com, linux-kernel@...r.kernel.org,
        Andi Kleen <ak@...ux.intel.com>
Subject: Re: [PATCH 08/12] perf, tools: Always print probe finder warnings
 with -v

On Mon, 27 Nov 2017 16:23:17 -0800
Andi Kleen <andi@...stfloor.org> wrote:

> From: Andi Kleen <ak@...ux.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@...ux.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@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ