diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-08-27 10:08:39 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-08-27 10:08:39 -0400 |
| commit | 9db48aaf18d675ac41f550c9384154e0c00de2ef (patch) | |
| tree | 70a19b9164c103e5f52dddff609e01672f8ef616 /tools | |
| parent | 0592969e73ae50ce6852d1aff3d222a335289094 (diff) | |
| parent | fea7a08acb13524b47711625eebea40a0ede69a0 (diff) | |
Merge 3.6-rc3 into driver-core-next
This picks up the printk fixes in 3.6-rc3 that are needed in this branch.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/perf/Makefile | 7 | ||||
| -rw-r--r-- | tools/perf/builtin-record.c | 4 | ||||
| -rw-r--r-- | tools/perf/builtin-report.c | 5 | ||||
| -rw-r--r-- | tools/perf/builtin-test.c | 19 | ||||
| -rw-r--r-- | tools/perf/builtin-top.c | 23 | ||||
| -rw-r--r-- | tools/perf/util/event.h | 3 | ||||
| -rw-r--r-- | tools/perf/util/evlist.c | 7 | ||||
| -rw-r--r-- | tools/perf/util/evlist.h | 3 | ||||
| -rw-r--r-- | tools/perf/util/evsel.c | 15 | ||||
| -rw-r--r-- | tools/perf/util/evsel.h | 10 | ||||
| -rw-r--r-- | tools/perf/util/header.c | 9 | ||||
| -rw-r--r-- | tools/perf/util/intlist.c | 101 | ||||
| -rw-r--r-- | tools/perf/util/intlist.h | 75 | ||||
| -rw-r--r-- | tools/perf/util/parse-events-test.c | 12 | ||||
| -rw-r--r-- | tools/perf/util/parse-options.c | 3 | ||||
| -rw-r--r-- | tools/perf/util/python.c | 6 | ||||
| -rw-r--r-- | tools/perf/util/rblist.c | 107 | ||||
| -rw-r--r-- | tools/perf/util/rblist.h | 47 | ||||
| -rw-r--r-- | tools/perf/util/session.c | 48 | ||||
| -rw-r--r-- | tools/perf/util/session.h | 24 | ||||
| -rw-r--r-- | tools/perf/util/strlist.c | 130 | ||||
| -rw-r--r-- | tools/perf/util/strlist.h | 11 | ||||
| -rw-r--r-- | tools/perf/util/symbol.c | 14 | ||||
| -rw-r--r-- | tools/perf/util/target.c | 2 |
24 files changed, 498 insertions, 187 deletions
diff --git a/tools/perf/Makefile b/tools/perf/Makefile index 77f124fe57ad..35655c3a7b7a 100644 --- a/tools/perf/Makefile +++ b/tools/perf/Makefile | |||
| @@ -319,6 +319,8 @@ LIB_H += $(ARCH_INCLUDE) | |||
| 319 | LIB_H += util/cgroup.h | 319 | LIB_H += util/cgroup.h |
| 320 | LIB_H += $(TRACE_EVENT_DIR)event-parse.h | 320 | LIB_H += $(TRACE_EVENT_DIR)event-parse.h |
| 321 | LIB_H += util/target.h | 321 | LIB_H += util/target.h |
| 322 | LIB_H += util/rblist.h | ||
| 323 | LIB_H += util/intlist.h | ||
| 322 | 324 | ||
| 323 | LIB_OBJS += $(OUTPUT)util/abspath.o | 325 | LIB_OBJS += $(OUTPUT)util/abspath.o |
| 324 | LIB_OBJS += $(OUTPUT)util/alias.o | 326 | LIB_OBJS += $(OUTPUT)util/alias.o |
| @@ -383,6 +385,8 @@ LIB_OBJS += $(OUTPUT)util/xyarray.o | |||
| 383 | LIB_OBJS += $(OUTPUT)util/cpumap.o | 385 | LIB_OBJS += $(OUTPUT)util/cpumap.o |
| 384 | LIB_OBJS += $(OUTPUT)util/cgroup.o | 386 | LIB_OBJS += $(OUTPUT)util/cgroup.o |
| 385 | LIB_OBJS += $(OUTPUT)util/target.o | 387 | LIB_OBJS += $(OUTPUT)util/target.o |
| 388 | LIB_OBJS += $(OUTPUT)util/rblist.o | ||
| 389 | LIB_OBJS += $(OUTPUT)util/intlist.o | ||
| 386 | 390 | ||
| 387 | BUILTIN_OBJS += $(OUTPUT)builtin-annotate.o | 391 | BUILTIN_OBJS += $(OUTPUT)builtin-annotate.o |
| 388 | 392 | ||
| @@ -983,7 +987,8 @@ clean: | |||
| 983 | $(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo $(OUTPUT)common-cmds.h TAGS tags cscope* | 987 | $(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo $(OUTPUT)common-cmds.h TAGS tags cscope* |
| 984 | $(MAKE) -C Documentation/ clean | 988 | $(MAKE) -C Documentation/ clean |
| 985 | $(RM) $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)PERF-CFLAGS | 989 | $(RM) $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)PERF-CFLAGS |
| 986 | $(RM) $(OUTPUT)util/*-{bison,flex}* | 990 | $(RM) $(OUTPUT)util/*-bison* |
| 991 | $(RM) $(OUTPUT)util/*-flex* | ||
| 987 | $(python-clean) | 992 | $(python-clean) |
| 988 | 993 | ||
| 989 | .PHONY: all install clean strip $(LIBTRACEEVENT) | 994 | .PHONY: all install clean strip $(LIBTRACEEVENT) |
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index f5a6452931e6..4db6e1ba54e3 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c | |||
| @@ -313,7 +313,7 @@ try_again: | |||
| 313 | } | 313 | } |
| 314 | } | 314 | } |
| 315 | 315 | ||
| 316 | perf_session__update_sample_type(session); | 316 | perf_session__set_id_hdr_size(session); |
| 317 | } | 317 | } |
| 318 | 318 | ||
| 319 | static int process_buildids(struct perf_record *rec) | 319 | static int process_buildids(struct perf_record *rec) |
| @@ -844,8 +844,6 @@ int cmd_record(int argc, const char **argv, const char *prefix __used) | |||
| 844 | struct perf_record *rec = &record; | 844 | struct perf_record *rec = &record; |
| 845 | char errbuf[BUFSIZ]; | 845 | char errbuf[BUFSIZ]; |
| 846 | 846 | ||
| 847 | perf_header__set_cmdline(argc, argv); | ||
| 848 | |||
| 849 | evsel_list = perf_evlist__new(NULL, NULL); | 847 | evsel_list = perf_evlist__new(NULL, NULL); |
| 850 | if (evsel_list == NULL) | 848 | if (evsel_list == NULL) |
| 851 | return -ENOMEM; | 849 | return -ENOMEM; |
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index 69b1c1185159..7c88a243b5db 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c | |||
| @@ -249,8 +249,9 @@ static int process_read_event(struct perf_tool *tool, | |||
| 249 | static int perf_report__setup_sample_type(struct perf_report *rep) | 249 | static int perf_report__setup_sample_type(struct perf_report *rep) |
| 250 | { | 250 | { |
| 251 | struct perf_session *self = rep->session; | 251 | struct perf_session *self = rep->session; |
| 252 | u64 sample_type = perf_evlist__sample_type(self->evlist); | ||
| 252 | 253 | ||
| 253 | if (!self->fd_pipe && !(self->sample_type & PERF_SAMPLE_CALLCHAIN)) { | 254 | if (!self->fd_pipe && !(sample_type & PERF_SAMPLE_CALLCHAIN)) { |
| 254 | if (sort__has_parent) { | 255 | if (sort__has_parent) { |
| 255 | ui__error("Selected --sort parent, but no " | 256 | ui__error("Selected --sort parent, but no " |
| 256 | "callchain data. Did you call " | 257 | "callchain data. Did you call " |
| @@ -274,7 +275,7 @@ static int perf_report__setup_sample_type(struct perf_report *rep) | |||
| 274 | 275 | ||
| 275 | if (sort__branch_mode == 1) { | 276 | if (sort__branch_mode == 1) { |
| 276 | if (!self->fd_pipe && | 277 | if (!self->fd_pipe && |
| 277 | !(self->sample_type & PERF_SAMPLE_BRANCH_STACK)) { | 278 | !(sample_type & PERF_SAMPLE_BRANCH_STACK)) { |
| 278 | ui__error("Selected -b but no branch data. " | 279 | ui__error("Selected -b but no branch data. " |
| 279 | "Did you call perf record without -b?\n"); | 280 | "Did you call perf record without -b?\n"); |
| 280 | return -1; | 281 | return -1; |
diff --git a/tools/perf/builtin-test.c b/tools/perf/builtin-test.c index d909eb74a0eb..1d592f5cbea9 100644 --- a/tools/perf/builtin-test.c +++ b/tools/perf/builtin-test.c | |||
| @@ -478,7 +478,6 @@ static int test__basic_mmap(void) | |||
| 478 | unsigned int nr_events[nsyscalls], | 478 | unsigned int nr_events[nsyscalls], |
| 479 | expected_nr_events[nsyscalls], i, j; | 479 | expected_nr_events[nsyscalls], i, j; |
| 480 | struct perf_evsel *evsels[nsyscalls], *evsel; | 480 | struct perf_evsel *evsels[nsyscalls], *evsel; |
| 481 | int sample_size = __perf_evsel__sample_size(attr.sample_type); | ||
| 482 | 481 | ||
| 483 | for (i = 0; i < nsyscalls; ++i) { | 482 | for (i = 0; i < nsyscalls; ++i) { |
| 484 | char name[64]; | 483 | char name[64]; |
| @@ -563,8 +562,7 @@ static int test__basic_mmap(void) | |||
| 563 | goto out_munmap; | 562 | goto out_munmap; |
| 564 | } | 563 | } |
| 565 | 564 | ||
| 566 | err = perf_event__parse_sample(event, attr.sample_type, sample_size, | 565 | err = perf_evlist__parse_sample(evlist, event, &sample, false); |
| 567 | false, &sample, false); | ||
| 568 | if (err) { | 566 | if (err) { |
| 569 | pr_err("Can't parse sample, err = %d\n", err); | 567 | pr_err("Can't parse sample, err = %d\n", err); |
| 570 | goto out_munmap; | 568 | goto out_munmap; |
| @@ -661,12 +659,12 @@ static int test__PERF_RECORD(void) | |||
| 661 | const char *cmd = "sleep"; | 659 | const char *cmd = "sleep"; |
| 662 | const char *argv[] = { cmd, "1", NULL, }; | 660 | const char *argv[] = { cmd, "1", NULL, }; |
| 663 | char *bname; | 661 | char *bname; |
| 664 | u64 sample_type, prev_time = 0; | 662 | u64 prev_time = 0; |
| 665 | bool found_cmd_mmap = false, | 663 | bool found_cmd_mmap = false, |
| 666 | found_libc_mmap = false, | 664 | found_libc_mmap = false, |
| 667 | found_vdso_mmap = false, | 665 | found_vdso_mmap = false, |
| 668 | found_ld_mmap = false; | 666 | found_ld_mmap = false; |
| 669 | int err = -1, errs = 0, i, wakeups = 0, sample_size; | 667 | int err = -1, errs = 0, i, wakeups = 0; |
| 670 | u32 cpu; | 668 | u32 cpu; |
| 671 | int total_events = 0, nr_events[PERF_RECORD_MAX] = { 0, }; | 669 | int total_events = 0, nr_events[PERF_RECORD_MAX] = { 0, }; |
| 672 | 670 | ||
| @@ -757,13 +755,6 @@ static int test__PERF_RECORD(void) | |||
| 757 | } | 755 | } |
| 758 | 756 | ||
| 759 | /* | 757 | /* |
| 760 | * We'll need these two to parse the PERF_SAMPLE_* fields in each | ||
| 761 | * event. | ||
| 762 | */ | ||
| 763 | sample_type = perf_evlist__sample_type(evlist); | ||
| 764 | sample_size = __perf_evsel__sample_size(sample_type); | ||
| 765 | |||
| 766 | /* | ||
| 767 | * Now that all is properly set up, enable the events, they will | 758 | * Now that all is properly set up, enable the events, they will |
| 768 | * count just on workload.pid, which will start... | 759 | * count just on workload.pid, which will start... |
| 769 | */ | 760 | */ |
| @@ -788,9 +779,7 @@ static int test__PERF_RECORD(void) | |||
| 788 | if (type < PERF_RECORD_MAX) | 779 | if (type < PERF_RECORD_MAX) |
| 789 | nr_events[type]++; | 780 | nr_events[type]++; |
| 790 | 781 | ||
