diff options
author | Namhyung Kim <namhyung@kernel.org> | 2014-05-28 01:12:18 -0400 |
---|---|---|
committer | Jiri Olsa <jolsa@kernel.org> | 2014-06-01 08:34:55 -0400 |
commit | 1844dbcbe78503e0f4a8996d69da725d5e7a5177 (patch) | |
tree | e1858b5bd3c1fb9a2638d366a9e1c790e5e654b6 /tools/perf/builtin-annotate.c | |
parent | e450f90e8c7d0bf70519223c1b848446ae63f313 (diff) |
perf tools: Introduce hists__inc_nr_samples()
There're some duplicate code for counting number of samples. Add
hists__inc_nr_samples() and reuse it.
Suggested-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/r/1401335910-16832-2-git-send-email-namhyung@kernel.org
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Diffstat (limited to 'tools/perf/builtin-annotate.c')
-rw-r--r-- | tools/perf/builtin-annotate.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/builtin-annotate.c b/tools/perf/builtin-annotate.c index d30d2c2e2a7a..bf52461a88bd 100644 --- a/tools/perf/builtin-annotate.c +++ b/tools/perf/builtin-annotate.c | |||
@@ -70,7 +70,7 @@ static int perf_evsel__add_sample(struct perf_evsel *evsel, | |||
70 | return -ENOMEM; | 70 | return -ENOMEM; |
71 | 71 | ||
72 | ret = hist_entry__inc_addr_samples(he, evsel->idx, al->addr); | 72 | ret = hist_entry__inc_addr_samples(he, evsel->idx, al->addr); |
73 | hists__inc_nr_events(&evsel->hists, PERF_RECORD_SAMPLE); | 73 | hists__inc_nr_samples(&evsel->hists, true); |
74 | return ret; | 74 | return ret; |
75 | } | 75 | } |
76 | 76 | ||