[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190111043246.GB625@sejong>
Date: Fri, 11 Jan 2019 13:32:46 +0900
From: Namhyung Kim <namhyung@...nel.org>
To: Tom Zanussi <zanussi@...nel.org>
Cc: rostedt@...dmis.org, tglx@...utronix.de, mhiramat@...nel.org,
vedang.patel@...el.com, bigeasy@...utronix.de,
joel@...lfernandes.org, mathieu.desnoyers@...icios.com,
julia@...com, linux-kernel@...r.kernel.org,
linux-rt-users@...r.kernel.org, kernel-team@....com
Subject: Re: [PATCH v11 03/15] tracing: Split up onmatch action data
Hi Tom,
On Wed, Jan 09, 2019 at 01:49:10PM -0600, Tom Zanussi wrote:
> From: Tom Zanussi <tom.zanussi@...ux.intel.com>
>
> Currently, the onmatch action data binds the onmatch action to data
> related to synthetic event generation. Since we want to allow the
> onmatch handler to potentially invoke a different action, and because
> we expect other handlers to generate synthetic events, we need to
> separate the data related to these two functions.
>
> Also rename the onmatch data to something more descriptive, and create
> and use common action data destroy function.
>
> Signed-off-by: Tom Zanussi <tom.zanussi@...ux.intel.com>
> ---
[SNIP]
>
> -static void onmax_destroy(struct action_data *data)
> +static void action_data_destroy(struct action_data *data)
> {
> unsigned int i;
>
> - destroy_hist_field(data->onmax.max_var, 0);
> - destroy_hist_field(data->onmax.var, 0);
> + lockdep_assert_held(&event_mutex);
>
> - kfree(data->onmax.var_str);
> kfree(data->action_name);
>
> for (i = 0; i < data->n_params; i++)
> kfree(data->params[i]);
>
> + if (data->synth_event)
> + data->synth_event->ref--;
> +
I was wondering about the missing synth_event_mutex used to guard the
refcount. Then I noticed that I totally missed Masami's dynamic event
work which removed it. Nice job..
Thanks,
Namhyung
> kfree(data);
> }
>
> +static void onmax_destroy(struct action_data *data)
> +{
> + destroy_hist_field(data->onmax.max_var, 0);
> + destroy_hist_field(data->onmax.var, 0);
> +
> + kfree(data->onmax.var_str);
> +
> + action_data_destroy(data);
> +}
Powered by blists - more mailing lists