All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lai Jiangshan <laijs@cn.fujitsu.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>,
	Ingo Molnar <mingo@elte.hu>, Jason Baron <jbaron@redhat.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] tracing: separate raw syscall from syscall tracer
Date: Wed, 25 Nov 2009 10:08:14 +0800	[thread overview]
Message-ID: <4B0C918E.1070101@cn.fujitsu.com> (raw)
In-Reply-To: <20091103082311.GA4815@nowhere>

Frederic Weisbecker wrote:
> On Tue, Nov 03, 2009 at 01:45:32PM +0800, Lai Jiangshan wrote:
>> 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)
>>    it wastes too much.
>> B) the lines include "sys_enter/sys_exit" makes
>>    we hardly get the useful information for the output.
>>
>> 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 it's not friendly for users. 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>
>> ---
> 
> 
> Agreed, that's indeed not convenient.
> 
> Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
> 
> 
> 

Hi, Steven

Could you accept this patch?

Lai

  reply	other threads:[~2009-11-25  2:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-03  5:45 [PATCH] tracing: separate raw syscall from syscall tracer Lai Jiangshan
2009-11-03  8:23 ` Frederic Weisbecker
2009-11-25  2:08   ` Lai Jiangshan [this message]
2009-11-25  3:41     ` Steven Rostedt
2009-11-26  9:54 ` [tip:tracing/core] tracing: Separate " tip-bot for Lai Jiangshan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B0C918E.1070101@cn.fujitsu.com \
    --to=laijs@cn.fujitsu.com \
    --cc=fweisbec@gmail.com \
    --cc=jbaron@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.