diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2016-03-04 14:32:40 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2016-03-04 14:32:40 -0500 |
commit | 52cdce8adb635746f53306ab2599ca64902bb1dc (patch) | |
tree | 0b61680c30eb150796cf01186f15b4845cdee6dd /tools/perf | |
parent | 3cd47869431d7402d0613cf0f7fbb392f2b97565 (diff) | |
parent | 7dde4e74744772efdc85d7ed13495c7b6a0d881b (diff) |
Merge branch 'rotary-encoder' into next
Bring in updates to roraty encoder driver switching it away from legacy
platform data and over to generic device properties and adding support
for encoders using more than 2 GPIOs.
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/builtin-buildid-list.c | 2 | ||||
-rw-r--r-- | tools/perf/ui/browsers/hists.c | 8 | ||||
-rw-r--r-- | tools/perf/util/build-id.c | 2 | ||||
-rw-r--r-- | tools/perf/util/parse-events.c | 6 |
4 files changed, 15 insertions, 3 deletions
diff --git a/tools/perf/builtin-buildid-list.c b/tools/perf/builtin-buildid-list.c index 918b4de29de4..6419f57b0850 100644 --- a/tools/perf/builtin-buildid-list.c +++ b/tools/perf/builtin-buildid-list.c | |||
@@ -110,7 +110,7 @@ int cmd_buildid_list(int argc, const char **argv, | |||
110 | setup_pager(); | 110 | setup_pager(); |
111 | 111 | ||
112 | if (show_kernel) | 112 | if (show_kernel) |
113 | return sysfs__fprintf_build_id(stdout); | 113 | return !(sysfs__fprintf_build_id(stdout) > 0); |
114 | 114 | ||
115 | return perf_session__list_build_ids(force, with_hits); | 115 | return perf_session__list_build_ids(force, with_hits); |
116 | } | 116 | } |
diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c index fa9eb92c9e24..81def6c3f24b 100644 --- a/tools/perf/ui/browsers/hists.c +++ b/tools/perf/ui/browsers/hists.c | |||
@@ -298,6 +298,9 @@ static bool hist_browser__toggle_fold(struct hist_browser *browser) | |||
298 | struct callchain_list *cl = container_of(ms, struct callchain_list, ms); | 298 | struct callchain_list *cl = container_of(ms, struct callchain_list, ms); |
299 | bool has_children; | 299 | bool has_children; |
300 | 300 | ||
301 | if (!he || !ms) | ||
302 | return false; | ||
303 | |||
301 | if (ms == &he->ms) | 304 | if (ms == &he->ms) |
302 | has_children = hist_entry__toggle_fold(he); | 305 | has_children = hist_entry__toggle_fold(he); |
303 | else | 306 | else |
@@ -928,6 +931,8 @@ static unsigned int hist_browser__refresh(struct ui_browser *browser) | |||
928 | } | 931 | } |
929 | 932 | ||
930 | ui_browser__hists_init_top(browser); | 933 | ui_browser__hists_init_top(browser); |
934 | hb->he_selection = NULL; | ||
935 | hb->selection = NULL; | ||
931 | 936 | ||
932 | for (nd = browser->top; nd; nd = rb_next(nd)) { | 937 | for (nd = browser->top; nd; nd = rb_next(nd)) { |
933 | struct hist_entry *h = rb_entry(nd, struct hist_entry, rb_node); | 938 | struct hist_entry *h = rb_entry(nd, struct hist_entry, rb_node); |
@@ -1033,6 +1038,9 @@ static void ui_browser__hists_seek(struct ui_browser *browser, | |||
1033 | * and stop when we printed enough lines to fill the screen. | 1038 | * and stop when we printed enough lines to fill the screen. |
1034 | */ | 1039 | */ |
1035 | do_offset: | 1040 | do_offset: |
1041 | if (!nd) | ||
1042 | return; | ||
1043 | |||
1036 | if (offset > 0) { | 1044 | if (offset > 0) { |
1037 | do { | 1045 | do { |
1038 | h = rb_entry(nd, struct hist_entry, rb_node); | 1046 | h = rb_entry(nd, struct hist_entry, rb_node); |
diff --git a/tools/perf/util/build-id.c b/tools/perf/util/build-id.c index 217b5a60e2ab..6a7e273a514a 100644 --- a/tools/perf/util/build-id.c +++ b/tools/perf/util/build-id.c | |||
@@ -91,7 +91,7 @@ int build_id__sprintf(const u8 *build_id, int len, char *bf) | |||
91 | bid += 2; | 91 | bid += 2; |
92 | } | 92 | } |
93 | 93 | ||
94 | return raw - build_id; | 94 | return (bid - bf) + 1; |
95 | } | 95 | } |
96 | 96 | ||
97 | int sysfs__sprintf_build_id(const char *root_dir, char *sbuild_id) | 97 | int sysfs__sprintf_build_id(const char *root_dir, char *sbuild_id) |
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c index e48d9da75707..6fc8cd753e1a 100644 --- a/tools/perf/util/parse-events.c +++ b/tools/perf/util/parse-events.c | |||
@@ -124,6 +124,10 @@ struct event_symbol event_symbols_sw[PERF_COUNT_SW_MAX] = { | |||
124 | .symbol = "dummy", | 124 | .symbol = "dummy", |
125 | .alias = "", | 125 | .alias = "", |
126 | }, | 126 | }, |
127 | [PERF_COUNT_SW_BPF_OUTPUT] = { | ||
128 | .symbol = "bpf-output", | ||
129 | .alias = "", | ||
130 | }, | ||
127 | }; | 131 | }; |
128 | 132 | ||
129 | #define __PERF_EVENT_FIELD(config, name) \ | 133 | #define __PERF_EVENT_FIELD(config, name) \ |
@@ -1879,7 +1883,7 @@ restart: | |||
1879 | 1883 | ||
1880 | for (i = 0; i < max; i++, syms++) { | 1884 | for (i = 0; i < max; i++, syms++) { |
1881 | 1885 | ||
1882 | if (event_glob != NULL && | 1886 | if (event_glob != NULL && syms->symbol != NULL && |
1883 | !(strglobmatch(syms->symbol, event_glob) || | 1887 | !(strglobmatch(syms->symbol, event_glob) || |
1884 | (syms->alias && strglobmatch(syms->alias, event_glob)))) | 1888 | (syms->alias && strglobmatch(syms->alias, event_glob)))) |
1885 | continue; | 1889 | continue; |