diff options
| author | Namhyung Kim <namhyung@kernel.org> | 2014-04-22 01:05:35 -0400 |
|---|---|---|
| committer | Jiri Olsa <jolsa@kernel.org> | 2014-04-24 10:33:47 -0400 |
| commit | 112f761fc0b43def377af889f8cd242df6af9e34 (patch) | |
| tree | dd7d669e892b69dbbad323d6515e4ab3f0da6562 | |
| parent | c481f9301183260a78e55fa4d70d977b68c81846 (diff) | |
perf ui/tui: Rename hist_browser__update_nr_entries()
Rename ->nr_pcnt_entries and hist_browser__update_pcnt_entries() to
->nr_non_filtered_entries and hist_browser__update_nr_entries() since
it's now used for filtering as well.
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/r/1398327843-31845-10-git-send-email-namhyung@kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
| -rw-r--r-- | tools/perf/ui/browsers/hists.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c index 311226edae12..769295bf2c10 100644 --- a/tools/perf/ui/browsers/hists.c +++ b/tools/perf/ui/browsers/hists.c | |||
| @@ -26,13 +26,14 @@ struct hist_browser { | |||
| 26 | int print_seq; | 26 | int print_seq; |
| 27 | bool show_dso; | 27 | bool show_dso; |
| 28 | float min_pcnt; | 28 | float min_pcnt; |
| 29 | u64 nr_pcnt_entries; | 29 | u64 nr_non_filtered_entries; |
| 30 | }; | 30 | }; |
| 31 | 31 | ||
| 32 | extern void hist_browser__init_hpp(void); | 32 | extern void hist_browser__init_hpp(void); |
| 33 | 33 | ||
| 34 | static int hists__browser_title(struct hists *hists, char *bf, size_t size, | 34 | static int hists__browser_title(struct hists *hists, char *bf, size_t size, |
| 35 | const char *ev_name); | 35 | const char *ev_name); |
| 36 | static void hist_browser__update_nr_entries(struct hist_browser *hb); | ||
| 36 | 37 | ||
| 37 | static void hist_browser__refresh_dimensions(struct hist_browser *browser) | 38 | static void hist_browser__refresh_dimensions(struct hist_browser *browser) |
| 38 | { | 39 | { |
| @@ -310,8 +311,6 @@ static void ui_browser__warn_lost_events(struct ui_browser *browser) | |||
| 310 | "Or reduce the sampling frequency."); | 311 | "Or reduce the sampling frequency."); |
| 311 | } | 312 | } |
| 312 | 313 | ||
| 313 | static void hist_browser__update_pcnt_entries(struct hist_browser *hb); | ||
| 314 | |||
| 315 | static int hist_browser__run(struct hist_browser *browser, const char *ev_name, | 314 | static int hist_browser__run(struct hist_browser *browser, const char *ev_name, |
| 316 | struct hist_browser_timer *hbt) | 315 | struct hist_browser_timer *hbt) |
| 317 | { | 316 | { |
| @@ -322,7 +321,7 @@ static int hist_browser__run(struct hist_browser *browser, const char *ev_name, | |||
| 322 | browser->b.entries = &browser->hists->entries; | 321 | browser->b.entries = &browser->hists->entries; |
| 323 | browser->b.nr_entries = browser->hists->nr_entries; | 322 | browser->b.nr_entries = browser->hists->nr_entries; |
| 324 | if (browser->min_pcnt) | 323 | if (browser->min_pcnt) |
| 325 | browser->b.nr_entries = browser->nr_pcnt_entries; | 324 | browser->b.nr_entries = browser->nr_non_filtered_entries; |
| 326 | 325 | ||
| 327 | hist_browser__refresh_dimensions(browser); | 326 | hist_browser__refresh_dimensions(browser); |
| 328 | hists__browser_title(browser->hists, title, sizeof(title), ev_name); | 327 | hists__browser_title(browser->hists, title, sizeof(title), ev_name); |
| @@ -340,8 +339,8 @@ static int hist_browser__run(struct hist_browser *browser, const char *ev_name, | |||
| 340 | hbt->timer(hbt->arg); | 339 | hbt->timer(hbt->arg); |
| 341 | 340 | ||
| 342 | if (browser->min_pcnt) { | 341 | if (browser->min_pcnt) { |
| 343 | hist_browser__update_pcnt_entries(browser); | 342 | hist_browser__update_nr_entries(browser); |
| 344 | nr_entries = browser->nr_pcnt_entries; | 343 | nr_entries = browser->nr_non_filtered_entries; |
| 345 | } else { | 344 | } else { |
| 346 | nr_entries = browser->hists->nr_entries; | 345 | nr_entries = browser->hists->nr_entries; |
| 347 | } | 346 | } |
| @@ -1343,7 +1342,7 @@ close_file_and_continue: | |||
| 1343 | return ret; | 1342 | return ret; |
| 1344 | } | 1343 | } |
| 1345 | 1344 | ||
| 1346 | static void hist_browser__update_pcnt_entries(struct hist_browser *hb) | 1345 | static void hist_browser__update_nr_entries(struct hist_browser *hb) |
| 1347 | { | 1346 | { |
| 1348 | u64 nr_entries = 0; | 1347 | u64 nr_entries = 0; |
| 1349 | struct rb_node *nd = rb_first(&hb->hists->entries); | 1348 | struct rb_node *nd = rb_first(&hb->hists->entries); |
| @@ -1354,7 +1353,7 @@ static void hist_browser__update_pcnt_entries(struct hist_browser *hb) | |||
| 1354 | nd = rb_next(nd); | 1353 | nd = rb_next(nd); |
| 1355 | } | 1354 | } |
| 1356 | 1355 | ||
| 1357 | hb->nr_pcnt_entries = nr_entries; | 1356 | hb->nr_non_filtered_entries = nr_entries; |
| 1358 | } | 1357 | } |
| 1359 | 1358 | ||
| 1360 | static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events, | 1359 | static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events, |
| @@ -1411,7 +1410,7 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events, | |||
| 1411 | 1410 | ||
| 1412 | if (min_pcnt) { | 1411 | if (min_pcnt) { |
| 1413 | browser->min_pcnt = min_pcnt; | 1412 | browser->min_pcnt = min_pcnt; |
| 1414 | hist_browser__update_pcnt_entries(browser); | 1413 | hist_browser__update_nr_entries(browser); |
| 1415 | } | 1414 | } |
| 1416 | 1415 | ||
| 1417 | fstack = pstack__new(2); | 1416 | fstack = pstack__new(2); |
