@@ -1019,6 +1019,16 @@ static void *synth_init_error(struct tep_handle *tep, struct sql_table *table)
return field_match_error(tep, sb, match);
}
+static void selection_error(struct tep_handle *tep,
+ struct sqlhist_bison *sb, struct expr *expr)
+{
+ /* We just care about event not existing */
+ if (errno != ENODEV)
+ return;
+
+ test_field_exists(tep, sb, expr);
+}
+
static struct tracefs_synth *build_synth(struct tep_handle *tep,
const char *name,
struct sql_table *table)
@@ -1099,8 +1109,10 @@ static struct tracefs_synth *build_synth(struct tep_handle *tep,
ret = tracefs_synth_add_end_field(synth,
field->field, field->label);
}
- if (ret < 0)
+ if (ret < 0) {
+ selection_error(tep, table->sb, expr);
goto free;
+ }
continue;
}