From: Namhyung Kim <namhyung....@lge.com>

Print accumulated stat of a hist entry if requested.

Cc: Arun Sharma <asha...@fb.com>
Cc: Frederic Weisbecker <fweis...@gmail.com>
Signed-off-by: Namhyung Kim <namhy...@kernel.org>
---
 tools/perf/ui/gtk/browser.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tools/perf/ui/gtk/browser.c b/tools/perf/ui/gtk/browser.c
index 7107edc6c08d..2fdd2f675194 100644
--- a/tools/perf/ui/gtk/browser.c
+++ b/tools/perf/ui/gtk/browser.c
@@ -53,6 +53,9 @@ static int perf_gtk__hpp_color_ ## _name(struct perf_hpp 
*hpp,                        \
        const char *markup;                                                     
\
        int ret = 0;                                                            
\
                                                                                
\
+       if (symbol_conf.cumulate_callchain)                                     
\
+               percent = 100.0 * he->stat_acc->_field / hpp->total_period;     
\
+                                                                               
\
        markup = perf_gtk__get_percent_color(percent);                          
\
        if (markup)                                                             
\
                ret += scnprintf(hpp->buf, hpp->size, "%s", markup);            
\
-- 
1.7.11.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to