2014-06-03 02:43:31

by Namhyung Kim

[permalink] [raw]
Subject: Re: [PATCH 4/4] tools lib traceevent: Added support for __get_bitmask() macro

Hi Steve,

On Fri, 16 May 2014 10:02:19 -0400, Steven Rostedt wrote:
> @@ -3691,6 +3784,23 @@ static void print_str_arg(struct trace_seq *s, void *data, int size,
> case PRINT_BSTRING:
> print_str_to_seq(s, format, len_arg, arg->string.string);
> break;
> + case PRINT_BITMASK: {
> + int bitmask_offset;
> + int bitmask_size;
> +
> + if (arg->bitmask.offset == -1) {
> + struct format_field *f;
> +
> + f = pevent_find_any_field(event, arg->bitmask.bitmask);
> + arg->bitmask.offset = f->offset;
> + }
> + bitmask_offset = data2host4(pevent, data + arg->string.offset);

s/string.offset/bitmask.offset/

Thanks,
Namhyung


> + bitmask_size = bitmask_offset >> 16;
> + bitmask_offset &= 0xffff;
> + print_bitmask_to_seq(pevent, s, format, len_arg,
> + data + bitmask_offset, bitmask_size);
> + break;
> + }


2014-06-03 02:47:47

by Steven Rostedt

[permalink] [raw]
Subject: Re: [PATCH 4/4] tools lib traceevent: Added support for __get_bitmask() macro

On Tue, 03 Jun 2014 11:43:26 +0900
Namhyung Kim <[email protected]> wrote:

> Hi Steve,
>
> On Fri, 16 May 2014 10:02:19 -0400, Steven Rostedt wrote:
> > @@ -3691,6 +3784,23 @@ static void print_str_arg(struct trace_seq *s, void *data, int size,
> > case PRINT_BSTRING:
> > print_str_to_seq(s, format, len_arg, arg->string.string);
> > break;
> > + case PRINT_BITMASK: {
> > + int bitmask_offset;
> > + int bitmask_size;
> > +
> > + if (arg->bitmask.offset == -1) {
> > + struct format_field *f;
> > +
> > + f = pevent_find_any_field(event, arg->bitmask.bitmask);
> > + arg->bitmask.offset = f->offset;
> > + }
> > + bitmask_offset = data2host4(pevent, data + arg->string.offset);
>
> s/string.offset/bitmask.offset/

Duh, thanks!

-- Steve

>
> Thanks,
> Namhyung
>
>
> > + bitmask_size = bitmask_offset >> 16;
> > + bitmask_offset &= 0xffff;
> > + print_bitmask_to_seq(pevent, s, format, len_arg,
> > + data + bitmask_offset, bitmask_size);
> > + break;
> > + }