Skip to content

Commit 1a361df

Browse files
tzanussirostedt
authored andcommitted
tracing: Account for variables in named trigger compatibility
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. Link: http://lkml.kernel.org/r/a17eae6328a99917f9d5c66129c9fcd355279ee9.1516069914.git.tom.zanussi@linux.intel.com Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
1 parent 30350d6 commit 1a361df

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

kernel/trace/trace_events_hist.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1610,7 +1610,7 @@ static int event_hist_trigger_print(struct seq_file *m,
16101610
sort_key = &hist_data->sort_keys[i];
16111611
idx = sort_key->field_idx;
16121612

1613-
if (WARN_ON(idx >= TRACING_MAP_FIELDS_MAX))
1613+
if (WARN_ON(idx >= HIST_FIELDS_MAX))
16141614
return -EINVAL;
16151615

16161616
if (i > 0)
@@ -1798,6 +1798,11 @@ static bool hist_trigger_match(struct event_trigger_data *data,
17981798
return false;
17991799
if (key_field->is_signed != key_field_test->is_signed)
18001800
return false;
1801+
if (!!key_field->var.name != !!key_field_test->var.name)
1802+
return false;
1803+
if (key_field->var.name &&
1804+
strcmp(key_field->var.name, key_field_test->var.name) != 0)
1805+
return false;
18011806
}
18021807

18031808
for (i = 0; i < hist_data->n_sort_keys; i++) {

0 commit comments

Comments
 (0)