Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1256723 > unrolled thread
| Started by | Chunyan Zhang <zhang.chunyan@linaro.org> |
|---|---|
| First post | 2015-10-27 13:20 +0100 |
| Last post | 2015-10-28 03:30 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] tracing: Only benchmark the time tracepoints take if tracing is on Chunyan Zhang <zhang.chunyan@linaro.org> - 2015-10-27 13:20 +0100
Re: [PATCH] tracing: Only benchmark the time tracepoints take if tracing is on Steven Rostedt <rostedt@goodmis.org> - 2015-10-28 03:30 +0100
| From | Chunyan Zhang <zhang.chunyan@linaro.org> |
|---|---|
| Date | 2015-10-27 13:20 +0100 |
| Subject | [PATCH] tracing: Only benchmark the time tracepoints take if tracing is on |
| Message-ID | <qobom-56u-5@gated-at.bofh.it> |
There's no need to record the time tracepoints take when tracing is off. This is because: 1) We cannot see these records since ring_buffer record is off at that moment. 2) If tracing is off and benchmark tracepoint is enabled, the time tracepoint takes is fewer than the same situation when tracing is on, since the tracepoints need to be wrote into ring_buffer, it would take more time. If turn on tracing at this moment, the average and standard deviation cannot exactly present the time that tracepoints take to write data into ring_buffer. Signed-off-by: Chunyan Zhang <zhang.chunyan@linaro.org> --- kernel/trace/trace_benchmark.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/trace/trace_benchmark.c b/kernel/trace/trace_benchmark.c index 40a14cb..0f109c4 100644 --- a/kernel/trace/trace_benchmark.c +++ b/kernel/trace/trace_benchmark.c @@ -43,7 +43,7 @@ static void trace_do_benchmark(void) unsigned int std = 0; /* Only run if the tracepoint is actually active */ - if (!trace_benchmark_event_enabled()) + if (!trace_benchmark_event_enabled() || !tracing_is_on()) return; local_irq_disable(); -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Steven Rostedt <rostedt@goodmis.org> |
|---|---|
| Date | 2015-10-28 03:30 +0100 |
| Subject | Re: [PATCH] tracing: Only benchmark the time tracepoints take if tracing is on |
| Message-ID | <qooEV-4Wx-3@gated-at.bofh.it> |
| In reply to | #1256723 |
On Tue, 27 Oct 2015 20:12:13 +0800 Chunyan Zhang <zhang.chunyan@linaro.org> wrote: > There's no need to record the time tracepoints take when tracing is off. > This is because: > 1) We cannot see these records since ring_buffer record is off at that > moment. > 2) If tracing is off and benchmark tracepoint is enabled, the time > tracepoint takes is fewer than the same situation when tracing is on, > since the tracepoints need to be wrote into ring_buffer, it would > take more time. If turn on tracing at this moment, the average and > standard deviation cannot exactly present the time that tracepoints > take to write data into ring_buffer. > Thanks! I'll add this when I get back from traveling. -- Steve > Signed-off-by: Chunyan Zhang <zhang.chunyan@linaro.org> -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web