Message ID | CAHv-k_8wHgNhyJnsX2t3UEaSKFQNOOKRArLYSS4O0cHrHwh+zQ@mail.gmail.com |
---|---|
State | New |
Headers | show |
diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c index 46203b7..963a121 100644 --- a/kernel/trace/trace_events_hist.c +++ b/kernel/trace/trace_events_hist.c @@ -537,6 +537,12 @@ static int create_key_field(struct hist_trigger_data *hist_data, } else { char *field_name = strsep(&field_str, "."); + /* Cannot keep these 2 lines in side the if() below + * as field_str would be NULL for the key 'cpu' + */ + if (strcmp(field_name, "cpu") == 0) + flags |= HIST_FIELD_FL_CPU; + if (field_str) { if (strcmp(field_str, "hex") == 0)