aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-11-16 15:44:49 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-11-16 15:44:49 -0500
commitdd3190ee8142d94c9aa09d278a106544b2e5e7d1 (patch)
tree741c378b30e9cd36385d73ae649553309119897f
parentb29c8306a368cf65782669eba079f81dc861c54d (diff)
parent89b4be142bf2491a94af325f5206fc2f2aa18960 (diff)
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf fixes from Ingo Molnar: "Tooling changes only: it includes the ARM tooling fixlets, various other fixes, smaller updates, minor cleanups" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf record: Add an option to force per-cpu mmaps perf probe: Add '--demangle'/'--no-demangle' perf ui browser: Fix segfault caused by off by one handling END key perf symbols: Limit max callchain using max_stack on DWARF unwinding too perf evsel: Introduce perf_evsel__prev() method perf tools: Use perf_evlist__{first,last}, perf_evsel__next perf tools: Synthesize anon MMAP records again perf top: Add missing newline if the 'uid' is invalid perf tools: Remove trivial extra semincolon perf trace: Tweak summary output tools/perf/build: Fix feature-libunwind-debug-frame handling tools/perf/build: Fix timerfd feature check
-rw-r--r--tools/perf/Documentation/perf-record.txt6
-rw-r--r--tools/perf/builtin-probe.c2
-rw-r--r--tools/perf/builtin-record.c2
-rw-r--r--tools/perf/builtin-top.c4
-rw-r--r--tools/perf/builtin-trace.c10
-rw-r--r--tools/perf/config/Makefile14
-rw-r--r--tools/perf/config/feature-checks/Makefile3
-rw-r--r--tools/perf/config/feature-checks/test-all.c4
-rw-r--r--tools/perf/tests/parse-events.c3
-rw-r--r--tools/perf/ui/browser.c4
-rw-r--r--tools/perf/ui/browsers/hists.c11
-rw-r--r--tools/perf/util/event.c6
-rw-r--r--tools/perf/util/evlist.c6
-rw-r--r--tools/perf/util/evsel.c4
-rw-r--r--tools/perf/util/evsel.h5
-rw-r--r--tools/perf/util/machine.c2
-rw-r--r--tools/perf/util/target.h1
-rw-r--r--tools/perf/util/unwind.c9
-rw-r--r--tools/perf/util/unwind.h5
19 files changed, 63 insertions, 38 deletions
diff --git a/tools/perf/Documentation/perf-record.txt b/tools/perf/Documentation/perf-record.txt
index 052f7c4dc00c..43b42c4f4a91 100644
--- a/tools/perf/Documentation/perf-record.txt
+++ b/tools/perf/Documentation/perf-record.txt
@@ -201,6 +201,12 @@ abort events and some memory events in precise mode on modern Intel CPUs.
201--transaction:: 201--transaction::
202Record transaction flags for transaction related events. 202Record transaction flags for transaction related events.
203 203
204--force-per-cpu::
205Force the use of per-cpu mmaps. By default, when tasks are specified (i.e. -p,
206-t or -u options) per-thread mmaps are created. This option overrides that and
207forces per-cpu mmaps. A side-effect of that is that inheritance is
208automatically enabled. Add the -i option also to disable inheritance.
209
204SEE ALSO 210SEE ALSO
205-------- 211--------
206linkperf:perf-stat[1], linkperf:perf-list[1] 212linkperf:perf-stat[1], linkperf:perf-list[1]
diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c
index 89acc17cf2a0..6ea9e85bdc00 100644
--- a/tools/perf/builtin-probe.c
+++ b/tools/perf/builtin-probe.c
@@ -325,6 +325,8 @@ int cmd_probe(int argc, const char **argv, const char *prefix __maybe_unused)
325 opt_set_filter), 325 opt_set_filter),
326 OPT_CALLBACK('x', "exec", NULL, "executable|path", 326 OPT_CALLBACK('x', "exec", NULL, "executable|path",
327 "target executable name or path", opt_set_target), 327 "target executable name or path", opt_set_target),
328 OPT_BOOLEAN(0, "demangle", &symbol_conf.demangle,
329 "Disable symbol demangling"),
328 OPT_END() 330 OPT_END()
329 }; 331 };
330 int ret; 332 int ret;
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 4d644fe2d5b7..7c8020a32784 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -888,6 +888,8 @@ const struct option record_options[] = {
888 "sample by weight (on special events only)"), 888 "sample by weight (on special events only)"),
889 OPT_BOOLEAN(0, "transaction", &record.opts.sample_transaction, 889 OPT_BOOLEAN(0, "transaction", &record.opts.sample_transaction,
890 "sample transaction flags (special events only)"), 890 "sample transaction flags (special events only)"),
891 OPT_BOOLEAN(0, "force-per-cpu", &record.opts.target.force_per_cpu,
892 "force the use of per-cpu mmaps"),
891 OPT_END() 893 OPT_END()
892}; 894};
893 895
diff --git a/tools/perf/builtin-top.c b/tools/perf/builtin-top.c
index b8f8e29db332..71e6402729a8 100644
--- a/tools/perf/builtin-top.c
+++ b/tools/perf/builtin-top.c
@@ -1172,7 +1172,7 @@ int cmd_top(int argc, const char **argv, const char *prefix __maybe_unused)
1172 status = target__validate(target); 1172 status = target__validate(target);
1173 if (status) { 1173 if (status) {
1174 target__strerror(target, status, errbuf, BUFSIZ); 1174 target__strerror(target, status, errbuf, BUFSIZ);
1175 ui__warning("%s", errbuf); 1175 ui__warning("%s\n", errbuf);
1176 } 1176 }
1177 1177
1178 status = target__parse_uid(target); 1178 status = target__parse_uid(target);
@@ -1180,7 +1180,7 @@ int cmd_top(int argc, const char **argv, const char *prefix __maybe_unused)
1180 int saved_errno = errno; 1180 int saved_errno = errno;
1181 1181
1182 target__strerror(target, status, errbuf, BUFSIZ); 1182 target__strerror(target, status, errbuf, BUFSIZ);
1183 ui__error("%s", errbuf); 1183 ui__error("%s\n", errbuf);
1184 1184
1185 status = -saved_errno; 1185 status = -saved_errno;
1186 goto out_delete_evlist; 1186 goto out_delete_evlist;
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 6b230af940e2..8be17fc462ba 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -2112,9 +2112,9 @@ static size_t thread__dump_stats(struct thread_trace *ttrace,
2112 2112
2113 printed += fprintf(fp, "\n"); 2113 printed += fprintf(fp, "\n");
2114 2114
2115 printed += fprintf(fp, " msec/call\n"); 2115 printed += fprintf(fp, " syscall calls min avg max stddev\n");
2116 printed += fprintf(fp, " syscall calls min avg max stddev\n"); 2116 printed += fprintf(fp, " (msec) (msec) (msec) (%%)\n");
2117 printed += fprintf(fp, " --------------- -------- -------- -------- -------- ------\n"); 2117 printed += fprintf(fp, " --------------- -------- --------- --------- --------- ------\n");
2118 2118
2119 /* each int_node is a syscall */ 2119 /* each int_node is a syscall */
2120 while (inode) { 2120 while (inode) {
@@ -2131,9 +2131,9 @@ static size_t thread__dump_stats(struct thread_trace *ttrace,
2131 2131
2132 sc = &trace->syscalls.table[inode->i]; 2132 sc = &trace->syscalls.table[inode->i];
2133 printed += fprintf(fp, " %-15s", sc->name); 2133 printed += fprintf(fp, " %-15s", sc->name);
2134 printed += fprintf(fp, " %8" PRIu64 " %8.3f %8.3f", 2134 printed += fprintf(fp, " %8" PRIu64 " %9.3f %9.3f",
2135 n, min, avg); 2135 n, min, avg);
2136 printed += fprintf(fp, " %8.3f %6.2f\n", max, pct); 2136 printed += fprintf(fp, " %9.3f %9.2f%%\n", max, pct);
2137 } 2137 }
2138 2138
2139 inode = intlist__next(inode); 2139 inode = intlist__next(inode);
diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index f5905f2b197d..f7d11a811c74 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -142,7 +142,8 @@ CORE_FEATURE_TESTS = \
142 libunwind \ 142 libunwind \
143 on-exit \ 143 on-exit \
144 stackprotector \ 144 stackprotector \
145 stackprotector-all 145 stackprotector-all \
146 timerfd
146 147
147# 148#
148# So here we detect whether test-all was rebuilt, to be able 149# So here we detect whether test-all was rebuilt, to be able
@@ -328,8 +329,14 @@ ifndef NO_LIBUNWIND
328 msg := $(warning No libunwind found, disabling post unwind support. Please install libunwind-dev[el] >= 1.1); 329 msg := $(warning No libunwind found, disabling post unwind support. Please install libunwind-dev[el] >= 1.1);
329 NO_LIBUNWIND := 1 330 NO_LIBUNWIND := 1
330 else 331 else
331 ifneq ($(feature-libunwind-debug-frame), 1) 332 ifeq ($(ARCH),arm)
332 msg := $(warning No debug_frame support found in libunwind); 333 $(call feature_check,libunwind-debug-frame)
334 ifneq ($(feature-libunwind-debug-frame), 1)
335 msg := $(warning No debug_frame support found in libunwind);
336 CFLAGS += -DNO_LIBUNWIND_DEBUG_FRAME
337 endif
338 else
339 # non-ARM has no dwarf_find_debug_frame() function:
333 CFLAGS += -DNO_LIBUNWIND_DEBUG_FRAME 340 CFLAGS += -DNO_LIBUNWIND_DEBUG_FRAME
334 endif 341 endif
335 endif 342 endif
@@ -405,7 +412,6 @@ else
405 endif 412 endif
406endif 413endif
407 414
408$(call feature_check,timerfd)
409ifeq ($(feature-timerfd), 1) 415ifeq ($(feature-timerfd), 1)
410 CFLAGS += -DHAVE_TIMERFD_SUPPORT 416 CFLAGS += -DHAVE_TIMERFD_SUPPORT
411else 417else
diff --git a/tools/perf/config/feature-checks/Makefile b/tools/perf/config/feature-checks/Makefile
index e8e195f49a4e..87e790017c69 100644
--- a/tools/perf/config/feature-checks/Makefile
+++ b/tools/perf/config/feature-checks/Makefile
@@ -76,6 +76,9 @@ test-libnuma:
76test-libunwind: 76test-libunwind:
77 $(BUILD) $(LIBUNWIND_LIBS) -lelf 77 $(BUILD) $(LIBUNWIND_LIBS) -lelf
78 78
79test-libunwind-debug-frame:
80 $(BUILD) $(LIBUNWIND_LIBS) -lelf
81
79test-libaudit: