lkml.org 
[lkml]   [2014]   [Nov]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 07/10] perf, tools: Only print base source file for srcline
Em Wed, Nov 12, 2014 at 06:05:25PM -0800, Andi Kleen escreveu:
> From: Andi Kleen <ak@linux.intel.com>
>
> For perf report with --sort srcline only print the base source file
> name. This makes the results generally fit much better to the
> screen. The path is usually not that useful anyways because it is
> often from different systems.

Applied

> Signed-off-by: Andi Kleen <ak@linux.intel.com>
> ---
> tools/perf/util/srcline.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/perf/util/srcline.c b/tools/perf/util/srcline.c
> index c6a7cdc..ac877f9 100644
> --- a/tools/perf/util/srcline.c
> +++ b/tools/perf/util/srcline.c
> @@ -274,7 +274,7 @@ char *get_srcline(struct dso *dso, unsigned long addr)
> if (!addr2line(dso_name, addr, &file, &line, dso))
> goto out;
>
> - if (asprintf(&srcline, "%s:%u", file, line) < 0) {
> + if (asprintf(&srcline, "%s:%u", basename(file), line) < 0) {
> free(file);
> goto out;
> }
> --
> 1.9.3


\
 
 \ /
  Last update: 2014-11-13 20:41    [W:0.220 / U:1.324 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site