From: Namhyung Kim Date: Thu, 24 Apr 2014 07:44:16 +0000 (+0900) Subject: perf hists: Collapse expanded callchains after filter is applied X-Git-Tag: firefly_0821_release~176^2~3763^2~33^2~6 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=87e90f43285f4096e9ba5fc18b05c2e04caf3fab;p=firefly-linux-kernel-4.4.55.git perf hists: Collapse expanded callchains after filter is applied When a filter is applied a hist entry checks whether its callchain was folded and account it to the output stat. But this is rather hacky and only TUI-specific. Simply fold the callchains for the entry looks like a simpler and more generic solution IMHO. Signed-off-by: Namhyung Kim Link: http://lkml.kernel.org/r/1398327843-31845-6-git-send-email-namhyung@kernel.org Signed-off-by: Jiri Olsa --- diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c index b675857883a2..8d5cfcc3bc63 100644 --- a/tools/perf/util/hist.c +++ b/tools/perf/util/hist.c @@ -716,8 +716,8 @@ static void hists__remove_entry_filter(struct hists *hists, struct hist_entry *h if (h->filtered) return; - if (h->ms.unfolded) - hists->nr_non_filtered_entries += h->nr_rows; + /* force fold unfiltered entry for simplicity */ + h->ms.unfolded = false; h->row_offset = 0; hists->stats.nr_non_filtered_samples += h->stat.nr_events;