File perf-annotate-do-not-overwrite-sample-period.patch of Package perf
37
1
From: Taeung Song <treeze.taeung@gmail.com>
2
Date: Fri, 21 Jul 2017 11:38:48 -0300
3
Subject: perf annotate: Do not overwrite sample->period
4
Git-commit: ecd5f9959d2c9540482977ff1208ea67fbfb8cc9
5
Patch-mainline: v4.14-rc1
6
References: References: bsc#1070010 (git-fixes)
7
Signed-off-By: Tony Jones <tonyj@suse.de>
8
9
In fixing the --show-total-period option it was noticed that the value
10
of sample->period was being overwritten, fix it.
11
12
Signed-off-by: Taeung Song <treeze.taeung@gmail.com>
13
Cc: Jiri Olsa <jolsa@redhat.com>
14
Cc: Milian Wolff <milian.wolff@kdab.com>
15
Cc: Namhyung Kim <namhyung@kernel.org>
16
Fixes: fd36f3dd7933 ("perf hist: Pass struct sample to __hists__add_entry()")
17
Link: http://lkml.kernel.org/r/1500500215-16646-1-git-send-email-treeze.taeung@gmail.com
18
[ split from a larger patch, added the Fixes tag ]
19
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
20
---
21
tools/perf/builtin-annotate.c | 1 -
22
1 file changed, 1 deletion(-)
23
24
diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c
25
index 96fe1a88c1e5..7e33278eff67 100644
26
--- a/tools/perf/builtin-annotate.c
27
+++ b/tools/perf/builtin-annotate.c
28
29
*/
30
process_branch_stack(sample->branch_stack, al, sample);
31
32
- sample->period = 1;
33
sample->weight = 1;
34
35
he = hists__add_entry(hists, al, NULL, NULL, NULL, sample, true);
36
37