linux/debian/patches/features/all/rt/0016-tracing-Account-for-va...

43 lines
1.5 KiB
Diff
Raw Normal View History

2017-07-09 11:42:39 +00:00
From: Tom Zanussi <tom.zanussi@linux.intel.com>
2018-01-31 19:59:07 +00:00
Date: Mon, 15 Jan 2018 20:51:50 -0600
2017-11-29 23:05:39 +00:00
Subject: [PATCH 16/37] tracing: Account for variables in named trigger
2017-07-09 11:42:39 +00:00
compatibility
2018-01-31 19:59:07 +00:00
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.14/older/patches-4.14.15-rt13.tar.xz
2017-07-09 11:42:39 +00:00
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>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
kernel/trace/trace_events_hist.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
2017-07-09 11:42:39 +00:00
--- a/kernel/trace/trace_events_hist.c
+++ b/kernel/trace/trace_events_hist.c
2017-11-29 23:05:39 +00:00
@@ -1612,7 +1612,7 @@ static int event_hist_trigger_print(stru
2017-07-09 11:42:39 +00:00
sort_key = &hist_data->sort_keys[i];
idx = sort_key->field_idx;
- if (WARN_ON(idx >= TRACING_MAP_FIELDS_MAX))
+ if (WARN_ON(idx >= HIST_FIELDS_MAX))
return -EINVAL;
if (i > 0)
2017-11-29 23:05:39 +00:00
@@ -1800,6 +1800,11 @@ static bool hist_trigger_match(struct ev
2017-07-09 11:42:39 +00:00
return false;
if (key_field->is_signed != key_field_test->is_signed)
return false;
+ if (!!key_field->var.name != !!key_field_test->var.name)
2017-07-09 11:42:39 +00:00
+ return false;
+ if (key_field->var.name &&
+ strcmp(key_field->var.name, key_field_test->var.name) != 0)
2017-07-09 11:42:39 +00:00
+ return false;
}
for (i = 0; i < hist_data->n_sort_keys; i++) {