Hwmon PMUs
Ian Rogers
reviewerv5 cover Hwmon PMUs
Following the convention of the tool PMU, create a hwmon PMU that exposes hwmon data for reading. For example, the following shows reading the CPU temperature and 2 fan speeds alongside the uncore frequency:
```
$ perf stat -e temp_cpu,fan1,hwmon_thinkpad/fan2/,tool/num_cpus_online/ -M UNCORE_FREQ -I 1000
1.001153138 52.00 'C temp_cpu
1.001153138 2,588 rpm fan1
1.001153138 2,482 rpm hwmon_thinkpad/fan2/
1.001153138 8 tool/num_cpus_online/
1.001153138 1,077,101,397 UNC_CLOCK.SOCKET # 1.08 UNCORE_FREQ
1.001153138 1,012,773,595 duration_time
...
```Additional data on the hwmon events is in perf list:
```
$ perf list
...
hwmon:
...
temp_core_0 OR temp2
[Temperature in unit coretemp named Core 0. crit=100'C,max=100'C crit_alarm=0'C. Unit:
hwmon_coretemp]
...
```v5: Fix asan issue in parse_hwmon_filename caught by a TMA metric.
v4: Drop merged patches 1 to 10. Separate adding the hwmon_pmu from
the update to perf_pmu to use it. Try to make source of literal strings clearer via named #defines. Fix a number of GCC warnings.
v3: Rebase, add Namhyung's acked-by to patches 1 to 10.
v2: Address Namhyung's review feedback. Rebase dropping 4 patches
applied by Arnaldo, fix build breakage reported by Arnaldo.
Ian Rogers (5):
tools api io: Ensure line_len_out is always initialized perf hwmon_pmu: Add a tool PMU exposing events from hwmon in sysfs perf pmu: Add calls enabling the hwmon_pmu
perf test: Add hwmon "PMU" test
perf docs: Document tool and hwmon events
tools/lib/api/io.h | 1 + tools/perf/Documentation/perf-list.txt | 15 + tools/perf/tests/Build | 1 + tools/perf/tests/builtin-test.c | 1 + tools/perf/tests/hwmon_pmu.c | 243 ++++++++ tools/perf/tests/tests.h | 1 + tools/perf/util/Build | 1 + tools/perf/util/evsel.c | 9 + tools/perf/util/hwmon_pmu.c | 820 +++++++++++++++++++++++++ tools/perf/util/hwmon_pmu.h | 154 +++++ tools/perf/util/pmu.c | 20 + tools/perf/util/pmu.h | 2 + tools/perf/util/pmus.c | 9 + tools/perf/util/pmus.h | 3 + 14 files changed, 1280 insertions(+) create mode 100644 tools/perf/tests/hwmon_pmu.c create mode 100644 tools/perf/util/hwmon_pmu.c create mode 100644 tools/perf/util/hwmon_pmu.h
Signature · 1 line
2.47.0.105.g07ac214952-goog
Ian Rogers
reviewerPATCH v5 1/5 tools api io: Ensure line_len_out is always initialized
Ensure initialization to avoid compiler warnings about potential use of uninitialized variables.
--- tools/lib/api/io.h | 1 + 1 file changed, 1 insertion(+)
tools/lib/api/io.h +1 -0
@@ -189,6 +189,7 @@ static inline ssize_t io__getdelim(struct io *io, char **line_out, size_t *line_ err_out:free (line); *line_out =NULL ; + *line_len_out =0 ;return -ENOMEM ; }
Signature · 1 line
2.47.0.105.g07ac214952-goog
Ian Rogers
reviewerPATCH v5 2/5 perf hwmon_pmu: Add a tool PMU exposing events from hwmon in sysfs
In reply to Ian RogersAdd a tool PMU for hwmon events but don't enable.
The hwmon sysfs ABI is defined in Documentation/hwmon/sysfs-interface.rst. Create a PMU that reads the hwmon input and can be used in perf stat and metrics much as an uncore PMU can.
For example, when enabled by a later patch, the following shows reading the CPU temperature and 2 fan speeds alongside the uncore frequency:
```
$ perf stat -e temp_cpu,fan1,hwmon_thinkpad/fan2/,tool/num_cpus_online/ -M UNCORE_FREQ -I 1000
1.001153138 52.00 'C temp_cpu
1.001153138 2,588 rpm fan1
1.001153138 2,482 rpm hwmon_thinkpad/fan2/
1.001153138 8 tool/num_cpus_online/
1.001153138 1,077,101,397 UNC_CLOCK.SOCKET # 1.08 UNCORE_FREQ
1.001153138 1,012,773,595 duration_time
...
```The PMUs are named from /sys/class/hwmon/hwmon<num>/name and have an alias of hwmon<num>.
Hwmon data is presented in multiple <type><number>_<item> files. The <type><number> is used to identify the event as is the <type> followed by the contents of the <type>_label file if it exists. The <type><number>_input file gives the data read by perf.
When enabled by a later patch, in perf list the other hwmon <item> files are used to give a richer description, for example:
```
hwmon:
temp1
[Temperature in unit acpitz named temp1. Unit: hwmon_acpitz]
in0
[Voltage in unit bat0 named in0. Unit: hwmon_bat0]
temp_core_0 OR temp2
[Temperature in unit coretemp named Core 0. crit=100'C,max=100'C crit_alarm=0'C. Unit:
hwmon_coretemp]
temp_core_1 OR temp3
[Temperature in unit coretemp named Core 1. crit=100'C,max=100'C crit_alarm=0'C. Unit:
hwmon_coretemp]
...
temp_package_id_0 OR temp1
[Temperature in unit coretemp named Package id 0. crit=100'C,max=100'C crit_alarm=0'C.
Unit: hwmon_coretemp]
temp1
[Temperature in unit iwlwifi_1 named temp1. Unit: hwmon_iwlwifi_1]
temp_composite OR temp1
[Temperature in unit nvme named Composite. alarm=0'C,crit=86.85'C,max=75.85'C,
min=-273.15'C. Unit: hwmon_nvme]
temp_sensor_1 OR temp2
[Temperature in unit nvme named Sensor 1. max=65261.8'C,min=-273.15'C. Unit: hwmon_nvme]
temp_sensor_2 OR temp3
[Temperature in unit nvme named Sensor 2. max=65261.8'C,min=-273.15'C. Unit: hwmon_nvme]
fan1
[Fan in unit thinkpad named fan1. Unit: hwmon_thinkpad]
fan2
[Fan in unit thinkpad named fan2. Unit: hwmon_thinkpad]
...
temp_cpu OR temp1
[Temperature in unit thinkpad named CPU. Unit: hwmon_thinkpad]
temp_gpu OR temp2
[Temperature in unit thinkpad named GPU. Unit: hwmon_thinkpad]
curr1
[Current in unit ucsi_source_psy_usbc000_0 named curr1. max=1.5A. Unit:
hwmon_ucsi_source_psy_usbc000_0]
in0
[Voltage in unit ucsi_source_psy_usbc000_0 named in0. max=5V,min=5V. Unit:
hwmon_ucsi_source_psy_usbc000_0]
```As there may be multiple hwmon devices a range of PMU types are reserved for their use and to identify the PMU as belonging to the hwmon types.
--- tools/perf/util/Build | 1 + tools/perf/util/hwmon_pmu.c | 820 ++++++++++++++++++++++++++++++++++++ tools/perf/util/hwmon_pmu.h | 154 +++++++ tools/perf/util/pmu.h | 2 + 4 files changed, 977 insertions(+) create mode 100644 tools/perf/util/hwmon_pmu.c create mode 100644 tools/perf/util/hwmon_pmu.h
tools/perf/util/Build +1 -0
@@ -83,6 +83,7 @@ perf-util-y += pmu.o perf-util-y += pmus.o perf-util-y += pmu-flex.o perf-util-y += pmu-bison.o +perf-util-y += hwmon_pmu.o perf-util-y += tool_pmu.o perf-util-y += svghelper.o perf-util-$(CONFIG_LIBTRACEEVENT) += trace-event-info.o
tools/perf/util/hwmon_pmu.c new file +820 -0
820 lines not on this page · raw message
tools/perf/util/hwmon_pmu.h new file +154 -0
154 lines not on this page · raw message
tools/perf/util/pmu.h +2 -0
@@ -37,6 +37,8 @@ struct perf_pmu_caps { };enum { +PERF_PMU_TYPE_HWMON_START =0xFFFF0000 , +PERF_PMU_TYPE_HWMON_END =0xFFFFFFFD ,PERF_PMU_TYPE_TOOL =0xFFFFFFFE ,PERF_PMU_TYPE_FAKE =0xFFFFFFFF , };
Signature · 1 line
2.47.0.105.g07ac214952-goog
kernel test robot
build botRe: [PATCH v5 2/5] perf hwmon_pmu: Add a tool PMU exposing events from hwmon in sysfs
kernel test robot noticed the following build errors:
Hi Ian,
kernel test robot noticed the following build errors:
[auto build test ERROR on perf-tools-next/perf-tools-next]
[also build test ERROR on next-20241018]
[cannot apply to tip/perf/core perf-tools/perf-tools linus/master acme/perf/core v6.12-rc3] [If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Ian-Rogers/tools-api-io-Ensure-line_len_out-is-always-initialized/20241017-143759 base: https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git perf-tools-next patch link: https://lore.kernel.org/r/20241017063555.366065-3-irogers%40google.com patch subject: [PATCH v5 2/5] perf hwmon_pmu: Add a tool PMU exposing events from hwmon in sysfs compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241021/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All errors (new ones prefixed by >>):
Makefile.config:665: No libunwind found. Please install libunwind-dev[el] >= 1.1 and/or set LIBUNWIND_DIR
PERF_VERSION = 6.12.rc3.gd8463b89755f
util/hwmon_pmu.c: In function 'parse_hwmon_filename':
>> util/hwmon_pmu.c:175:9: error: implicit declaration of function 'strlcpy'; did you mean 'strncpy'? [-Werror=implicit-function-declaration]
175 | strlcpy(fn_type, filename, sizeof(fn_type));
| ^~~~~~~
| strncpy cc1: all warnings being treated as errors
make[7]: *** [tools/build/Makefile.build:106: tools/perf/util/hwmon_pmu.o] Error 1 make[7]: *** Waiting for unfinished jobs....
make[6]: *** [tools/build/Makefile.build:158: util] Error 2
make[5]: *** [Makefile.perf:789: tools/perf/perf-util-in.o] Error 2 make[5]: *** Waiting for unfinished jobs....
make[4]: *** [Makefile.perf:292: sub-make] Error 2
make[3]: *** [Makefile:76: all] Error 2
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
kernel test robot
build botRe: [PATCH v5 2/5] perf hwmon_pmu: Add a tool PMU exposing events from hwmon in sysfs
In reply to Ian Rogerskernel test robot noticed the following build errors:
Hi Ian,
kernel test robot noticed the following build errors:
[auto build test ERROR on perf-tools-next/perf-tools-next]
[also build test ERROR on next-20241022]
[cannot apply to tip/perf/core perf-tools/perf-tools linus/master acme/perf/core v6.12-rc4] [If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Ian-Rogers/tools-api-io-Ensure-line_len_out-is-always-initialized/20241017-143759 base: https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git perf-tools-next patch link: https://lore.kernel.org/r/20241017063555.366065-3-irogers%40google.com patch subject: [PATCH v5 2/5] perf hwmon_pmu: Add a tool PMU exposing events from hwmon in sysfs compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241022/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All errors (new ones prefixed by >>):
Makefile.config:665: No libunwind found. Please install libunwind-dev[el] >= 1.1 and/or set LIBUNWIND_DIR
PERF_VERSION = 6.12.rc3.gd8463b89755f
>> util/hwmon_pmu.c:175:2: error: call to undeclared library function 'strlcpy' with type 'unsigned long (char *, const char *, unsigned long)'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
175 | strlcpy(fn_type, filename, sizeof(fn_type));
| ^ util/hwmon_pmu.c:175:2: note: include the header <string.h> or explicitly provide a declaration for 'strlcpy' 1 error generated.
make[7]: *** [tools/build/Makefile.build:106: tools/perf/util/hwmon_pmu.o] Error 1
make[7]: *** Waiting for unfinished jobs....
make[6]: *** [tools/build/Makefile.build:158: util] Error 2
make[5]: *** [Makefile.perf:789: tools/perf/perf-util-in.o] Error 2
make[5]: *** Waiting for unfinished jobs....
make[4]: *** [Makefile.perf:292: sub-make] Error 2
make[3]: *** [Makefile:76: all] Error 2
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
Ian Rogers
reviewerPATCH v5 3/5 perf pmu: Add calls enabling the hwmon_pmu
In reply to Ian RogersAdd the base PMU calls necessary for hwmon_pmu(s) to be created/deleted and events found, listed, opened and read.
--- tools/perf/util/evsel.c | 9 +++++++++ tools/perf/util/pmu.c | 20 ++++++++++++++++++++ tools/perf/util/pmus.c | 2 ++ 3 files changed, 31 insertions(+)
tools/perf/util/evsel.c +9 -0
@@ -50,6 +50,7 @@#include "off_cpu.h" #include "pmu.h" #include "pmus.h" +#include "hwmon_pmu.h" #include "tool_pmu.h" #include "rlimit.h" #include "../perf-sys.h"
@@ -1680,6 +1681,9 @@ int evsel__read_counter(struct evsel *evsel, int cpu_map_idx, int thread)if (evsel__is_tool (evsel))return evsel__tool_pmu_read (evsel, cpu_map_idx, thread); +if (evsel__is_hwmon (evsel)) +return evsel__hwmon_pmu_read (evsel, cpu_map_idx, thread); +if (evsel__is_retire_lat (evsel))return evsel__read_retire_lat (evsel, cpu_map_idx, thread);
@@ -2124,6 +2128,11 @@ static int evsel__open_cpu(struct evsel *evsel, struct perf_cpu_map *cpus, start_cpu_map_idx, end_cpu_map_idx); } +if (evsel__is_hwmon (evsel)) { +return evsel__hwmon_pmu_open (evsel, threads, + start_cpu_map_idx, + end_cpu_map_idx); + }for (idx = start_cpu_map_idx; idx < end_cpu_map_idx; idx++) {
tools/perf/util/pmu.c +20 -0
@@ -18,6 +18,7 @@#include "debug.h" #include "evsel.h" #include "pmu.h" +#include "hwmon_pmu.h" #include "pmus.h" #include "tool_pmu.h" #include <util/pmu-bison.h>
@@ -1529,6 +1530,9 @@ int perf_pmu__config_terms(const struct perf_pmu *pmu, {struct parse_events_term *term; +if (perf_pmu__is_hwmon (pmu)) +return hwmon_pmu__config_terms (pmu, attr, terms, err); +list_for_each_entry (term, &terms->terms, list) {if (pmu_config_term (pmu, attr, term, terms, zero, apply_hardcoded, err))return -EINVAL ;
@@ -1661,6 +1665,11 @@ int perf_pmu__check_alias(struct perf_pmu *pmu, struct parse_events_terms *head_ info->scale =0.0 ; info->snapshot = false; +if (perf_pmu__is_hwmon (pmu)) { + ret =hwmon_pmu__check_alias (head_terms, info, err); + goto out; + } +/* Fake PMU doesn't rewrite terms. */ if (perf_pmu__is_fake (pmu)) goto out;
@@ -1834,6 +1843,8 @@ bool perf_pmu__have_event(struct perf_pmu *pmu, const char *name)return false;if (perf_pmu__is_tool (pmu) &&tool_pmu__skip_event (name))return false; +if (perf_pmu__is_hwmon (pmu)) +return hwmon_pmu__have_event (pmu, name);if (perf_pmu__find_alias (pmu, name,/*load=*/ true) !=NULL )return true;if (pmu->cpu_aliases_added || !pmu->events_table)
@@ -1845,6 +1856,9 @@ size_t perf_pmu__num_events(struct perf_pmu *pmu) {size_t nr; +if (perf_pmu__is_hwmon (pmu)) +return hwmon_pmu__num_events (pmu); +pmu_aliases_parse (pmu); nr = pmu->sysfs_aliases + pmu->sys_json_aliases;
@@ -1908,6 +1922,9 @@ int perf_pmu__for_each_event(struct perf_pmu *pmu, bool skip_duplicate_pmus,int ret =0 ;struct strbuf sb; +if (perf_pmu__is_hwmon (pmu)) +return hwmon_pmu__for_each_event (pmu, state, cb); +strbuf_init (&sb,/*hint=*/ 0 );pmu_aliases_parse (pmu);pmu_add_cpu_aliases (pmu);
@@ -2303,6 +2320,9 @@ int perf_pmu__pathname_fd(int dirfd, const char *pmu_name, const char *filename,void perf_pmu__delete (struct perf_pmu *pmu) { +if (perf_pmu__is_hwmon (pmu)) +hwmon_pmu__exit (pmu); +perf_pmu__del_formats (&pmu->format);perf_pmu__del_aliases (pmu);perf_pmu__del_caps (pmu);
tools/perf/util/pmus.c +2 -0
@@ -15,6 +15,7 @@#include "evsel.h" #include "pmus.h" #include "pmu.h" +#include "hwmon_pmu.h" #include "tool_pmu.h" #include "print-events.h" #include "strbuf.h"
@@ -234,6 +235,7 @@ static void pmu_read_sysfs(bool core_only)if (!core_only) { tool_pmu =perf_pmus__tool_pmu ();list_add_tail (&tool_pmu->list, &other_pmus); +perf_pmus__read_hwmon_pmus (&other_pmus); }list_sort (NULL , &other_pmus, pmus_cmp);if (!list_empty (&core_pmus)) {
Signature · 1 line
2.47.0.105.g07ac214952-goog
Ian Rogers
reviewerPATCH v5 4/5 perf test: Add hwmon "PMU" test
In reply to Ian RogersBased on a mix of the sysfs PMU test (for creating the reference files) and the tool PMU test, test that parsing given hwmon events with there aliases creates the expected config values.
--- tools/perf/tests/Build | 1 + tools/perf/tests/builtin-test.c | 1 + tools/perf/tests/hwmon_pmu.c | 243 ++++++++++++++++++++++++++++++++ tools/perf/tests/tests.h | 1 + tools/perf/util/pmus.c | 7 + tools/perf/util/pmus.h | 3 + 6 files changed, 256 insertions(+) create mode 100644 tools/perf/tests/hwmon_pmu.c
tools/perf/tests/Build +1 -0
@@ -67,6 +67,7 @@ perf-test-y += sigtrap.o perf-test-y += event_groups.o perf-test-y += symbols.o perf-test-y += util.o +perf-test-y += hwmon_pmu.o perf-test-y += tool_pmu.o ifeq ($(SRCARCH),$(filter $(SRCARCH),x86 arm arm64 powerpc))
tools/perf/tests/builtin-test.c +1 -0
@@ -73,6 +73,7 @@ static struct test_suite *generic_tests[] = { &suite__PERF_RECORD, &suite__pmu, &suite__pmu_events, + &suite__hwmon_pmu, &suite__tool_pmu, &suite__dso_data, &suite__perf_evsel__roundtrip_name_test,
tools/perf/tests/hwmon_pmu.c new file +243 -0
243 lines not on this page · raw message
tools/perf/tests/tests.h +1 -0
@@ -83,6 +83,7 @@ DECLARE_SUITE(perf_evsel__tp_sched_test);DECLARE_SUITE (syscall_openat_tp_fields);DECLARE_SUITE (pmu);DECLARE_SUITE (pmu_events); +DECLARE_SUITE (hwmon_pmu);DECLARE_SUITE (tool_pmu);DECLARE_SUITE (attr);DECLARE_SUITE (dso_data);
tools/perf/util/pmus.c +7 -0
@@ -733,6 +733,13 @@ struct perf_pmu *perf_pmus__add_test_pmu(int test_sysfs_dirfd, const char *name)return perf_pmu__lookup (&other_pmus, test_sysfs_dirfd, name,/*eager_load=*/ true); } +struct perf_pmu *perf_pmus__add_test_hwmon_pmu (int hwmon_dir, +const char *sysfs_name, +const char *name) +{ +return hwmon_pmu__new (&other_pmus, hwmon_dir, sysfs_name, name); +} +struct perf_pmu *perf_pmus__fake_pmu (void ) {static struct perf_pmu fake = {
tools/perf/util/pmus.h +3 -0
@@ -30,6 +30,9 @@ bool perf_pmus__supports_extended_type(void);char *perf_pmus__default_pmu_name (void );struct perf_pmu *perf_pmus__add_test_pmu (int test_sysfs_dirfd,const char *name); +struct perf_pmu *perf_pmus__add_test_hwmon_pmu (int hwmon_dir, +const char *sysfs_name, +const char *name);struct perf_pmu *perf_pmus__fake_pmu (void );#endif /* __PMUS_H */
Signature · 1 line
2.47.0.105.g07ac214952-goog
kernel test robot
build botRe: [PATCH v5 4/5] perf test: Add hwmon "PMU" test
kernel test robot noticed the following build errors:
Hi Ian,
kernel test robot noticed the following build errors:
[auto build test ERROR on perf-tools-next/perf-tools-next]
[also build test ERROR on next-20241021]
[cannot apply to tip/perf/core perf-tools/perf-tools linus/master acme/perf/core v6.12-rc4] [If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Ian-Rogers/tools-api-io-Ensure-line_len_out-is-always-initialized/20241017-143759 base: https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git perf-tools-next patch link: https://lore.kernel.org/r/20241017063555.366065-5-irogers%40google.com patch subject: [PATCH v5 4/5] perf test: Add hwmon "PMU" test compiler: gcc-12 (Debian 12.2.0-14) 12.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241021/[email protected]/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
All errors (new ones prefixed by >>):
Makefile.config:665: No libunwind found. Please install libunwind-dev[el] >= 1.1 and/or set LIBUNWIND_DIR
PERF_VERSION = 6.12.rc3.g552cc7c00b6d
tests/hwmon_pmu.c: In function 'do_test':
>> tests/hwmon_pmu.c:149:17: error: implicit declaration of function 'strlcpy'; did you mean 'strncpy'? [-Werror=implicit-function-declaration]
149 | strlcpy(str, test_event, sizeof(str));
| ^~~~~~~
| strncpy
cc1: all warnings being treated as errors
make[7]: *** [tools/build/Makefile.build:105: tools/perf/tests/hwmon_pmu.o] Error 1
make[7]: *** Waiting for unfinished jobs....
make[6]: *** [tools/build/Makefile.build:158: tests] Error 2
make[5]: *** [Makefile.perf:777: tools/perf/perf-test-in.o] Error 2
make[5]: *** Waiting for unfinished jobs....
util/hwmon_pmu.c: In function 'parse_hwmon_filename':
util/hwmon_pmu.c:175:9: error: implicit declaration of function 'strlcpy'; did you mean 'strncpy'? [-Werror=implicit-function-declaration]
175 | strlcpy(fn_type, filename, sizeof(fn_type));
| ^~~~~~~
| strncpy cc1: all warnings being treated as errors
make[7]: *** [tools/build/Makefile.build:106: tools/perf/util/hwmon_pmu.o] Error 1 make[7]: *** Waiting for unfinished jobs....
make[6]: *** [tools/build/Makefile.build:158: util] Error 2
make[5]: *** [Makefile.perf:789: tools/perf/perf-util-in.o] Error 2 make[4]: *** [Makefile.perf:292: sub-make] Error 2
make[3]: *** [Makefile:76: all] Error 2
Signature · 2 lines
0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
Ian Rogers
reviewerPATCH v5 5/5 perf docs: Document tool and hwmon events
In reply to Ian RogersAdd a few paragraphs on tool and hwmon events.
--- tools/perf/Documentation/perf-list.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
tools/perf/Documentation/perf-list.txt +15 -0
@@ -243,6 +243,21 @@ For accessing trace point events perf needs to have read access to /sys/kernel/tracing, even when perf_event_paranoid is in a relaxed setting. +TOOL/HWMON EVENTS +----------------- + +Some events don't have an associated PMU instead reading values +available to software without perf_event_open. As these events don't +support sampling they can only really be read by tools like perf stat. + +Tool events provide times and certain system parameters. Examples +include duration_time, user_time, system_time and num_cpus_online. + +Hwmon events provide easy access to hwmon sysfs data typically in +/sys/class/hwmon. This information includes temperatures, fan speeds +and energy usage. + + TRACING -------
Signature · 1 line
2.47.0.105.g07ac214952-goog