diff options
Diffstat (limited to 'tools/perf/ui/gtk/hists.c')
-rw-r--r-- | tools/perf/ui/gtk/hists.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/tools/perf/ui/gtk/hists.c b/tools/perf/ui/gtk/hists.c index 6f259b3d14e2..9708dd5fb8f3 100644 --- a/tools/perf/ui/gtk/hists.c +++ b/tools/perf/ui/gtk/hists.c | |||
@@ -124,7 +124,8 @@ void perf_gtk__init_hpp(void) | |||
124 | perf_gtk__hpp_color_overhead_guest_us; | 124 | perf_gtk__hpp_color_overhead_guest_us; |
125 | } | 125 | } |
126 | 126 | ||
127 | static void perf_gtk__show_hists(GtkWidget *window, struct hists *hists) | 127 | static void perf_gtk__show_hists(GtkWidget *window, struct hists *hists, |
128 | float min_pcnt) | ||
128 | { | 129 | { |
129 | struct perf_hpp_fmt *fmt; | 130 | struct perf_hpp_fmt *fmt; |
130 | GType col_types[MAX_COLUMNS]; | 131 | GType col_types[MAX_COLUMNS]; |
@@ -189,10 +190,15 @@ static void perf_gtk__show_hists(GtkWidget *window, struct hists *hists) | |||
189 | for (nd = rb_first(&hists->entries); nd; nd = rb_next(nd)) { | 190 | for (nd = rb_first(&hists->entries); nd; nd = rb_next(nd)) { |
190 | struct hist_entry *h = rb_entry(nd, struct hist_entry, rb_node); | 191 | struct hist_entry *h = rb_entry(nd, struct hist_entry, rb_node); |
191 | GtkTreeIter iter; | 192 | GtkTreeIter iter; |
193 | float percent = h->stat.period * 100.0 / | ||
194 | hists->stats.total_period; | ||
192 | 195 | ||
193 | if (h->filtered) | 196 | if (h->filtered) |
194 | continue; | 197 | continue; |
195 | 198 | ||
199 | if (percent < min_pcnt) | ||
200 | continue; | ||
201 | |||
196 | gtk_list_store_append(store, &iter); | 202 | gtk_list_store_append(store, &iter); |
197 | 203 | ||
198 | col_idx = 0; | 204 | col_idx = 0; |
@@ -222,7 +228,8 @@ static void perf_gtk__show_hists(GtkWidget *window, struct hists *hists) | |||
222 | 228 | ||
223 | int perf_evlist__gtk_browse_hists(struct perf_evlist *evlist, | 229 | int perf_evlist__gtk_browse_hists(struct perf_evlist *evlist, |
224 | const char *help, | 230 | const char *help, |
225 | struct hist_browser_timer *hbt __maybe_unused) | 231 | struct hist_browser_timer *hbt __maybe_unused, |
232 | float min_pcnt) | ||
226 | { | 233 | { |
227 | struct perf_evsel *pos; | 234 | struct perf_evsel *pos; |
228 | GtkWidget *vbox; | 235 | GtkWidget *vbox; |
@@ -286,7 +293,7 @@ int perf_evlist__gtk_browse_hists(struct perf_evlist *evlist, | |||
286 | GTK_POLICY_AUTOMATIC, | 293 | GTK_POLICY_AUTOMATIC, |
287 | GTK_POLICY_AUTOMATIC); | 294 | GTK_POLICY_AUTOMATIC); |
288 | 295 | ||
289 | perf_gtk__show_hists(scrolled_window, hists); | 296 | perf_gtk__show_hists(scrolled_window, hists, min_pcnt); |
290 | 297 | ||
291 | tab_label = gtk_label_new(evname); | 298 | tab_label = gtk_label_new(evname); |
292 | 299 | ||