perf hist: Pass struct sample to __hists__add_entry()
[deliverable/linux.git] / tools / perf / tests / hists_link.c
index 6243e2b2a245080da038b074d957a617c2079f6d..9eac98daecb806993d321668521f448a1555789e 100644 (file)
@@ -64,7 +64,7 @@ static int add_hist_entries(struct perf_evlist *evlist, struct machine *machine)
        struct perf_evsel *evsel;
        struct addr_location al;
        struct hist_entry *he;
-       struct perf_sample sample = { .period = 1, };
+       struct perf_sample sample = { .period = 1, .weight = 1, };
        size_t i = 0, k;
 
        /*
@@ -90,7 +90,7 @@ static int add_hist_entries(struct perf_evlist *evlist, struct machine *machine)
                                goto out;
 
                        he = __hists__add_entry(hists, &al, NULL,
-                                               NULL, NULL, 1, 1, 0, true);
+                                               NULL, NULL, &sample, true);
                        if (he == NULL) {
                                addr_location__put(&al);
                                goto out;
@@ -116,7 +116,7 @@ static int add_hist_entries(struct perf_evlist *evlist, struct machine *machine)
                                goto out;
 
                        he = __hists__add_entry(hists, &al, NULL,
-                                               NULL, NULL, 1, 1, 0, true);
+                                               NULL, NULL, &sample, true);
                        if (he == NULL) {
                                addr_location__put(&al);
                                goto out;
This page took 0.043576 seconds and 5 git commands to generate.