linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] perf annotate: Support of full source file paths for srcline fix
@ 2015-11-09 15:33 Michael Petlan
  2015-11-09 19:39 ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Petlan @ 2015-11-09 15:33 UTC (permalink / raw)
  To: linux-perf-users@vger.kernel.org


The --full-paths option did not show the full source file paths
in the perf annotate tool, because the value of the option was
not propagated into the related functions.

With this patch the value of the --full-paths option is known to
the function that composes the srcline string, so it prints the
full path when necessary.

Signed-off-by: Michael Petlan <mpetlan@redhat.com>
---
 tools/perf/util/annotate.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/perf/util/annotate.c b/tools/perf/util/annotate.c
index 0fc8d7a..cbf0fdb 100644
--- a/tools/perf/util/annotate.c
+++ b/tools/perf/util/annotate.c
@@ -1604,6 +1604,7 @@ int symbol__tty_annotate(struct symbol *sym, struct map *map,
 	len = symbol__size(sym);
 
 	if (print_lines) {
+		srcline_full_filename = full_paths;
 		symbol__get_source_line(sym, map, evsel, &source_line, len);
 		print_summary(&source_line, dso->long_name);
 	}
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread
* [PATCH] perf annotate: Support of full source file paths for srcline fix
@ 2015-11-09 15:33 Michael Petlan
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Petlan @ 2015-11-09 15:33 UTC (permalink / raw)
  To: linux-perf-users@vger.kernel.org

Hi all,

the commit a9710ba091b0dcdace90f791706e9192313ffb7c  has introduced
an option for showing basename/full path of the source files in the
perf report/script output. But regarding to perf annotate, the path
is always shown as basename,  since the value of the related option
is not propagated into the annotating mechanism.

This patch addresses it and enables perf-annotate to print the full
paths as well.

Tested with latest git version.

Regards,
Michael



Michael Petlan (1):
  perf annotate: Support of full source file paths for srcline fix

 tools/perf/util/annotate.c | 1 +
 1 file changed, 1 insertion(+)

-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-11-09 19:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-09 15:33 [PATCH] perf annotate: Support of full source file paths for srcline fix Michael Petlan
2015-11-09 19:39 ` Arnaldo Carvalho de Melo
  -- strict thread matches above, loose matches on Subject: below --
2015-11-09 15:33 Michael Petlan

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).