|
@@ -211,15 +211,13 @@ static int add_hist_entries(struct perf_evlist *evlist, struct machine *machine)
|
|
|
list_for_each_entry(evsel, &evlist->entries, node) {
|
|
|
for (k = 0; k < ARRAY_SIZE(fake_common_samples); k++) {
|
|
|
const union perf_event event = {
|
|
|
- .ip = {
|
|
|
- .header = {
|
|
|
- .misc = PERF_RECORD_MISC_USER,
|
|
|
- },
|
|
|
- .pid = fake_common_samples[k].pid,
|
|
|
- .ip = fake_common_samples[k].ip,
|
|
|
+ .header = {
|
|
|
+ .misc = PERF_RECORD_MISC_USER,
|
|
|
},
|
|
|
};
|
|
|
|
|
|
+ sample.pid = fake_common_samples[k].pid;
|
|
|
+ sample.ip = fake_common_samples[k].ip;
|
|
|
if (perf_event__preprocess_sample(&event, machine, &al,
|
|
|
&sample) < 0)
|
|
|
goto out;
|
|
@@ -235,15 +233,13 @@ static int add_hist_entries(struct perf_evlist *evlist, struct machine *machine)
|
|
|
|
|
|
for (k = 0; k < ARRAY_SIZE(fake_samples[i]); k++) {
|
|
|
const union perf_event event = {
|
|
|
- .ip = {
|
|
|
- .header = {
|
|
|
- .misc = PERF_RECORD_MISC_USER,
|
|
|
- },
|
|
|
- .pid = fake_samples[i][k].pid,
|
|
|
- .ip = fake_samples[i][k].ip,
|
|
|
+ .header = {
|
|
|
+ .misc = PERF_RECORD_MISC_USER,
|
|
|
},
|
|
|
};
|
|
|
|
|
|
+ sample.pid = fake_samples[i][k].pid;
|
|
|
+ sample.ip = fake_samples[i][k].ip;
|
|
|
if (perf_event__preprocess_sample(&event, machine, &al,
|
|
|
&sample) < 0)
|
|
|
goto out;
|