diff options
Diffstat (limited to 'kernel/trace/Kconfig')
| -rw-r--r-- | kernel/trace/Kconfig | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/kernel/trace/Kconfig b/kernel/trace/Kconfig index 8639819f6cef..d4409356f40d 100644 --- a/kernel/trace/Kconfig +++ b/kernel/trace/Kconfig | |||
| @@ -535,6 +535,36 @@ config MMIOTRACE_TEST | |||
| 535 | 535 | ||
| 536 | Say N, unless you absolutely know what you are doing. | 536 | Say N, unless you absolutely know what you are doing. |
| 537 | 537 | ||
| 538 | config TRACEPOINT_BENCHMARK | ||
| 539 | bool "Add tracepoint that benchmarks tracepoints" | ||
| 540 | help | ||
| 541 | This option creates the tracepoint "benchmark:benchmark_event". | ||
| 542 | When the tracepoint is enabled, it kicks off a kernel thread that | ||
| 543 | goes into an infinite loop (calling cond_sched() to let other tasks | ||
| 544 | run), and calls the tracepoint. Each iteration will record the time | ||
| 545 | it took to write to the tracepoint and the next iteration that | ||
| 546 | data will be passed to the tracepoint itself. That is, the tracepoint | ||
| 547 | will report the time it took to do the previous tracepoint. | ||
| 548 | The string written to the tracepoint is a static string of 128 bytes | ||
| 549 | to keep the time the same. The initial string is simply a write of | ||
| 550 | "START". The second string records the cold cache time of the first | ||
| 551 | write which is not added to the rest of the calculations. | ||
| 552 | |||
| 553 | As it is a tight loop, it benchmarks as hot cache. That's fine because | ||
| 554 | we care most about hot paths that are probably in cache already. | ||
| 555 | |||
| 556 | An example of the output: | ||
| 557 | |||
| 558 | START | ||
| 559 | first=3672 [COLD CACHED] | ||
| 560 | last=632 first=3672 max=632 min=632 avg=316 std=446 std^2=199712 | ||
| 561 | last=278 first=3672 max=632 min=278 avg=303 std=316 std^2=100337 | ||
| 562 | last=277 first=3672 max=632 min=277 avg=296 std=258 std^2=67064 | ||
| 563 | last=273 first=3672 max=632 min=273 avg=292 std=224 std^2=50411 | ||
| 564 | last=273 first=3672 max=632 min=273 avg=288 std=200 std^2=40389 | ||
| 565 | last=281 first=3672 max=632 min=273 avg=287 std=183 std^2=33666 | ||
| 566 | |||
| 567 | |||
| 538 | config RING_BUFFER_BENCHMARK | 568 | config RING_BUFFER_BENCHMARK |
| 539 | tristate "Ring buffer benchmark stress tester" | 569 | tristate "Ring buffer benchmark stress tester" |
| 540 | depends on RING_BUFFER | 570 | depends on RING_BUFFER |
