diff options
Diffstat (limited to 'kernel/trace')
| -rw-r--r-- | kernel/trace/trace_selftest.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/kernel/trace/trace_selftest.c b/kernel/trace/trace_selftest.c index a2ca6f0fef9b..38856ba78a92 100644 --- a/kernel/trace/trace_selftest.c +++ b/kernel/trace/trace_selftest.c | |||
| @@ -315,6 +315,14 @@ trace_selftest_startup_irqsoff(struct tracer *trace, struct trace_array *tr) | |||
| 315 | local_irq_disable(); | 315 | local_irq_disable(); |
| 316 | udelay(100); | 316 | udelay(100); |
| 317 | local_irq_enable(); | 317 | local_irq_enable(); |
| 318 | |||
| 319 | /* | ||
| 320 | * Stop the tracer to avoid a warning subsequent | ||
| 321 | * to buffer flipping failure because tracing_stop() | ||
| 322 | * disables the tr and max buffers, making flipping impossible | ||
| 323 | * in case of parallels max irqs off latencies. | ||
| 324 | */ | ||
| 325 | trace->stop(tr); | ||
| 318 | /* stop the tracing. */ | 326 | /* stop the tracing. */ |
| 319 | tracing_stop(); | 327 | tracing_stop(); |
| 320 | /* check both trace buffers */ | 328 | /* check both trace buffers */ |
| @@ -369,6 +377,14 @@ trace_selftest_startup_preemptoff(struct tracer *trace, struct trace_array *tr) | |||
| 369 | preempt_disable(); | 377 | preempt_disable(); |
| 370 | udelay(100); | 378 | udelay(100); |
| 371 | preempt_enable(); | 379 | preempt_enable(); |
| 380 | |||
| 381 | /* | ||
| 382 | * Stop the tracer to avoid a warning subsequent | ||
| 383 | * to buffer flipping failure because tracing_stop() | ||
| 384 | * disables the tr and max buffers, making flipping impossible | ||
| 385 | * in case of parallels max preempt off latencies. | ||
| 386 | */ | ||
| 387 | trace->stop(tr); | ||
| 372 | /* stop the tracing. */ | 388 | /* stop the tracing. */ |
| 373 | tracing_stop(); | 389 | tracing_stop(); |
| 374 | /* check both trace buffers */ | 390 | /* check both trace buffers */ |
| @@ -428,6 +444,13 @@ trace_selftest_startup_preemptirqsoff(struct tracer *trace, struct trace_array * | |||
| 428 | /* reverse the order of preempt vs irqs */ | 444 | /* reverse the order of preempt vs irqs */ |
| 429 | local_irq_enable(); | 445 | local_irq_enable(); |
| 430 | 446 | ||
| 447 | /* | ||
| 448 | * Stop the tracer to avoid a warning subsequent | ||
| 449 | * to buffer flipping failure because tracing_stop() | ||
| 450 | * disables the tr and max buffers, making flipping impossible | ||
| 451 | * in case of parallels max irqs/preempt off latencies. | ||
| 452 | */ | ||
| 453 | trace->stop(tr); | ||
| 431 | /* stop the tracing. */ | 454 | /* stop the tracing. */ |
| 432 | tracing_stop(); | 455 | tracing_stop(); |
| 433 | /* check both trace buffers */ | 456 | /* check both trace buffers */ |
| @@ -448,6 +471,8 @@ trace_selftest_startup_preemptirqsoff(struct tracer *trace, struct trace_array * | |||
| 448 | /* do the test by disabling interrupts first this time */ | 471 | /* do the test by disabling interrupts first this time */ |
| 449 | tracing_max_latency = 0; | 472 | tracing_max_latency = 0; |
| 450 | tracing_start(); | 473 | tracing_start(); |
| 474 | trace->start(tr); | ||
| 475 | |||
| 451 | preempt_disable(); | 476 | preempt_disable(); |
| 452 | local_irq_disable(); | 477 | local_irq_disable(); |
| 453 | udelay(100); | 478 | udelay(100); |
| @@ -455,6 +480,7 @@ trace_selftest_startup_preemptirqsoff(struct tracer *trace, struct trace_array * | |||
| 455 | /* reverse the order of preempt vs irqs */ | 480 | /* reverse the order of preempt vs irqs */ |
| 456 | local_irq_enable(); | 481 | local_irq_enable(); |
| 457 | 482 | ||
| 483 | trace->stop(tr); | ||
| 458 | /* stop the tracing. */ | 484 | /* stop the tracing. */ |
| 459 | tracing_stop(); | 485 | tracing_stop(); |
| 460 | /* check both trace buffers */ | 486 | /* check both trace buffers */ |
