}
}
- /*
- * If we have just single event and are sending data
- * through pipe, we need to force the ids allocation,
- * because we synthesize event name through the pipe
- * and need the id for that.
- */
- if (data->is_pipe && rec->evlist->nr_entries == 1)
- rec->opts.sample_id = true;
-
if (record__open(rec) != 0) {
err = -1;
goto out_child;
struct perf_evsel *evsel;
bool use_sample_identifier = false;
bool use_comm_exec;
- bool sample_id = opts->sample_id;
/*
* Set the evsel leader links before we configure attributes,
* match the id.
*/
use_sample_identifier = perf_can_sample_identifier();
- sample_id = true;
+ evlist__for_each_entry(evlist, evsel)
+ perf_evsel__set_sample_id(evsel, use_sample_identifier);
} else if (evlist->nr_entries > 1) {
struct perf_evsel *first = perf_evlist__first(evlist);
use_sample_identifier = perf_can_sample_identifier();
break;
}
- sample_id = true;
- }
-
- if (sample_id) {
evlist__for_each_entry(evlist, evsel)
perf_evsel__set_sample_id(evsel, use_sample_identifier);
}