path: root/tools/perf/builtin-annotate.c
diff options
authorAndi Kleen <>2013-01-24 16:10:29 +0100
committerArnaldo Carvalho de Melo <>2013-04-01 12:19:43 -0300
commit05484298cbfebbf8c8c55b000541a245bc286bec (patch)
tree1b1336957d96defc9e637faf14aebacb5b9b693a /tools/perf/builtin-annotate.c
parent2fe85427e3bf65d791700d065132772fc26e4d75 (diff)
perf tools: Add support for weight v7 (modified)
perf record has a new option -W that enables weightened sampling. Add sorting support in top/report for the average weight per sample and the total weight sum. This allows to both compare relative cost per event and the total cost over the measurement period. Add the necessary glue to perf report, record and the library. v2: Merge with new hist refactoring. v3: Fix manpage. Remove value check. Rename global_weight to weight and weight to local_weight. v4: Readd sort keys to manpage v5: Move weight to end v6: Move weight to template v7: Rename weight key. Original patch from Andi modified by Stephane Eranian <> to include ONLY the weight supporting code and apply to pristine 3.8.0-rc4. Signed-off-by: Andi Kleen <> Cc: Ingo Molnar <> Cc: Jiri Olsa <> Cc: Namhyung Kim <> Cc: Peter Zijlstra <> Link: [ committer note: changed to cope with fc5871ed and the hists_link perf test entry ] Signed-off-by: Arnaldo Carvalho de Melo <>
Diffstat (limited to 'tools/perf/builtin-annotate.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c
index ae36f3cb5410..db491e9a812b 100644
--- a/tools/perf/builtin-annotate.c
+++ b/tools/perf/builtin-annotate.c
@@ -63,7 +63,7 @@ static int perf_evsel__add_sample(struct perf_evsel *evsel,
return 0;
- he = __hists__add_entry(&evsel->hists, al, NULL, 1);
+ he = __hists__add_entry(&evsel->hists, al, NULL, 1, 1);
if (he == NULL)
return -ENOMEM;