diff options
author | Steven Rostedt <srostedt@redhat.com> | 2009-01-22 11:18:06 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-01-23 05:10:36 -0500 |
commit | 94523e818f283d3c69f621406f633afff46dbf82 (patch) | |
tree | b1190670c2928490267778f58d1fa034e1a1f65c /kernel/trace/trace_irqsoff.c | |
parent | 9b03638963e4b239dff1b424b91062a710d4b2e9 (diff) |
trace: remove internal irqsoff disabling for trace output
Impact: cleanup of duplicate features
The trace output disables the ring buffer and prevents tracing to
occur. The code in irqsoff to do the same thing is no longer needed.
This patch removes it.
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/trace/trace_irqsoff.c')
-rw-r--r-- | kernel/trace/trace_irqsoff.c | 34 |
1 files changed, 2 insertions, 32 deletions
diff --git a/kernel/trace/trace_irqsoff.c b/kernel/trace/trace_irqsoff.c index 62a78d943534..ed344b022a14 100644 --- a/kernel/trace/trace_irqsoff.c +++ b/kernel/trace/trace_irqsoff.c | |||
@@ -353,28 +353,18 @@ void trace_preempt_off(unsigned long a0, unsigned long a1) | |||
353 | } | 353 | } |
354 | #endif /* CONFIG_PREEMPT_TRACER */ | 354 | #endif /* CONFIG_PREEMPT_TRACER */ |
355 | 355 | ||
356 | /* | ||
357 | * save_tracer_enabled is used to save the state of the tracer_enabled | ||
358 | * variable when we disable it when we open a trace output file. | ||
359 | */ | ||
360 | static int save_tracer_enabled; | ||
361 | |||
362 | static void start_irqsoff_tracer(struct trace_array *tr) | 356 | static void start_irqsoff_tracer(struct trace_array *tr) |
363 | { | 357 | { |
364 | register_ftrace_function(&trace_ops); | 358 | register_ftrace_function(&trace_ops); |
365 | if (tracing_is_enabled()) { | 359 | if (tracing_is_enabled()) |
366 | tracer_enabled = 1; | 360 | tracer_enabled = 1; |
367 | save_tracer_enabled = 1; | 361 | else |
368 | } else { | ||
369 | tracer_enabled = 0; | 362 | tracer_enabled = 0; |
370 | save_tracer_enabled = 0; | ||
371 | } | ||
372 | } | 363 | } |
373 | 364 | ||
374 | static void stop_irqsoff_tracer(struct trace_array *tr) | 365 | static void stop_irqsoff_tracer(struct trace_array *tr) |
375 | { | 366 | { |
376 | tracer_enabled = 0; | 367 | tracer_enabled = 0; |
377 | save_tracer_enabled = 0; | ||
378 | unregister_ftrace_function(&trace_ops); | 368 | unregister_ftrace_function(&trace_ops); |
379 | } | 369 | } |
380 | 370 | ||
@@ -395,25 +385,11 @@ static void irqsoff_tracer_reset(struct trace_array *tr) | |||
395 | static void irqsoff_tracer_start(struct trace_array *tr) | 385 | static void irqsoff_tracer_start(struct trace_array *tr) |
396 | { | 386 | { |
397 | tracer_enabled = 1; | 387 | tracer_enabled = 1; |
398 | save_tracer_enabled = 1; | ||
399 | } | 388 | } |
400 | 389 | ||
401 | static void irqsoff_tracer_stop(struct trace_array *tr) | 390 | static void irqsoff_tracer_stop(struct trace_array *tr) |
402 | { | 391 | { |
403 | tracer_enabled = 0; | 392 | tracer_enabled = 0; |
404 | save_tracer_enabled = 0; | ||
405 | } | ||
406 | |||
407 | static void irqsoff_tracer_open(struct trace_iterator *iter) | ||
408 | { | ||
409 | /* stop the trace while dumping */ | ||
410 | tracer_enabled = 0; | ||
411 | } | ||
412 | |||
413 | static void irqsoff_tracer_close(struct trace_iterator *iter) | ||
414 | { | ||
415 | /* restart tracing */ | ||
416 | tracer_enabled = save_tracer_enabled; | ||
417 | } | 393 | } |
418 | 394 | ||
419 | #ifdef CONFIG_IRQSOFF_TRACER | 395 | #ifdef CONFIG_IRQSOFF_TRACER |
@@ -431,8 +407,6 @@ static struct tracer irqsoff_tracer __read_mostly = | |||
431 | .reset = irqsoff_tracer_reset, | 407 | .reset = irqsoff_tracer_reset, |
432 | .start = irqsoff_tracer_start, | 408 | .start = irqsoff_tracer_start, |
433 | .stop = irqsoff_tracer_stop, | 409 | .stop = irqsoff_tracer_stop, |
434 | .open = irqsoff_tracer_open, | ||
435 | .close = irqsoff_tracer_close, | ||
436 | .print_max = 1, | 410 | .print_max = 1, |
437 | #ifdef CONFIG_FTRACE_SELFTEST | 411 | #ifdef CONFIG_FTRACE_SELFTEST |
438 | .selftest = trace_selftest_startup_irqsoff, | 412 | .selftest = trace_selftest_startup_irqsoff, |
@@ -459,8 +433,6 @@ static struct tracer preemptoff_tracer __read_mostly = | |||
459 | .reset = irqsoff_tracer_reset, | 433 | .reset = irqsoff_tracer_reset, |
460 | .start = irqsoff_tracer_start, | 434 | .start = irqsoff_tracer_start, |
461 | .stop = irqsoff_tracer_stop, | 435 | .stop = irqsoff_tracer_stop, |
462 | .open = irqsoff_tracer_open, | ||
463 | .close = irqsoff_tracer_close, | ||
464 | .print_max = 1, | 436 | .print_max = 1, |
465 | #ifdef CONFIG_FTRACE_SELFTEST | 437 | #ifdef CONFIG_FTRACE_SELFTEST |
466 | .selftest = trace_selftest_startup_preemptoff, | 438 | .selftest = trace_selftest_startup_preemptoff, |
@@ -489,8 +461,6 @@ static struct tracer preemptirqsoff_tracer __read_mostly = | |||
489 | .reset = irqsoff_tracer_reset, | 461 | .reset = irqsoff_tracer_reset, |
490 | .start = irqsoff_tracer_start, | 462 | .start = irqsoff_tracer_start, |
491 | .stop = irqsoff_tracer_stop, | 463 | .stop = irqsoff_tracer_stop, |
492 | .open = irqsoff_tracer_open, | ||
493 | .close = irqsoff_tracer_close, | ||
494 | .print_max = 1, | 464 | .print_max = 1, |
495 | #ifdef CONFIG_FTRACE_SELFTEST | 465 | #ifdef CONFIG_FTRACE_SELFTEST |
496 | .selftest = trace_selftest_startup_preemptirqsoff, | 466 | .selftest = trace_selftest_startup_preemptirqsoff, |