|
@@ -4364,6 +4364,53 @@ static void print_onmatch_spec(struct seq_file *m,
|
|
|
seq_puts(m, ")");
|
|
|
}
|
|
|
|
|
|
+static bool actions_match(struct hist_trigger_data *hist_data,
|
|
|
+ struct hist_trigger_data *hist_data_test)
|
|
|
+{
|
|
|
+ unsigned int i, j;
|
|
|
+
|
|
|
+ if (hist_data->n_actions != hist_data_test->n_actions)
|
|
|
+ return false;
|
|
|
+
|
|
|
+ for (i = 0; i < hist_data->n_actions; i++) {
|
|
|
+ struct action_data *data = hist_data->actions[i];
|
|
|
+ struct action_data *data_test = hist_data_test->actions[i];
|
|
|
+
|
|
|
+ if (data->fn != data_test->fn)
|
|
|
+ return false;
|
|
|
+
|
|
|
+ if (data->n_params != data_test->n_params)
|
|
|
+ return false;
|
|
|
+
|
|
|
+ for (j = 0; j < data->n_params; j++) {
|
|
|
+ if (strcmp(data->params[j], data_test->params[j]) != 0)
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+ if (data->fn == action_trace) {
|
|
|
+ if (strcmp(data->onmatch.synth_event_name,
|
|
|
+ data_test->onmatch.synth_event_name) != 0)
|
|
|
+ return false;
|
|
|
+ if (strcmp(data->onmatch.match_event_system,
|
|
|
+ data_test->onmatch.match_event_system) != 0)
|
|
|
+ return false;
|
|
|
+ if (strcmp(data->onmatch.match_event,
|
|
|
+ data_test->onmatch.match_event) != 0)
|
|
|
+ return false;
|
|
|
+ } else if (data->fn == onmax_save) {
|
|
|
+ if (strcmp(data->onmax.var_str,
|
|
|
+ data_test->onmax.var_str) != 0)
|
|
|
+ return false;
|
|
|
+ if (strcmp(data->onmax.fn_name,
|
|
|
+ data_test->onmax.fn_name) != 0)
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return true;
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
static void print_actions_spec(struct seq_file *m,
|
|
|
struct hist_trigger_data *hist_data)
|
|
|
{
|
|
@@ -5174,6 +5221,9 @@ static bool hist_trigger_match(struct event_trigger_data *data,
|
|
|
(strcmp(data->filter_str, data_test->filter_str) != 0))
|
|
|
return false;
|
|
|
|
|
|
+ if (!actions_match(hist_data, hist_data_test))
|
|
|
+ return false;
|
|
|
+
|
|
|
return true;
|
|
|
}
|
|
|
|