HomeFreeBSD

hwpmc: improve diagnostic messages for invalid tunables

Description

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

Details

Provenance
paulo_nlink.com.brAuthored on Mar 23 2026, 2:54 PM
mhorneCommitted on Mar 23 2026, 8:21 PM
Reviewer
mhorne
Differential Revision
D56029: hwpmc: improve diagnostic messages for invalid tunables
Parents
rGdf47355fae72: libpmc: Add support for IBS qualifiers
Branches
Unknown
Tags
Unknown