diff mbox

[trivial] trace-events: don't use dtrace reserved words in and next

Message ID 1332921337-14785-1-git-send-email-alevy@redhat.com
State New
Headers show

Commit Message

Alon Levy March 28, 2012, 7:55 a.m. UTC
---
 trace-events |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Stefan Hajnoczi March 28, 2012, 12:55 p.m. UTC | #1
On Wed, Mar 28, 2012 at 8:55 AM, Alon Levy <alevy@redhat.com> wrote:
> ---
>  trace-events |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

We're always going to struggle with new trace events that add reserved
keywords.  Fixing up trace-events is going to be an ongoing task so
I'd like to also see tracetool automatically modify keywords 'next' ->
'next_'.  Do you want to send a patch to do that instead?

Stefan
Alon Levy March 28, 2012, 1:16 p.m. UTC | #2
On Wed, Mar 28, 2012 at 01:55:49PM +0100, Stefan Hajnoczi wrote:
> On Wed, Mar 28, 2012 at 8:55 AM, Alon Levy <alevy@redhat.com> wrote:
> > ---
> >  trace-events |    4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> We're always going to struggle with new trace events that add reserved
> keywords.  Fixing up trace-events is going to be an ongoing task so
> I'd like to also see tracetool automatically modify keywords 'next' ->
> 'next_'.  Do you want to send a patch to do that instead?

sure. For the new tracetool.py too ? :)

> 
> Stefan
>
Alon Levy March 28, 2012, 1:33 p.m. UTC | #3
On Wed, Mar 28, 2012 at 03:16:34PM +0200, Alon Levy wrote:
> On Wed, Mar 28, 2012 at 01:55:49PM +0100, Stefan Hajnoczi wrote:
> > On Wed, Mar 28, 2012 at 8:55 AM, Alon Levy <alevy@redhat.com> wrote:
> > > ---
> > >  trace-events |    4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > We're always going to struggle with new trace events that add reserved
> > keywords.  Fixing up trace-events is going to be an ongoing task so
> > I'd like to also see tracetool automatically modify keywords 'next' ->
> > 'next_'.  Do you want to send a patch to do that instead?
> 

hmm, I changed to _next, not next_, if you'd like to change that and
commit I don't mind.

> sure. For the new tracetool.py too ? :)
> 
> > 
> > Stefan
> > 
>
Stefan Hajnoczi March 28, 2012, 1:35 p.m. UTC | #4
On Wed, Mar 28, 2012 at 2:33 PM, Alon Levy <alevy@redhat.com> wrote:
> On Wed, Mar 28, 2012 at 03:16:34PM +0200, Alon Levy wrote:
>> On Wed, Mar 28, 2012 at 01:55:49PM +0100, Stefan Hajnoczi wrote:
>> > On Wed, Mar 28, 2012 at 8:55 AM, Alon Levy <alevy@redhat.com> wrote:
>> > > ---
>> > >  trace-events |    4 ++--
>> > >  1 file changed, 2 insertions(+), 2 deletions(-)
>> >
>> > We're always going to struggle with new trace events that add reserved
>> > keywords.  Fixing up trace-events is going to be an ongoing task so
>> > I'd like to also see tracetool automatically modify keywords 'next' ->
>> > 'next_'.  Do you want to send a patch to do that instead?
>>
>
> hmm, I changed to _next, not next_, if you'd like to change that and
> commit I don't mind.

Thanks.  next_ can be a little safer when languages reserve
identifiers starting with '_'.  I can tweak it.

Stefan
diff mbox

Patch

diff --git a/trace-events b/trace-events
index 70f059d..0924666 100644
--- a/trace-events
+++ b/trace-events
@@ -313,7 +313,7 @@  usb_host_set_interface(int bus, int addr, int interface, int alt) "dev %d:%d, in
 usb_host_claim_interfaces(int bus, int addr, int config, int nif) "dev %d:%d, config %d, nif %d"
 usb_host_release_interfaces(int bus, int addr) "dev %d:%d"
 usb_host_req_control(int bus, int addr, int req, int value, int index) "dev %d:%d, req 0x%x, value %d, index %d"
-usb_host_req_data(int bus, int addr, int in, int ep, int size) "dev %d:%d, in %d, ep %d, size %d"
+usb_host_req_data(int bus, int addr, int _in, int ep, int size) "dev %d:%d, in %d, ep %d, size %d"
 usb_host_req_complete(int bus, int addr, int status) "dev %d:%d, status %d"
 usb_host_urb_submit(int bus, int addr, void *aurb, int length, int more) "dev %d:%d, aurb %p, length %d, more %d"
 usb_host_urb_complete(int bus, int addr, void *aurb, int status, int length, int more) "dev %d:%d, aurb %p, status %d, length %d, more %d"
@@ -562,7 +562,7 @@  qemu_coroutine_terminate(void *co) "self %p"
 
 # qemu-coroutine-lock.c
 qemu_co_queue_next_bh(void) ""
-qemu_co_queue_next(void *next) "next %p"
+qemu_co_queue_next(void *_next) "next %p"
 qemu_co_mutex_lock_entry(void *mutex, void *self) "mutex %p self %p"
 qemu_co_mutex_lock_return(void *mutex, void *self) "mutex %p self %p"
 qemu_co_mutex_unlock_entry(void *mutex, void *self) "mutex %p self %p"