summaryrefslogtreecommitdiffstats
path: root/tools/perf/tests/hists_link.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/tests/hists_link.c')
-rw-r--r--tools/perf/tests/hists_link.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/tools/perf/tests/hists_link.c b/tools/perf/tests/hists_link.c
index 87f9f7280c4..4228ffc0d96 100644
--- a/tools/perf/tests/hists_link.c
+++ b/tools/perf/tests/hists_link.c
@@ -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;