linux/include/trace/events
Lai Jiangshan b8007ef742 tracing: Separate raw syscall from syscall tracer
The current syscall tracer mixes raw syscalls and real syscalls.

echo 1 > events/syscalls/enable
And we get these from the output:

(XXXX insteads "            grep-20914 [001] 588211.446347" .. etc)

XXXX: sys_read(fd: 3, buf: 80609a8, count: 7000)
XXXX: sys_enter: NR 3 (3, 80609a8, 7000, a, 1000, bfce8ef8)
XXXX: sys_read -> 0x138
XXXX: sys_exit: NR 3 = 312
XXXX: sys_read(fd: 3, buf: 8060ae0, count: 7000)
XXXX: sys_enter: NR 3 (3, 8060ae0, 7000, a, 1000, bfce8ef8)
XXXX: sys_read -> 0x138
XXXX: sys_exit: NR 3 = 312

There are 2 drawbacks here.
A) two almost identical records are saved in ringbuffer
   when a syscall enters or exits. (4 records for every syscall)
   This wastes precious space in the ring buffer.
B) the lines including "sys_enter/sys_exit" produces
   hardly any useful information for the output (no labels).

The user can use this method to prevent these drawbacks:
echo 1 > events/syscalls/enable
echo 0 > events/syscalls/sys_enter/enable
echo 0 > events/syscalls/sys_exit/enable

But this is not user friendly. So we separate raw syscall
from syscall tracer.

After this fix applied:
syscall tracer's output (echo 1 > events/syscalls/enable):

XXXX: sys_read(fd: 3, buf: bfe87d88, count: 200)
XXXX: sys_read -> 0x200
XXXX: sys_fstat64(fd: 3, statbuf: bfe87c98)
XXXX: sys_fstat64 -> 0x0
XXXX: sys_close(fd: 3)

raw syscall tracer's output (echo 1 > events/raw_syscalls/enable):

XXXX: sys_enter: NR 175 (0, bf92bf18, bf92bf98, 8, b748cff4, bf92bef8)
XXXX: sys_exit: NR 175 = 0
XXXX: sys_enter: NR 175 (2, bf92bf98, 0, 8, b748cff4, bf92bef8)
XXXX: sys_exit: NR 175 = 0
XXXX: sys_enter: NR 3 (9, bf927f9c, 4000, b77e2518, b77dce60, bf92bff8)

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
LKML-Reference: <4AEFC37C.5080609@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2009-11-25 14:20:06 -05:00
..
bkl.h tracing/bkl: Add bkl ftrace events 2009-09-24 15:16:31 +02:00
block.h Add a tracepoint for block request remapping 2009-10-01 21:19:34 +02:00
ext4.h ext4: Add a stub for mpage_da_data in the trace header 2009-09-30 00:51:22 -04:00
irq.h softirq: add BLOCK_IOPOLL to softirq_to_name 2009-09-17 15:53:44 -04:00
jbd2.h jbd2: Use tracepoints for history file 2009-09-30 00:32:06 -04:00
kmem.h tracing, page-allocator: add trace event for page traffic related to the buddy lists 2009-09-22 07:17:34 -07:00
kvm.h KVM: Add trace points in irqchip code 2009-09-10 08:33:11 +03:00
lockdep.h tracing/events: Move TRACE_SYSTEM outside of include guard 2009-07-13 10:59:55 +02:00
module.h tracing/events: Add module tracepoints 2009-08-17 11:25:08 +02:00
napi.h
power.h tracing, perf: Convert the power tracer into an event tracer 2009-09-19 11:42:12 +02:00
sched.h perf_counter, sched: Add sched_stat_runtime tracepoint 2009-09-13 18:17:28 +02:00
skb.h net: skb ftracer - add tracepoint to skb_copy_datagram_iovec (v3) 2009-08-13 16:26:14 -07:00
syscalls.h tracing: Separate raw syscall from syscall tracer 2009-11-25 14:20:06 -05:00
timer.h itimers: Add tracepoints for itimer 2009-08-29 14:10:07 +02:00
workqueue.h tracing/workqueue: Use %pf in workqueue trace events 2009-09-22 23:14:58 +02:00