summaryrefslogtreecommitdiff
path: root/tools/perf
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2011-09-22 11:50:27 -0400
committerSteven Rostedt <rostedt@goodmis.org>2011-10-11 09:13:53 -0400
commitd696b58ca2c3ca76e784ef89a7e0453d9b7ab187 (patch)
treee5f02a13dc8fdec22e9223189122e5938e9ce77e /tools/perf
parente0a413f619ef8bc366dafc6f8221674993b8d85f (diff)
tracing: Do not allocate buffer for trace_marker
When doing intense tracing, the kmalloc inside trace_marker can introduce side effects to what is being traced. As trace_marker() is used by userspace to inject data into the kernel ring buffer, it needs to do so with the least amount of intrusion to the operations of the kernel or the user space application. As the ring buffer is designed to write directly into the buffer without the need to make a temporary buffer, and userspace already went through the hassle of knowing how big the write will be, we can simply pin the userspace pages and write the data directly into the buffer. This improves the impact of tracing via trace_marker tremendously! Thanks to Peter Zijlstra and Thomas Gleixner for pointing out the use of get_user_pages_fast() and kmap_atomic(). Suggested-by: Thomas Gleixner <tglx@linutronix.de> Suggested-by: Peter Zijlstra <a.p.zijlstra@chello.nl> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'tools/perf')
0 files changed, 0 insertions, 0 deletions