diff options
Diffstat (limited to 'kernel/trace')
-rw-r--r-- | kernel/trace/Kconfig | 10 | ||||
-rw-r--r-- | kernel/trace/ring_buffer.c | 3 | ||||
-rw-r--r-- | kernel/trace/trace.c | 23 | ||||
-rw-r--r-- | kernel/trace/trace_sysprof.c | 3 |
4 files changed, 21 insertions, 18 deletions
diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig index b17ed8787ded..1551f47e7669 100644 --- a/kernel/trace/Kconfig +++ b/kernel/trace/Kconfig | |||
@@ -155,7 +155,7 @@ config IRQSOFF_TRACER | |||
155 | disabled by default and can be runtime (re-)started | 155 | disabled by default and can be runtime (re-)started |
156 | via: | 156 | via: |
157 | 157 | ||
158 | echo 0 > /debugfs/tracing/tracing_max_latency | 158 | echo 0 > /sys/kernel/debug/tracing/tracing_max_latency |
159 | 159 | ||
160 | (Note that kernel size and overhead increases with this option | 160 | (Note that kernel size and overhead increases with this option |
161 | enabled. This option and the preempt-off timing option can be | 161 | enabled. This option and the preempt-off timing option can be |
@@ -176,7 +176,7 @@ config PREEMPT_TRACER | |||
176 | disabled by default and can be runtime (re-)started | 176 | disabled by default and can be runtime (re-)started |
177 | via: | 177 | via: |
178 | 178 | ||
179 | echo 0 > /debugfs/tracing/tracing_max_latency | 179 | echo 0 > /sys/kernel/debug/tracing/tracing_max_latency |
180 | 180 | ||
181 | (Note that kernel size and overhead increases with this option | 181 | (Note that kernel size and overhead increases with this option |
182 | enabled. This option and the irqs-off timing option can be | 182 | enabled. This option and the irqs-off timing option can be |
@@ -269,7 +269,7 @@ config PROFILE_ANNOTATED_BRANCHES | |||
269 | This tracer profiles all the the likely and unlikely macros | 269 | This tracer profiles all the the likely and unlikely macros |
270 | in the kernel. It will display the results in: | 270 | in the kernel. It will display the results in: |
271 | 271 | ||
272 | /debugfs/tracing/profile_annotated_branch | 272 | /sys/kernel/debug/tracing/profile_annotated_branch |
273 | 273 | ||
274 | Note: this will add a significant overhead, only turn this | 274 | Note: this will add a significant overhead, only turn this |
275 | on if you need to profile the system's use of these macros. | 275 | on if you need to profile the system's use of these macros. |
@@ -282,7 +282,7 @@ config PROFILE_ALL_BRANCHES | |||
282 | taken in the kernel is recorded whether it hit or miss. | 282 | taken in the kernel is recorded whether it hit or miss. |
283 | The results will be displayed in: | 283 | The results will be displayed in: |
284 | 284 | ||
285 | /debugfs/tracing/profile_branch | 285 | /sys/kernel/debug/tracing/profile_branch |
286 | 286 | ||
287 | This option also enables the likely/unlikely profiler. | 287 | This option also enables the likely/unlikely profiler. |
288 | 288 | ||
@@ -331,7 +331,7 @@ config STACK_TRACER | |||
331 | select KALLSYMS | 331 | select KALLSYMS |
332 | help | 332 | help |
333 | This special tracer records the maximum stack footprint of the | 333 | This special tracer records the maximum stack footprint of the |
334 | kernel and displays it in debugfs/tracing/stack_trace. | 334 | kernel and displays it in /sys/kernel/debug/tracing/stack_trace. |
335 | 335 | ||
336 | This tracer works by hooking into every function call that the | 336 | This tracer works by hooking into every function call that the |
337 | kernel executes, and keeping a maximum stack depth value and | 337 | kernel executes, and keeping a maximum stack depth value and |
diff --git a/kernel/trace/ring_buffer.c b/kernel/trace/ring_buffer.c index 589b3eedfa67..04dac2638258 100644 --- a/kernel/trace/ring_buffer.c +++ b/kernel/trace/ring_buffer.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/debugfs.h> | 10 | #include <linux/debugfs.h> |
11 | #include <linux/uaccess.h> | 11 | #include <linux/uaccess.h> |
12 | #include <linux/hardirq.h> | 12 | #include <linux/hardirq.h> |
13 | #include <linux/kmemcheck.h> | ||
13 | #include <linux/module.h> | 14 | #include <linux/module.h> |
14 | #include <linux/percpu.h> | 15 | #include <linux/percpu.h> |
15 | #include <linux/mutex.h> | 16 | #include <linux/mutex.h> |
@@ -1154,6 +1155,7 @@ rb_reset_tail(struct ring_buffer_per_cpu *cpu_buffer, | |||
1154 | } | 1155 | } |
1155 | 1156 | ||
1156 | event = __rb_page_index(tail_page, tail); | 1157 | event = __rb_page_index(tail_page, tail); |
1158 | kmemcheck_annotate_bitfield(event, bitfield); | ||
1157 | 1159 | ||
1158 | /* | 1160 | /* |
1159 | * If this event is bigger than the minimum size, then | 1161 | * If this event is bigger than the minimum size, then |
@@ -1324,6 +1326,7 @@ __rb_reserve_next(struct ring_buffer_per_cpu *cpu_buffer, | |||
1324 | /* We reserved something on the buffer */ | 1326 | /* We reserved something on the buffer */ |
1325 | 1327 | ||
1326 | event = __rb_page_index(tail_page, tail); | 1328 | event = __rb_page_index(tail_page, tail); |
1329 | kmemcheck_annotate_bitfield(event, bitfield); | ||
1327 | rb_update_event(event, type, length); | 1330 | rb_update_event(event, type, length); |
1328 | 1331 | ||
1329 | /* The passed in type is zero for DATA */ | 1332 | /* The passed in type is zero for DATA */ |
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 0f57f1b443b6..076fa6f0ee48 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
@@ -344,7 +344,7 @@ static raw_spinlock_t ftrace_max_lock = | |||
344 | /* | 344 | /* |
345 | * Copy the new maximum trace into the separate maximum-trace | 345 | * Copy the new maximum trace into the separate maximum-trace |
346 | * structure. (this way the maximum trace is permanently saved, | 346 | * structure. (this way the maximum trace is permanently saved, |
347 | * for later retrieval via /debugfs/tracing/latency_trace) | 347 | * for later retrieval via /sys/kernel/debug/tracing/latency_trace) |
348 | */ | 348 | */ |
349 | static void | 349 | static void |
350 | __update_max_tr(struct trace_array *tr, struct task_struct *tsk, int cpu) | 350 | __update_max_tr(struct trace_array *tr, struct task_struct *tsk, int cpu) |
@@ -2414,21 +2414,20 @@ static const struct file_operations tracing_iter_fops = { | |||
2414 | 2414 | ||
2415 | static const char readme_msg[] = | 2415 | static const char readme_msg[] = |
2416 | "tracing mini-HOWTO:\n\n" | 2416 | "tracing mini-HOWTO:\n\n" |
2417 | "# mkdir /debug\n" | 2417 | "# mount -t debugfs nodev /sys/kernel/debug\n\n" |
2418 | "# mount -t debugfs nodev /debug\n\n" | 2418 | "# cat /sys/kernel/debug/tracing/available_tracers\n" |
2419 | "# cat /debug/tracing/available_tracers\n" | ||
2420 | "wakeup preemptirqsoff preemptoff irqsoff function sched_switch nop\n\n" | 2419 | "wakeup preemptirqsoff preemptoff irqsoff function sched_switch nop\n\n" |
2421 | "# cat /debug/tracing/current_tracer\n" | 2420 | "# cat /sys/kernel/debug/tracing/current_tracer\n" |
2422 | "nop\n" | 2421 | "nop\n" |
2423 | "# echo sched_switch > /debug/tracing/current_tracer\n" | 2422 | "# echo sched_switch > /sys/kernel/debug/tracing/current_tracer\n" |
2424 | "# cat /debug/tracing/current_tracer\n" | 2423 | "# cat /sys/kernel/debug/tracing/current_tracer\n" |
2425 | "sched_switch\n" | 2424 | "sched_switch\n" |
2426 | "# cat /debug/tracing/trace_options\n" | 2425 | "# cat /sys/kernel/debug/tracing/trace_options\n" |
2427 | "noprint-parent nosym-offset nosym-addr noverbose\n" | 2426 | "noprint-parent nosym-offset nosym-addr noverbose\n" |
2428 | "# echo print-parent > /debug/tracing/trace_options\n" | 2427 | "# echo print-parent > /sys/kernel/debug/tracing/trace_options\n" |
2429 | "# echo 1 > /debug/tracing/tracing_enabled\n" | 2428 | "# echo 1 > /sys/kernel/debug/tracing/tracing_enabled\n" |
2430 | "# cat /debug/tracing/trace > /tmp/trace.txt\n" | 2429 | "# cat /sys/kernel/debug/tracing/trace > /tmp/trace.txt\n" |
2431 | "# echo 0 > /debug/tracing/tracing_enabled\n" | 2430 | "# echo 0 > /sys/kernel/debug/tracing/tracing_enabled\n" |
2432 | ; | 2431 | ; |
2433 | 2432 | ||
2434 | static ssize_t | 2433 | static ssize_t |
diff --git a/kernel/trace/trace_sysprof.c b/kernel/trace/trace_sysprof.c index e04b76cc238a..f6693969287d 100644 --- a/kernel/trace/trace_sysprof.c +++ b/kernel/trace/trace_sysprof.c | |||
@@ -203,7 +203,8 @@ static void start_stack_timer(void *unused) | |||
203 | hrtimer_init(hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); | 203 | hrtimer_init(hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); |
204 | hrtimer->function = stack_trace_timer_fn; | 204 | hrtimer->function = stack_trace_timer_fn; |
205 | 205 | ||
206 | hrtimer_start(hrtimer, ns_to_ktime(sample_period), HRTIMER_MODE_REL); | 206 | hrtimer_start(hrtimer, ns_to_ktime(sample_period), |
207 | HRTIMER_MODE_REL_PINNED); | ||
207 | } | 208 | } |
208 | 209 | ||
209 | static void start_stack_timers(void) | 210 | static void start_stack_timers(void) |