diff options
-rw-r--r-- | tools/perf/ui/browsers/hists.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c index 85581cfb9112..a94eb0755e8b 100644 --- a/tools/perf/ui/browsers/hists.c +++ b/tools/perf/ui/browsers/hists.c | |||
@@ -639,7 +639,11 @@ int hist_browser__run(struct hist_browser *browser, const char *help, | |||
639 | switch (key) { | 639 | switch (key) { |
640 | case K_TIMER: { | 640 | case K_TIMER: { |
641 | u64 nr_entries; | 641 | u64 nr_entries; |
642 | hbt->timer(hbt->arg); | 642 | |
643 | WARN_ON_ONCE(!hbt); | ||
644 | |||
645 | if (hbt) | ||
646 | hbt->timer(hbt->arg); | ||
643 | 647 | ||
644 | if (hist_browser__has_filter(browser) || | 648 | if (hist_browser__has_filter(browser) || |
645 | symbol_conf.report_hierarchy) | 649 | symbol_conf.report_hierarchy) |
@@ -2821,7 +2825,7 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events, | |||
2821 | { | 2825 | { |
2822 | struct hists *hists = evsel__hists(evsel); | 2826 | struct hists *hists = evsel__hists(evsel); |
2823 | struct hist_browser *browser = perf_evsel_browser__new(evsel, hbt, env, annotation_opts); | 2827 | struct hist_browser *browser = perf_evsel_browser__new(evsel, hbt, env, annotation_opts); |
2824 | struct branch_info *bi; | 2828 | struct branch_info *bi = NULL; |
2825 | #define MAX_OPTIONS 16 | 2829 | #define MAX_OPTIONS 16 |
2826 | char *options[MAX_OPTIONS]; | 2830 | char *options[MAX_OPTIONS]; |
2827 | struct popup_action actions[MAX_OPTIONS]; | 2831 | struct popup_action actions[MAX_OPTIONS]; |
@@ -3087,7 +3091,9 @@ static int perf_evsel__hists_browse(struct perf_evsel *evsel, int nr_events, | |||
3087 | goto skip_annotation; | 3091 | goto skip_annotation; |
3088 | 3092 | ||
3089 | if (sort__mode == SORT_MODE__BRANCH) { | 3093 | if (sort__mode == SORT_MODE__BRANCH) { |
3090 | bi = browser->he_selection->branch_info; | 3094 | |
3095 | if (browser->he_selection) | ||
3096 | bi = browser->he_selection->branch_info; | ||
3091 | 3097 | ||
3092 | if (bi == NULL) | 3098 | if (bi == NULL) |
3093 | goto skip_annotation; | 3099 | goto skip_annotation; |
@@ -3271,7 +3277,8 @@ static int perf_evsel_menu__run(struct perf_evsel_menu *menu, | |||
3271 | 3277 | ||
3272 | switch (key) { | 3278 | switch (key) { |
3273 | case K_TIMER: | 3279 | case K_TIMER: |
3274 | hbt->timer(hbt->arg); | 3280 | if (hbt) |
3281 | hbt->timer(hbt->arg); | ||
3275 | 3282 | ||
3276 | if (!menu->lost_events_warned && | 3283 | if (!menu->lost_events_warned && |
3277 | menu->lost_events && | 3284 | menu->lost_events && |