perf hist: Pass struct sample to __hists__add_entry()
[deliverable/linux.git] / tools / perf / builtin-annotate.c
index e18f1b995ffdc5f7e510e81686c0692e5e26912e..b5b8db0b03384fd211c21bea1df7dbf9ce6b7e1a 100644 (file)
@@ -47,7 +47,7 @@ struct perf_annotate {
 };
 
 static int perf_evsel__add_sample(struct perf_evsel *evsel,
-                                 struct perf_sample *sample __maybe_unused,
+                                 struct perf_sample *sample,
                                  struct addr_location *al,
                                  struct perf_annotate *ann)
 {
@@ -72,7 +72,10 @@ static int perf_evsel__add_sample(struct perf_evsel *evsel,
                return 0;
        }
 
-       he = __hists__add_entry(hists, al, NULL, NULL, NULL, 1, 1, 0, true);
+       sample->period = 1;
+       sample->weight = 1;
+
+       he = __hists__add_entry(hists, al, NULL, NULL, NULL, sample, true);
        if (he == NULL)
                return -ENOMEM;
 
This page took 0.036043 seconds and 5 git commands to generate.