mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Taeung Song <treeze.taeung@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
	linux-kernel@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>,
	Lai Jiangshan <jiangshanlai@gmail.com>
Subject: Re: [PATCH RESEND 1/3] tracing/syscalls: Rename variable 'nr' to 'syscall_nr'
Date: Thu, 25 Feb 2016 12:09:07 -0500	[thread overview]
Message-ID: <20160225120907.0a30d792@gandalf.local.home> (raw)
In-Reply-To: <20160225120501.5a99408c@gandalf.local.home>

On Thu, 25 Feb 2016 12:05:01 -0500
Steven Rostedt <rostedt@goodmis.org> wrote:

> On Fri, 26 Feb 2016 01:53:47 +0900
> Taeung Song <treeze.taeung@gmail.com> wrote:
> 
> > 
> > The underlying cause of this problem is not because of
> > the python script. This problem have relevance to tracing/syscalls
> > as below.
> > 
> > # cat 
> > /sys/kernel/debug/tracing/events/syscalls/sys_enter_io_getevents/format
> > name: sys_enter_io_getevents
> > ID: 739
> > format:
> >         field:unsigned short common_type; offset:0;size:2;signed:0;
> >         field:unsigned char common_flags; offset:2;size:1;signed:0;
> >         field:unsigned char common_preempt_count; offset:3;size:1;signed:0;
> >         field:int common_pid;             offset:4;size:4;signed:1;
> >         field:int nr;                     offset:8;size:4;signed:1;
> >         field:aio_context_t ctx_id;       offset:16;size:8;signed:0;
> >         field:long min_nr;                offset:24;size:8;signed:0;
> >         field:long nr;                    offset:32;size:8;signed:0;
> >         field:struct io_event * events;   offset:40;size:8;signed:0;
> >         field:struct timespec * timeout;  offset:48;size:8;signed:0;
> > 
> > print fmt: "ctx_id: 0x%08lx, min_nr: 0x%08lx, nr: 0x%08lx, events: 
> > 0x%08lx, timeout: 0x%08lx", ((unsigned long)(REC->ctx_id)), ((unsigned 
> > long)(REC->min_nr)), ((unsigned long)(REC->nr)), ((unsigned 
> > long)(REC->events)), ((unsigned long)(REC->timeout))
> > 
> > 
> > As you see, there are duplicated variable name among fields.
> > So I renamed the variable name 'nr' to 'syscall_nr' to avoid this
> > duplication. As you know 'nr' in print_syscall_enter() mean
> > system call number so, I changed 'nr' to 'syscall_nr'(IMHO).
> >   
> 
> The above should have been in the change log. That makes much more
> sense.
>

I'm a bit nervous about this change though. Because it is an ABI
change. Hopefully there's no tools that parse the syscall tracepoints
and expect to find a 'nr' in there.

-- Steve

  reply	other threads:[~2016-02-25 17:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-25 15:24 Taeung Song
2016-02-25 15:47 ` Steven Rostedt
2016-02-25 16:53   ` Taeung Song
2016-02-25 17:05     ` Steven Rostedt
2016-02-25 17:09       ` Steven Rostedt [this message]
2016-02-25 17:26         ` Taeung Song

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=20160225120907.0a30d792@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=acme@kernel.org \
    --cc=jiangshanlai@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=treeze.taeung@gmail.com \
    /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

all inboxes | Powered by JetHome®