diff options
| author | Ingo Molnar <mingo@elte.hu> | 2012-01-04 09:00:43 -0500 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2012-01-04 09:01:28 -0500 |
| commit | adaf4ed2abbd285c93808060924eeec3af483aee (patch) | |
| tree | 425c6c37c08af0b69efaa7457c9b428eda347c36 /tools | |
| parent | ca3d30cc02f780f68771087040ce935add6ba2b7 (diff) | |
| parent | 5f0a6e2d503896062f641639dacfe5055c2f593b (diff) | |
Merge commit 'v3.2-rc7' into x86/asm
Merge reason: Update from -rc4 to -rc7.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/perf/builtin-stat.c | 3 | ||||
| -rw-r--r-- | tools/perf/util/evsel.c | 10 | ||||
| -rw-r--r-- | tools/perf/util/header.c | 2 | ||||
| -rw-r--r-- | tools/perf/util/hist.c | 10 | ||||
| -rw-r--r-- | tools/perf/util/hist.h | 2 | ||||
| -rw-r--r-- | tools/perf/util/session.c | 4 | ||||
| -rw-r--r-- | tools/perf/util/trace-event-parse.c | 2 |
7 files changed, 19 insertions, 14 deletions
diff --git a/tools/perf/builtin-stat.c b/tools/perf/builtin-stat.c index 7d98676808d8..955930e0a5c3 100644 --- a/tools/perf/builtin-stat.c +++ b/tools/perf/builtin-stat.c | |||
| @@ -463,7 +463,8 @@ static int run_perf_stat(int argc __used, const char **argv) | |||
| 463 | 463 | ||
| 464 | list_for_each_entry(counter, &evsel_list->entries, node) { | 464 | list_for_each_entry(counter, &evsel_list->entries, node) { |
| 465 | if (create_perf_stat_counter(counter, first) < 0) { | 465 | if (create_perf_stat_counter(counter, first) < 0) { |
| 466 | if (errno == EINVAL || errno == ENOSYS || errno == ENOENT) { | 466 | if (errno == EINVAL || errno == ENOSYS || |
| 467 | errno == ENOENT || errno == EOPNOTSUPP) { | ||
| 467 | if (verbose) | 468 | if (verbose) |
| 468 | ui__warning("%s event is not supported by the kernel.\n", | 469 | ui__warning("%s event is not supported by the kernel.\n", |
| 469 | event_name(counter)); | 470 | event_name(counter)); |
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c index e42626422587..d7915d4e77cb 100644 --- a/tools/perf/util/evsel.c +++ b/tools/perf/util/evsel.c | |||
| @@ -34,6 +34,16 @@ int __perf_evsel__sample_size(u64 sample_type) | |||
| 34 | return size; | 34 | return size; |
| 35 | } | 35 | } |
| 36 | 36 | ||
| 37 | static void hists__init(struct hists *hists) | ||
| 38 | { | ||
| 39 | memset(hists, 0, sizeof(*hists)); | ||
| 40 | hists->entries_in_array[0] = hists->entries_in_array[1] = RB_ROOT; | ||
| 41 | hists->entries_in = &hists->entries_in_array[0]; | ||
| 42 | hists->entries_collapsed = RB_ROOT; | ||
| 43 | hists->entries = RB_ROOT; | ||
| 44 | pthread_mutex_init(&hists->lock, NULL); | ||
| 45 | } | ||
| 46 | |||
| 37 | void perf_evsel__init(struct perf_evsel *evsel, | 47 | void perf_evsel__init(struct perf_evsel *evsel, |
| 38 | struct perf_event_attr *attr, int idx) | 48 | struct perf_event_attr *attr, int idx) |
| 39 | { | 49 | { |
diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c index bcd05d05b4f0..33c17a2b2a81 100644 --- a/tools/perf/util/header.c +++ b/tools/perf/util/header.c | |||
| @@ -388,7 +388,7 @@ static int write_event_desc(int fd, struct perf_header *h __used, | |||
| 388 | /* | 388 | /* |
| 389 | * write event string as passed on cmdline | 389 | * write event string as passed on cmdline |
| 390 | */ | 390 | */ |
| 391 | ret = do_write_string(fd, attr->name); | 391 | ret = do_write_string(fd, event_name(attr)); |
| 392 | if (ret < 0) | 392 | if (ret < 0) |
| 393 | return ret; | 393 | return ret; |
| 394 | /* | 394 | /* |
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c index a36a3fa81ffb..abef2703cd24 100644 --- a/tools/perf/util/hist.c +++ b/tools/perf/util/hist.c | |||
| @@ -1211,13 +1211,3 @@ size_t hists__fprintf_nr_events(struct hists *hists, FILE *fp) | |||
| 1211 | 1211 | ||
| 1212 | return ret; | 1212 | return ret; |
| 1213 | } | 1213 | } |
| 1214 | |||
| 1215 | void hists__init(struct hists *hists) | ||
| 1216 | { | ||
| 1217 | memset(hists, 0, sizeof(*hists)); | ||
| 1218 | hists->entries_in_array[0] = hists->entries_in_array[1] = RB_ROOT; | ||
| 1219 | hists->entries_in = &hists->entries_in_array[0]; | ||
| 1220 | hists->entries_collapsed = RB_ROOT; | ||
| 1221 | hists->entries = RB_ROOT; | ||
| 1222 | pthread_mutex_init(&hists->lock, NULL); | ||
| 1223 | } | ||
diff --git a/tools/perf/util/hist.h b/tools/perf/util/hist.h index c86c1d27bd1e..89289c8e935e 100644 --- a/tools/perf/util/hist.h +++ b/tools/perf/util/hist.h | |||
| @@ -63,8 +63,6 @@ struct hists { | |||
| 63 | struct callchain_cursor callchain_cursor; | 63 | struct callchain_cursor callchain_cursor; |
| 64 | }; | 64 | }; |
| 65 | 65 | ||
| 66 | void hists__init(struct hists *hists); | ||
| 67 | |||
| 68 | struct hist_entry *__hists__add_entry(struct hists *self, | 66 | struct hist_entry *__hists__add_entry(struct hists *self, |
| 69 | struct addr_location *al, | 67 | struct addr_location *al, |
| 70 | struct symbol *parent, u64 period); | 68 | struct symbol *parent, u64 period); |
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c index 85c1e6b76f0a..0f4555ce9063 100644 --- a/tools/perf/util/session.c +++ b/tools/perf/util/session.c | |||
| @@ -1333,6 +1333,10 @@ int perf_session__cpu_bitmap(struct perf_session *session, | |||
| 1333 | } | 1333 | } |
| 1334 | 1334 | ||
| 1335 | map = cpu_map__new(cpu_list); | 1335 | map = cpu_map__new(cpu_list); |
| 1336 | if (map == NULL) { | ||
| 1337 | pr_err("Invalid cpu_list\n"); | ||
| 1338 | return -1; | ||
| 1339 | } | ||
| 1336 | 1340 | ||
| 1337 | for (i = 0; i < map->nr; i++) { | 1341 | for (i = 0; i < map->nr; i++) { |
| 1338 | int cpu = map->map[i]; | 1342 | int cpu = map->map[i]; |
diff --git a/tools/perf/util/trace-event-parse.c b/tools/perf/util/trace-event-parse.c index 0a7ed5b5e281..6c164dc9ee95 100644 --- a/tools/perf/util/trace-event-parse.c +++ b/tools/perf/util/trace-event-parse.c | |||
| @@ -1537,6 +1537,8 @@ process_flags(struct event *event, struct print_arg *arg, char **tok) | |||
| 1537 | field = malloc_or_die(sizeof(*field)); | 1537 | field = malloc_or_die(sizeof(*field)); |
| 1538 | 1538 | ||
| 1539 | type = process_arg(event, field, &token); | 1539 | type = process_arg(event, field, &token); |
| 1540 | while (type == EVENT_OP) | ||
| 1541 | type = process_op(event, field, &token); | ||
| 1540 | if (test_type_token(type, token, EVENT_DELIM, ",")) | 1542 | if (test_type_token(type, token, EVENT_DELIM, ",")) |
| 1541 | goto out_free; | 1543 | goto out_free; |
| 1542 | 1544 | ||
