Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

perf ui/gtk: Fix callchain display

With current output field change, GTK browser cannot display callchain
information correctly since it couldn't determine where the symbol
column is. This is a problem - just for now I changed to use the last
column since it'll work for most cases.

Also it has a same problem of the percentage as stdio code.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Arun Sharma <asharma@fb.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Link: http://lkml.kernel.org/r/1401335910-16832-25-git-send-email-namhyung@kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>

authored by

Namhyung Kim and committed by
Jiri Olsa
e4cf6f88 56772ad4

+9 -1
+9 -1
tools/perf/ui/gtk/hists.c
··· 198 198 if (perf_hpp__should_skip(fmt)) 199 199 continue; 200 200 201 + /* 202 + * XXX no way to determine where symcol column is.. 203 + * Just use last column for now. 204 + */ 205 + if (perf_hpp__is_sort_entry(fmt)) 206 + sym_col = col_idx; 207 + 201 208 fmt->header(fmt, &hpp, hists_to_evsel(hists)); 202 209 203 210 gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(view), ··· 260 253 261 254 if (symbol_conf.use_callchain && sort__has_sym) { 262 255 if (callchain_param.mode == CHAIN_GRAPH_REL) 263 - total = h->stat.period; 256 + total = symbol_conf.cumulate_callchain ? 257 + h->stat_acc->period : h->stat.period; 264 258 265 259 perf_gtk__add_callchain(&h->sorted_chain, store, &iter, 266 260 sym_col, total);