* [PATCH] perf annotate: Don't prepend symfs path to build_id_filename
@ 2018-02-11 19:19 Martin Vuille
2018-03-09 19:07 ` Arnaldo Carvalho de Melo
0 siblings, 1 reply; 4+ messages in thread
From: Martin Vuille @ 2018-02-11 19:19 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo; +Cc: linux-perf-users, linux-kernel
build_id_filename already contains symfs path if applicable, so
don't prepend it a second time.
Signed-off-by: Martin Vuille <jpmv27@aim.com>
---
tools/perf/util/annotate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
index 28b233c3dcbe..425b7f0760ec 100644
--- a/tools/perf/util/annotate.c
+++ b/tools/perf/util/annotate.c
@@ -1381,7 +1381,7 @@ static int dso__disassemble_filename(struct dso *dso, char *filename, size_t fil
build_id_filename = dso__build_id_filename(dso, NULL, 0, false);
if (build_id_filename) {
- __symbol__join_symfs(filename, filename_size, build_id_filename);
+ scnprintf(filename, filename_size, "%s", build_id_filename);
free(build_id_filename);
} else {
if (dso->has_build_id)
--
2.13.6
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] perf annotate: Don't prepend symfs path to build_id_filename
2018-02-11 19:19 [PATCH] perf annotate: Don't prepend symfs path to build_id_filename Martin Vuille
@ 2018-03-09 19:07 ` Arnaldo Carvalho de Melo
2018-03-09 19:26 ` Martin Vuille
2018-03-13 15:24 ` Martin Vuille
0 siblings, 2 replies; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2018-03-09 19:07 UTC (permalink / raw)
To: Martin Vuille; +Cc: Arnaldo Carvalho de Melo, linux-perf-users, linux-kernel
Em Sun, Feb 11, 2018 at 02:19:37PM -0500, Martin Vuille escreveu:
> build_id_filename already contains symfs path if applicable, so
> don't prepend it a second time.
Where is the analysis that shows that that is the case? I looked here at
the implementation for dso__build_id_filename() and couldn't find where
was it that the symfs would be appended, can you clarify?
- Arnaldo
> Signed-off-by: Martin Vuille <jpmv27@aim.com>
> ---
> tools/perf/util/annotate.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
> index 28b233c3dcbe..425b7f0760ec 100644
> --- a/tools/perf/util/annotate.c
> +++ b/tools/perf/util/annotate.c
> @@ -1381,7 +1381,7 @@ static int dso__disassemble_filename(struct dso *dso, char *filename, size_t fil
>
> build_id_filename = dso__build_id_filename(dso, NULL, 0, false);
> if (build_id_filename) {
> - __symbol__join_symfs(filename, filename_size, build_id_filename);
> + scnprintf(filename, filename_size, "%s", build_id_filename);
> free(build_id_filename);
> } else {
> if (dso->has_build_id)
> --
> 2.13.6
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] perf annotate: Don't prepend symfs path to build_id_filename
2018-03-09 19:07 ` Arnaldo Carvalho de Melo
@ 2018-03-09 19:26 ` Martin Vuille
2018-03-13 15:24 ` Martin Vuille
1 sibling, 0 replies; 4+ messages in thread
From: Martin Vuille @ 2018-03-09 19:26 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: Arnaldo Carvalho de Melo, linux-perf-users, linux-kernel
dso__build_id_filename calls build_id_cache__linkname
build_id_cache__linkname uses buildid_dir
symbol__config_symfs includes the symfs directory in buildid_dir
So it's not necessary to prepend it again.
Should've included those notes in the original submission.
Will do better next time.
MV
On 03/09/18 14:07, Arnaldo Carvalho de Melo wrote:
> Em Sun, Feb 11, 2018 at 02:19:37PM -0500, Martin Vuille escreveu:
>> build_id_filename already contains symfs path if applicable, so
>> don't prepend it a second time.
> Where is the analysis that shows that that is the case? I looked here at
> the implementation for dso__build_id_filename() and couldn't find where
> was it that the symfs would be appended, can you clarify?
>
> - Arnaldo
>
>> Signed-off-by: Martin Vuille <jpmv27@aim.com>
>> ---
>> tools/perf/util/annotate.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
>> index 28b233c3dcbe..425b7f0760ec 100644
>> --- a/tools/perf/util/annotate.c
>> +++ b/tools/perf/util/annotate.c
>> @@ -1381,7 +1381,7 @@ static int dso__disassemble_filename(struct dso *dso, char *filename, size_t fil
>>
>> build_id_filename = dso__build_id_filename(dso, NULL, 0, false);
>> if (build_id_filename) {
>> - __symbol__join_symfs(filename, filename_size, build_id_filename);
>> + scnprintf(filename, filename_size, "%s", build_id_filename);
>> free(build_id_filename);
>> } else {
>> if (dso->has_build_id)
>> --
>> 2.13.6
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] perf annotate: Don't prepend symfs path to build_id_filename
2018-03-09 19:07 ` Arnaldo Carvalho de Melo
2018-03-09 19:26 ` Martin Vuille
@ 2018-03-13 15:24 ` Martin Vuille
1 sibling, 0 replies; 4+ messages in thread
From: Martin Vuille @ 2018-03-13 15:24 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: Arnaldo Carvalho de Melo, linux-perf-users, linux-kernel
On 03/09/18 14:07, Arnaldo Carvalho de Melo wrote:
> Em Sun, Feb 11, 2018 at 02:19:37PM -0500, Martin Vuille escreveu:
>> build_id_filename already contains symfs path if applicable, so
>> don't prepend it a second time.
> Where is the analysis that shows that that is the case? I looked here at
> the implementation for dso__build_id_filename() and couldn't find where
> was it that the symfs would be appended, can you clarify?
>
> - Arnaldo
>
Patch resubmitted with additional details in commit message:
https://patchwork.kernel.org/patch/10279077/
Regards,
MV
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-03-13 15:24 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-11 19:19 [PATCH] perf annotate: Don't prepend symfs path to build_id_filename Martin Vuille
2018-03-09 19:07 ` Arnaldo Carvalho de Melo
2018-03-09 19:26 ` Martin Vuille
2018-03-13 15:24 ` Martin Vuille
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).