[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211129090627.592149-1-nakamura.shun@fujitsu.com>
Date: Mon, 29 Nov 2021 18:06:24 +0900
From: Shunsuke <nakamura.shun@...itsu.com>
To: peterz@...radead.org, mingo@...hat.com, acme@...nel.org,
mark.rutland@....com, alexander.shishkin@...ux.intel.com,
jolsa@...hat.com, namhyung@...nel.org, robh@...nel.org
Cc: linux-kernel@...r.kernel.org, linux-perf-users@...r.kernel.org
Subject: [PATCH v4 0/3] Unify scaling of counters obtained from perf_evsel__read()
This patch series unifies the counters that can be obtained from
perf_evsel__read() to "no scaling".
The counter scaling will be done using a function moved from
tools/perf/util.
The first patch move perf_counts_values__scale from tools/perf/util
to tools/lib/perf so that it can be used with libperf.
The second patch removes the scaling process from
perf_mmap__read_self().
The third patch adds a verification test to make sure that it scales
correctly when multiplexed.
---
Previous version at:
https://lore.kernel.org/linux-perf-users/20211109085831.3770594-1-nakamura.shun@fujitsu.com/
Changes in v4:
- Modify type s8 to type __s8
Changes in v3:
- Move scaling process from tools/perf/util to tools/lib/perf
- Remove scaling process from perf_mmap__read_self()
- Remove scaling process for perf_mmap__read_self
- Remove test to verify that no division by zero occurs
Changes in v2:
- Fix not to divide by zero when counter scaling
- Add test to verify that no division by zero occurs
[1] https://github.com/deater/perf_event_tests/blob/master/tests/rdpmc/rdpmc_multiplexing.c
Shunsuke Nakamura (3):
libperf: Move perf_counts_values__scale to tools/lib/perf
libperf: Remove scaling process from perf_mmap__read_self()
libperf tests: Add test_stat_multiplexing test
tools/lib/perf/evsel.c | 19 ++++
tools/lib/perf/include/perf/evsel.h | 4 +
tools/lib/perf/libperf.map | 1 +
tools/lib/perf/mmap.c | 2 -
tools/lib/perf/tests/test-evlist.c | 157 ++++++++++++++++++++++++++++
tools/perf/util/evsel.c | 19 ----
tools/perf/util/evsel.h | 3 -
7 files changed, 181 insertions(+), 24 deletions(-)
--
2.25.1
Powered by blists - more mailing lists