perf hists browser: Indicate which callchain entries are annotated
authorArnaldo Carvalho de Melo <[email protected]>
Thu, 19 Mar 2015 19:07:21 +0000 (16:07 -0300)
committerArnaldo Carvalho de Melo <[email protected]>
Sat, 21 Mar 2015 17:53:37 +0000 (14:53 -0300)
Now that we can annotate entries in a callchain, show which ones have an
associated symbol and samples, by adding a right arrow just before the
symbol name when in verbose mode.

To toggle verbose mode press 'V'.

Cc: Adrian Hunter <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: David Ahern <[email protected]>
Cc: Don Zickus <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Mike Galbraith <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Stephane Eranian <[email protected]>
Link: http://lkml.kernel.org/n/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
tools/perf/ui/browsers/hists.c

index cd7350aeb8e7b63604366b0dfdcb755bdd123d84..995b7a8596b1420e9764f08f18326d319f2a0a31 100644 (file)
@@ -511,6 +511,7 @@ static void hist_browser__show_callchain_entry(struct hist_browser *browser,
 {
        int color, width;
        char folded_sign = callchain_list__folded(chain);
+       bool show_annotated = browser->show_dso && chain->ms.sym && symbol__annotation(chain->ms.sym)->src;
 
        color = HE_COLORSET_NORMAL;
        width = browser->b.width - (offset + 2);
@@ -523,7 +524,8 @@ static void hist_browser__show_callchain_entry(struct hist_browser *browser,
        ui_browser__set_color(&browser->b, color);
        hist_browser__gotorc(browser, row, 0);
        slsmg_write_nstring(" ", offset);
-       slsmg_printf("%c ", folded_sign);
+       slsmg_printf("%c", folded_sign);
+       ui_browser__write_graph(&browser->b, show_annotated ? SLSMG_RARROW_CHAR : ' ');
        slsmg_write_nstring(str, width);
 }