[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1487085984.1208.9.camel@tzanussi-mobl.amr.corp.intel.com>
Date: Tue, 14 Feb 2017 09:26:24 -0600
From: Tom Zanussi <tom.zanussi@...ux.intel.com>
To: Namhyung Kim <namhyung@...nel.org>
Cc: rostedt@...dmis.org, tglx@...utronix.de, mhiramat@...nel.org,
linux-kernel@...r.kernel.org, linux-rt-users@...r.kernel.org
Subject: Re: [RFC][PATCH 12/21] tracing: Account for variables in named
trigger compatibility
On Mon, 2017-02-13 at 15:04 +0900, Namhyung Kim wrote:
> On Wed, Feb 08, 2017 at 11:25:08AM -0600, Tom Zanussi wrote:
> > Named triggers must also have the same set of variables in order to be
> > considered compatible - update the trigger match test to account for
> > that.
> >
> > The reason for this requirement is that named triggers with variables
> > are meant to allow one or more events to set the same variable.
> >
> > Signed-off-by: Tom Zanussi <tom.zanussi@...ux.intel.com>
> > ---
> > kernel/trace/trace_events_hist.c | 4 ++++
> > 1 file changed, 4 insertions(+)
> >
> > diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c
> > index e707577..889455e 100644
> > --- a/kernel/trace/trace_events_hist.c
> > +++ b/kernel/trace/trace_events_hist.c
> > @@ -1576,6 +1576,10 @@ static bool hist_trigger_match(struct event_trigger_data *data,
> > return false;
> > if (key_field->is_signed != key_field_test->is_signed)
> > return false;
> > + if ((key_field->var_name && !key_field_test->var_name) ||
> > + (!key_field->var_name && key_field_test->var_name) ||
> > + strcmp(key_field->var_name, key_field_test->var_name) != 0)
> > + return false;
>
> What if key_field->var_name and key_field_test->var_name are both
> NULL?
>
Yep, it's a problem, thanks for pointing it out.
Tom
> Thanks,
> Namhyung
>
> > }
> >
> > for (i = 0; i < hist_data->n_sort_keys; i++) {
> > --
> > 1.9.3
> >
Powered by blists - more mailing lists