opnsense-src/sys/dev/hwpmc
Paulo Fragoso 290a7adfb1 hwpmc: improve diagnostic messages for invalid tunables
Replace printf() with log(LOG_WARNING, ...) in pmclog_initialize()
so that tunable validation failures are visible in dmesg and
/var/log/messages rather than only on the early console.

Also improve the messages to report both the invalid value and the
default it resets to, making it easier for users to understand why
their tunable was ignored.

While here, adjust some whitespacing/style.

Reviewed by:	Ali Mashtizadeh <ali@mashtizadeh.com>, mhorne
MFC after:	1 week
Sponsored by:	NLINK (nlink.com.br)
Differential Revision:	https://reviews.freebsd.org/D56029

(cherry picked from commit b3a18736ec2fc2bd097995dedd8d09e79bcb2056)
2026-04-16 12:18:25 -03:00
..
hwpmc_amd.c hwpmc_amd: remove an unused variable 2023-10-19 11:00:31 -03:00
hwpmc_amd.h hwpmc_amd: kill off k7 support bits 2023-10-18 15:05:45 -03:00
hwpmc_arm.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
hwpmc_arm64.c arm64: Assume get_kernel_reg returns true 2026-04-08 14:59:53 +01:00
hwpmc_arm64.h hwpmc/arm64: fix the type for pm_arm64_evsel 2024-06-25 09:07:19 +00:00
hwpmc_arm64_md.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
hwpmc_armv7.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
hwpmc_armv7.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
hwpmc_cmn600.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
hwpmc_cmn600.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
hwpmc_core.c x86: Allow sharing of perfomance counter interrupts 2024-12-15 16:39:36 +01:00
hwpmc_core.h hwpmc_core: remove two non-existent function prototypes 2023-10-18 15:05:44 -03:00
hwpmc_dmc620.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
hwpmc_dmc620.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
hwpmc_e500.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
hwpmc_intel.c pmc: Import Intel Granite Rapids events 2026-02-06 16:19:02 +01:00
hwpmc_logging.c hwpmc: improve diagnostic messages for invalid tunables 2026-04-16 12:18:25 -03:00
hwpmc_mod.c hwpmc: Use rdtsc instead of rdtscp for timestamps 2026-04-16 12:18:24 -03:00
hwpmc_mpc7xxx.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
hwpmc_power8.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
hwpmc_powerpc.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
hwpmc_powerpc.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
hwpmc_ppc970.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
hwpmc_riscv.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
hwpmc_soft.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
hwpmc_soft.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
hwpmc_tsc.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
hwpmc_tsc.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
hwpmc_uncore.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
hwpmc_uncore.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00
hwpmc_x86.c hwpmc_x86: Fix NULL deref when loading on unsupported hardware 2024-12-23 11:00:57 +01:00
pmc_events.h pmc: remove last bits of AMD K7 CPU support 2023-10-18 15:05:45 -03:00
pmu_dmc620.c dev/hwpmc: Fix the dmc620 MD4 macro 2024-05-22 08:19:49 +00:00
pmu_dmc620_reg.h sys: Remove $FreeBSD$: two-line .h pattern 2023-08-16 11:54:11 -06:00