Re: [PATCH 03/18] tracing: Add simple arguments to function based events

From: Steven Rostedt
Date: Thu Feb 08 2018 - 10:38:05 EST


On Thu, 8 Feb 2018 19:18:18 +0900
Namhyung Kim <namhyung@xxxxxxxxxx> wrote:
call->event.type,
> > @@ -150,6 +310,15 @@ static void func_event_trace(struct trace_event_file *trace_file,
> > entry = ring_buffer_event_data(event);
> > entry->ip = ip;
> > entry->parent_ip = parent_ip;
> > + nr_args = arch_get_func_args(pt_regs, 0, func_event->arg_cnt, args);
> > +
> > + list_for_each_entry(arg, &func_event->args, list) {
> > + if (i < nr_args)
> > + val = args[i];
> > + else
> > + val = 0;
> > + memcpy(&entry->data[arg->offset], &val, arg->size);
> > + }
>
> Where is the 'i' increased?

Good question. I think the increment got nuked via one of my rebases,
and then most my testing happened at the end of the patch series where
"i" is no longer used. But that's no excuse for keeping this bug
around. I'll fix it and test again at each patch.

Thanks for reporting.

-- Steve