public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Frederic Weisbecker <fweisbec@gmail.com>
To: Masami Hiramatsu <mhiramat@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>, LKML <linux-kernel@vger.kernel.org>,
	Lai Jiangshan <laijs@cn.fujitsu.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>,
	Jiaying Zhang <jiayingz@google.com>,
	Martin Bligh <mbligh@google.com>, Li Zefan <lizf@cn.fujitsu.com>,
	Jason Baron <jbaron@redhat.com>
Subject: Re: [PATCH 15/16] tracing: Add fields format definition for syscall events
Date: Wed, 19 Aug 2009 19:37:35 +0200	[thread overview]
Message-ID: <20090819173734.GG4972@nowhere> (raw)
In-Reply-To: <4A8C3290.3070900@redhat.com>

On Wed, Aug 19, 2009 at 01:12:48PM -0400, Masami Hiramatsu wrote:
> Frederic Weisbecker wrote:
> > Define the format of the syscall trace fields to parse the binary
> > values from a raw trace using the syscall events "format" file.
> > 
> > This is defined dynamically using the syscalls metadata.
> > It prepares the export of syscall event raw records to perf
> > counters.
> > 
> > Example:
> > 
> > $ cat /debug/tracing/events/syscalls/sys_enter_sched_getparam/format
> > name: sys_enter_sched_getparam
> > ID: 39
> > format:
> > 	field:unsigned short common_type;	offset:0;	size:2;
> > 	field:unsigned char common_flags;	offset:2;	size:1;
> > 	field:unsigned char common_preempt_count;	offset:3;	size:1;
> > 	field:int common_pid;	offset:4;	size:4;
> > 	field:int common_tgid;	offset:8;	size:4;
> > 
> > 	field:pid_t pid;	offset:12;	size:8;
> > 	field:struct sched_param * param;	offset:20;	size:8;
> > 
> > print fmt: "pid: 0x%08lx, param: 0x%08lx", ((unsigned long)(REC->pid)), ((unsigned long)(REC->param))
> 
> Hi Frederic,
> 
> I've found that the formats of some syscall events were too big.
> 
> ---
> $ for i in sys_enter* ;do grep name $i/format > /dev/null || echo $i has broken format. ; done sys_enter_getegid has broken format.
> sys_enter_geteuid has broken format.
> sys_enter_getgid has broken format.
> sys_enter_getpgrp has broken format.
> sys_enter_getpid has broken format.
> sys_enter_getppid has broken format.
> sys_enter_gettid has broken format.
> sys_enter_getuid has broken format.
> sys_enter_inotify_init has broken format.
> sys_enter_munlockall has broken format.
> sys_enter_pause has broken format.
> sys_enter_restart_syscall has broken format.
> sys_enter_sched_yield has broken format.
> sys_enter_setsid has broken format.
> sys_enter_sync has broken format.
> sys_enter_vhangup has broken format.
> 
> $ cat sys_enter_getegid/format
> FORMAT TOO BIG
> ---
> 
> And it causes an error on ./perf trace.
> 
> ---
> $ ./perf record -R -e syscalls:sys_enter_read -a -f  cat libperf.a > /dev/null
> 
> $ ./perf trace
>   Fatal: Error: expected 'name' but read 'FORMAT'
> version = 0.5
> ---
> 
> Thank you,


Yeah, I have yet to fix this, that because syscalls that have no parameters
raise a small bug in the return value of trace_seq_printf() while printing
their format, returning 0 as if the buffer was full and lost some bits.

However, It's possible that the last patches from Li fix this, since he did
a total/better refactoring of the format definition for syscall events.

I'll check this,
Thanks!


  reply	other threads:[~2009-08-19 17:37 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-11 18:48 [GIT PULL] tracing: Syscalls trace events + perf support Frederic Weisbecker
2009-08-11 18:48 ` [PATCH 01/16] tracing: Rename set_tracer_flags()'s local variable trace_flags Frederic Weisbecker
2009-08-11 18:48 ` [PATCH 02/16] tracing: Map syscall name to number Frederic Weisbecker
2009-08-11 18:48 ` [PATCH 03/16] tracing: Call arch_init_ftrace_syscalls at boot Frederic Weisbecker
2009-08-11 18:48 ` [PATCH 04/16] tracing: Add DECLARE_TRACE_WITH_CALLBACK() macro Frederic Weisbecker
2009-08-11 18:48 ` [PATCH 05/16] tracing: Add syscall tracepoints Frederic Weisbecker
2009-08-11 18:48 ` [PATCH 06/16] tracing: Update FTRACE_SYSCALL_MAX Frederic Weisbecker
2009-08-11 18:48 ` [PATCH 07/16] tracing: Raw_init() bailout in trace event register fail case Frederic Weisbecker
2009-08-11 18:48 ` [PATCH 08/16] tracing: Add ftrace_event_call void * 'data' field Frederic Weisbecker
2009-08-11 18:48 ` [PATCH 09/16] tracing: Add trace events for each syscall entry/exit Frederic Weisbecker
2009-08-11 18:48 ` [PATCH 10/16] tracing: Add individual syscalls tracepoint id support Frederic Weisbecker
2009-08-11 18:49 ` [PATCH 11/16] tracing: Add perf counter support for syscalls tracing Frederic Weisbecker
2009-08-11 18:49 ` [PATCH 12/16] tracing: Add more namespace area to 'perf list' output Frederic Weisbecker
2009-08-11 18:49 ` [PATCH 13/16] tracing: Convert x86_64 mmap and uname to use DEFINE_SYSCALL Frederic Weisbecker
2009-08-11 18:49 ` [PATCH 14/16] tracing: Add ftrace event call parameter to its field descriptor handler Frederic Weisbecker
2009-08-11 18:49 ` [PATCH 15/16] tracing: Add fields format definition for syscall events Frederic Weisbecker
2009-08-19 17:12   ` Masami Hiramatsu
2009-08-19 17:37     ` Frederic Weisbecker [this message]
2009-08-20  1:07       ` Li Zefan
2009-08-11 18:49 ` [PATCH 16/16] tracing: Support for syscall events raw records in perfcounters Frederic Weisbecker
2009-08-12  9:11 ` [GIT PULL] tracing: Syscalls trace events + perf support Ingo Molnar
2009-08-12 11:03   ` Ingo Molnar
2009-08-12 11:14     ` Ingo Molnar
2009-08-12 14:25       ` Jason Baron
2009-08-12 14:29         ` Ingo Molnar
2009-08-12 14:37           ` Jason Baron
2009-08-12 11:33     ` Frederic Weisbecker
2009-08-12 13:59       ` Jason Baron
2009-08-12 14:30         ` Ingo Molnar
2009-08-18  0:46   ` Paul Mundt
2009-08-18  7:32     ` Ingo Molnar
2009-08-18  8:51       ` [S390] ftrace: update system call tracer support Ingo Molnar
2009-08-18  8:59         ` Martin Schwidefsky
2009-08-18 10:05           ` Ingo Molnar
2009-08-18 10:22             ` Martin Schwidefsky
2009-08-18 14:56         ` Jason Baron
2009-08-18 10:25     ` [GIT PULL] tracing: Syscalls trace events + perf support Frederic Weisbecker
2009-08-18 11:06       ` Ingo Molnar
2009-08-18 11:56         ` Paul Mundt
2009-08-12 16:33 ` Masami Hiramatsu
2009-08-12 17:02   ` Masami Hiramatsu
2009-08-12 19:13     ` [RFD] Kprobes/Kretprobes " Frederic Weisbecker
2009-08-12 20:20       ` Masami Hiramatsu
2009-08-13  8:02         ` Ingo Molnar
2009-08-12 21:09       ` Peter Zijlstra
2009-08-12 21:27         ` Masami Hiramatsu
2009-08-12 21:37           ` Frederic Weisbecker
2009-08-12 21:35         ` Frederic Weisbecker
2009-08-14 15:05       ` Masami Hiramatsu
2009-08-15 14:33         ` Ingo Molnar
2009-08-17 21:58           ` Masami Hiramatsu

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=20090819173734.GG4972@nowhere \
    --to=fweisbec@gmail.com \
    --cc=jbaron@redhat.com \
    --cc=jiayingz@google.com \
    --cc=laijs@cn.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizf@cn.fujitsu.com \
    --cc=mathieu.desnoyers@polymtl.ca \
    --cc=mbligh@google.com \
    --cc=mhiramat@redhat.com \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox