diff options
author | Namhyung Kim <namhyung@kernel.org> | 2014-05-23 05:49:33 -0400 |
---|---|---|
committer | Jiri Olsa <jolsa@kernel.org> | 2014-06-01 08:35:09 -0400 |
commit | e4cf6f886f3158061fb589df9ed452f9b30f67f1 (patch) | |
tree | 5057b9c9ec108742064d623d648247835850686c | |
parent | 56772ad4750e23460a4b80f7ece5377d8c922ee1 (diff) |
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>
-rw-r--r-- | tools/perf/ui/gtk/hists.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tools/perf/ui/gtk/hists.c b/tools/perf/ui/gtk/hists.c index 03d6812d25dd..6ca60e482cdc 100644 --- a/tools/perf/ui/gtk/hists.c +++ b/tools/perf/ui/gtk/hists.c | |||
@@ -198,6 +198,13 @@ static void perf_gtk__show_hists(GtkWidget *window, struct hists *hists, | |||
198 | if (perf_hpp__should_skip(fmt)) | 198 | if (perf_hpp__should_skip(fmt)) |
199 | continue; | 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 | fmt->header(fmt, &hpp, hists_to_evsel(hists)); | 208 | fmt->header(fmt, &hpp, hists_to_evsel(hists)); |
202 | 209 | ||
203 | gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(view), | 210 | gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(view), |
@@ -253,7 +260,8 @@ static void perf_gtk__show_hists(GtkWidget *window, struct hists *hists, | |||
253 | 260 | ||
254 | if (symbol_conf.use_callchain && sort__has_sym) { | 261 | if (symbol_conf.use_callchain && sort__has_sym) { |
255 | if (callchain_param.mode == CHAIN_GRAPH_REL) | 262 | if (callchain_param.mode == CHAIN_GRAPH_REL) |
256 | total = h->stat.period; | 263 | total = symbol_conf.cumulate_callchain ? |
264 | h->stat_acc->period : h->stat.period; | ||
257 | 265 | ||
258 | perf_gtk__add_callchain(&h->sorted_chain, store, &iter, | 266 | perf_gtk__add_callchain(&h->sorted_chain, store, &iter, |
259 | sym_col, total); | 267 | sym_col, total); |