Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1576744 > unrolled thread
| Started by | Tom Zanussi <tom.zanussi@linux.intel.com> |
|---|---|
| First post | 2017-02-08 18:30 +0100 |
| Last post | 2017-02-13 07:10 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[RFC][PATCH 12/21] tracing: Account for variables in named trigger compatibility Tom Zanussi <tom.zanussi@linux.intel.com> - 2017-02-08 18:30 +0100
Re: [RFC][PATCH 12/21] tracing: Account for variables in named trigger compatibility Namhyung Kim <namhyung@kernel.org> - 2017-02-13 07:10 +0100
| From | Tom Zanussi <tom.zanussi@linux.intel.com> |
|---|---|
| Date | 2017-02-08 18:30 +0100 |
| Subject | [RFC][PATCH 12/21] tracing: Account for variables in named trigger compatibility |
| Message-ID | <t8Ee6-3aO-25@gated-at.bofh.it> |
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@linux.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;
}
for (i = 0; i < hist_data->n_sort_keys; i++) {
--
1.9.3
[toc] | [next] | [standalone]
| From | Namhyung Kim <namhyung@kernel.org> |
|---|---|
| Date | 2017-02-13 07:10 +0100 |
| Subject | Re: [RFC][PATCH 12/21] tracing: Account for variables in named trigger compatibility |
| Message-ID | <tahZM-8aw-7@gated-at.bofh.it> |
| In reply to | #1576744 |
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@linux.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?
Thanks,
Namhyung
> }
>
> for (i = 0; i < hist_data->n_sort_keys; i++) {
> --
> 1.9.3
>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web