diff options
| author | Frederic Weisbecker <fweisbec@gmail.com> | 2009-09-23 17:08:43 -0400 |
|---|---|---|
| committer | Frederic Weisbecker <fweisbec@gmail.com> | 2009-09-23 17:08:43 -0400 |
| commit | d7a4b414eed51f1653bb05ebe84122bf9a7ae18b (patch) | |
| tree | bd6603a0c27de4c138a1767871897e9cd3e1a1d2 /kernel/trace | |
| parent | 1f0ab40976460bc4673fa204ce917a725185d8f2 (diff) | |
| parent | a724eada8c2a7b62463b73ccf73fd0bb6e928aeb (diff) | |
Merge commit 'linus/master' into tracing/kprobes
Conflicts:
kernel/trace/Makefile
kernel/trace/trace.h
kernel/trace/trace_event_types.h
kernel/trace/trace_export.c
Merge reason:
Sync with latest significant tracing core changes.
Diffstat (limited to 'kernel/trace')
27 files changed, 1256 insertions, 1114 deletions
diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig index e78dcbde1a81..15372a9f2399 100644 --- a/kernel/trace/Kconfig +++ b/kernel/trace/Kconfig | |||
| @@ -11,12 +11,18 @@ config NOP_TRACER | |||
| 11 | 11 | ||
| 12 | config HAVE_FTRACE_NMI_ENTER | 12 | config HAVE_FTRACE_NMI_ENTER |
| 13 | bool | 13 | bool |
| 14 | help | ||
| 15 | See Documentation/trace/ftrace-implementation.txt | ||
| 14 | 16 | ||
| 15 | config HAVE_FUNCTION_TRACER | 17 | config HAVE_FUNCTION_TRACER |
| 16 | bool | 18 | bool |
| 19 | help | ||
| 20 | See Documentation/trace/ftrace-implementation.txt | ||
| 17 | 21 | ||
| 18 | config HAVE_FUNCTION_GRAPH_TRACER | 22 | config HAVE_FUNCTION_GRAPH_TRACER |
| 19 | bool | 23 | bool |
| 24 | help | ||
| 25 | See Documentation/trace/ftrace-implementation.txt | ||
| 20 | 26 | ||
| 21 | config HAVE_FUNCTION_GRAPH_FP_TEST | 27 | config HAVE_FUNCTION_GRAPH_FP_TEST |
| 22 | bool | 28 | bool |
| @@ -28,21 +34,25 @@ config HAVE_FUNCTION_GRAPH_FP_TEST | |||
| 28 | config HAVE_FUNCTION_TRACE_MCOUNT_TEST | 34 | config HAVE_FUNCTION_TRACE_MCOUNT_TEST |
| 29 | bool | 35 | bool |
| 30 | help | 36 | help |
| 31 | This gets selected when the arch tests the function_trace_stop | 37 | See Documentation/trace/ftrace-implementation.txt |
| 32 | variable at the mcount call site. Otherwise, this variable | ||
| 33 | is tested by the called function. | ||
| 34 | 38 | ||
| 35 | config HAVE_DYNAMIC_FTRACE | 39 | config HAVE_DYNAMIC_FTRACE |
| 36 | bool | 40 | bool |
| 41 | help | ||
| 42 | See Documentation/trace/ftrace-implementation.txt | ||
| 37 | 43 | ||
| 38 | config HAVE_FTRACE_MCOUNT_RECORD | 44 | config HAVE_FTRACE_MCOUNT_RECORD |
| 39 | bool | 45 | bool |
| 46 | help | ||
| 47 | See Documentation/trace/ftrace-implementation.txt | ||
| 40 | 48 | ||
| 41 | config HAVE_HW_BRANCH_TRACER | 49 | config HAVE_HW_BRANCH_TRACER |
| 42 | bool | 50 | bool |
| 43 | 51 | ||
| 44 | config HAVE_SYSCALL_TRACEPOINTS | 52 | config HAVE_SYSCALL_TRACEPOINTS |
| 45 | bool | 53 | bool |
| 54 | help | ||
| 55 | See Documentation/trace/ftrace-implementation.txt | ||
| 46 | 56 | ||
| 47 | config TRACER_MAX_TRACE | 57 | config TRACER_MAX_TRACE |
| 48 | bool | 58 | bool |
| @@ -73,7 +83,7 @@ config RING_BUFFER_ALLOW_SWAP | |||
| 73 | # This allows those options to appear when no other tracer is selected. But the | 83 | # This allows those options to appear when no other tracer is selected. But the |
| 74 | # options do not appear when something else selects it. We need the two options | 84 | # options do not appear when something else selects it. We need the two options |
| 75 | # GENERIC_TRACER and TRACING to avoid circular dependencies to accomplish the | 85 | # GENERIC_TRACER and TRACING to avoid circular dependencies to accomplish the |
| 76 | # hidding of the automatic options options. | 86 | # hidding of the automatic options. |
| 77 | 87 | ||
| 78 | config TRACING | 88 | config TRACING |
| 79 | bool | 89 | bool |
| @@ -481,6 +491,18 @@ config FTRACE_STARTUP_TEST | |||
| 481 | functioning properly. It will do tests on all the configured | 491 | functioning properly. It will do tests on all the configured |
| 482 | tracers of ftrace. | 492 | tracers of ftrace. |
| 483 | 493 | ||
| 494 | config EVENT_TRACE_TEST_SYSCALLS | ||
| 495 | bool "Run selftest on syscall events" | ||
| 496 | depends on FTRACE_STARTUP_TEST | ||
| 497 | help | ||
| 498 | This option will also enable testing every syscall event. | ||
| 499 | It only enables the event and disables it and runs various loads | ||
| 500 | with the event enabled. This adds a bit more time for kernel boot | ||
| 501 | up since it runs this on every system call defined. | ||
| 502 | |||
| 503 | TBD - enable a way to actually call the syscalls as we test their | ||
| 504 | events | ||
| 505 | |||
| 484 | config MMIOTRACE | 506 | config MMIOTRACE |
| 485 | bool "Memory mapped IO tracing" | 507 | bool "Memory mapped IO tracing" |
| 486 | depends on HAVE_MMIOTRACE_SUPPORT && PCI | 508 | depends on HAVE_MMIOTRACE_SUPPORT && PCI |
diff --git a/kernel/trace/Makefile b/kernel/trace/Makefile index 7c00a1ec1496..c8cb75d7f280 100644 --- a/kernel/trace/Makefile +++ b/kernel/trace/Makefile | |||
| @@ -42,7 +42,6 @@ obj-$(CONFIG_BOOT_TRACER) += trace_boot.o | |||
| 42 | obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += trace_functions_graph.o | 42 | obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += trace_functions_graph.o |
| 43 | obj-$(CONFIG_TRACE_BRANCH_PROFILING) += trace_branch.o | 43 | obj-$(CONFIG_TRACE_BRANCH_PROFILING) += trace_branch.o |
| 44 | obj-$(CONFIG_HW_BRANCH_TRACER) += trace_hw_branches.o | 44 | obj-$(CONFIG_HW_BRANCH_TRACER) += trace_hw_branches.o |
| 45 | obj-$(CONFIG_POWER_TRACER) += trace_power.o | ||
| 46 | obj-$(CONFIG_KMEMTRACE) += kmemtrace.o | 45 | obj-$(CONFIG_KMEMTRACE) += kmemtrace.o |
| 47 | obj-$(CONFIG_WORKQUEUE_TRACER) += trace_workqueue.o | 46 | obj-$(CONFIG_WORKQUEUE_TRACER) += trace_workqueue.o |
| 48 | obj-$(CONFIG_BLK_DEV_IO_TRACE) += blktrace.o | 47 | obj-$(CONFIG_BLK_DEV_IO_TRACE) += blktrace.o |
| @@ -55,5 +54,6 @@ obj-$(CONFIG_FTRACE_SYSCALLS) += trace_syscalls.o | |||
| 55 | obj-$(CONFIG_EVENT_PROFILE) += trace_event_profile.o | 54 | obj-$(CONFIG_EVENT_PROFILE) += trace_event_profile.o |
| 56 | obj-$(CONFIG_EVENT_TRACING) += trace_events_filter.o | 55 | obj-$(CONFIG_EVENT_TRACING) += trace_events_filter.o |
| 57 | obj-$(CONFIG_KPROBE_TRACER) += trace_kprobe.o | 56 | obj-$(CONFIG_KPROBE_TRACER) += trace_kprobe.o |
| 57 | obj-$(CONFIG_EVENT_TRACING) += power-traces.o | ||
| 58 | 58 | ||
| 59 | libftrace-y := ftrace.o | 59 | libftrace-y := ftrace.o |
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 8c804e24f96f..23df7771c937 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c | |||
| @@ -1323,11 +1323,10 @@ static int __init ftrace_dyn_table_alloc(unsigned long num_to_init) | |||
| 1323 | 1323 | ||
| 1324 | enum { | 1324 | enum { |
| 1325 | FTRACE_ITER_FILTER = (1 << 0), | 1325 | FTRACE_ITER_FILTER = (1 << 0), |
| 1326 | FTRACE_ITER_CONT = (1 << 1), | 1326 | FTRACE_ITER_NOTRACE = (1 << 1), |
| 1327 | FTRACE_ITER_NOTRACE = (1 << 2), | 1327 | FTRACE_ITER_FAILURES = (1 << 2), |
| 1328 | FTRACE_ITER_FAILURES = (1 << 3), | 1328 | FTRACE_ITER_PRINTALL = (1 << 3), |
| 1329 | FTRACE_ITER_PRINTALL = (1 << 4), | 1329 | FTRACE_ITER_HASH = (1 << 4), |
| 1330 | FTRACE_ITER_HASH = (1 << 5), | ||
| 1331 | }; | 1330 | }; |
| 1332 | 1331 | ||
| 1333 | #define FTRACE_BUFF_MAX (KSYM_SYMBOL_LEN+4) /* room for wildcards */ | 1332 | #define FTRACE_BUFF_MAX (KSYM_SYMBOL_LEN+4) /* room for wildcards */ |
| @@ -1337,8 +1336,7 @@ struct ftrace_iterator { | |||
| 1337 | int hidx; | 1336 | int hidx; |
| 1338 | int idx; | 1337 | int idx; |
| 1339 | unsigned flags; | 1338 | unsigned flags; |
| 1340 | unsigned char buffer[FTRACE_BUFF_MAX+1]; | 1339 | struct trace_parser parser; |
| 1341 | unsigned buffer_idx; | ||
| 1342 | }; | 1340 | }; |
| 1343 | 1341 | ||
| 1344 | static void * | 1342 | static void * |
| @@ -1407,7 +1405,7 @@ static int t_hash_show(struct seq_file *m, void *v) | |||
| 1407 | if (rec->ops->print) | 1405 | if (rec->ops->print) |
| 1408 | return rec->ops->print(m, rec->ip, | ||
