[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <54C04A1B.8040408@gmail.com>
Date: Wed, 21 Jan 2015 17:53:47 -0700
From: David Ahern <dsahern@...il.com>
To: Victor Kamensky <victor.kamensky@...aro.org>,
Arnaldo Carvalho de Melo <acme@...nel.org>
CC: Namhyung Kim <namhyung@...nel.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Paul Mackerras <paulus@...ba.org>,
Ingo Molnar <mingo@...hat.com>,
Adrian Hunter <adrian.hunter@...el.com>,
Jiri Olsa <jolsa@...hat.com>,
Avi Kivity <avi@...udius-systems.com>,
Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
Anton Blanchard <anton@...ba.org>,
Will Deacon <will.deacon@....com>,
Dave Martin <Dave.Martin@....com>,
open list <linux-kernel@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
Jiri Olsa <jolsa@...nel.org>, Waiman Long <Waiman.Long@...com>
Subject: Re: [PATCH 2/2] perf symbols: debuglink should take symfs option
into account
On 1/21/15 5:34 PM, Victor Kamensky wrote:
> diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c
> index 45be944..ca8d8d5 100644
> --- a/tools/perf/util/dso.c
> +++ b/tools/perf/util/dso.c
> @@ -45,13 +45,13 @@ int dso__read_binary_type_filename(const struct dso *dso,
> case DSO_BINARY_TYPE__DEBUGLINK: {
> char *debuglink;
>
> - strncpy(filename, dso->long_name, size);
> - debuglink = filename + dso->long_name_len;
> + len = __symbol__join_symfs(filename, size, dso->long_name);
> + debuglink = filename + len;
> while (debuglink != filename && *debuglink != '/')
> debuglink--;
> if (*debuglink == '/')
> debuglink++;
> - ret = filename__read_debuglink(dso->long_name, debuglink,
> + ret = filename__read_debuglink(filename, debuglink,
> size - (debuglink - filename));
> }
> break;
>
I do not see any reason this will not work. Essentially after
filename__read_debuglink filename contains symfs + dso path + debuglink
read from .gnu_debuglink section which is what is wanted.
Thanks for the example. I used it with both a symfs and non-symfs
example and both times this change worked properly -- the correct
hang.debug file is read.
Arnaldo?
David
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists