summaryrefslogtreecommitdiffstats
path: root/sys/dev/hwpmc
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2015-02-15 20:55:26 +0000
committeremaste <emaste@FreeBSD.org>2015-02-15 20:55:26 +0000
commitd09137091df72b163b9a5af8fcbdf0dc8a77f90a (patch)
tree23d988a3a70bcaf6ae9087fded0d45b7cee20054 /sys/dev/hwpmc
parenta445eafde3392df6fbc5fb1b0b3c31e3a072fc00 (diff)
downloadFreeBSD-src-d09137091df72b163b9a5af8fcbdf0dc8a77f90a.zip
FreeBSD-src-d09137091df72b163b9a5af8fcbdf0dc8a77f90a.tar.gz
Clamp too large hwpmc callchaindepth to maximum
If the depth requested by the user is too large, it's better to provide the maximum than the smaller default. MFC of: r274766 Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'sys/dev/hwpmc')
-rw-r--r--sys/dev/hwpmc/hwpmc_mod.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/hwpmc/hwpmc_mod.c b/sys/dev/hwpmc/hwpmc_mod.c
index 77cd257..9eea4ba 100644
--- a/sys/dev/hwpmc/hwpmc_mod.c
+++ b/sys/dev/hwpmc/hwpmc_mod.c
@@ -4753,8 +4753,9 @@ pmc_initialize(void)
if (pmc_callchaindepth <= 0 ||
pmc_callchaindepth > PMC_CALLCHAIN_DEPTH_MAX) {
(void) printf("hwpmc: tunable \"callchaindepth\"=%d out of "
- "range.\n", pmc_callchaindepth);
- pmc_callchaindepth = PMC_CALLCHAIN_DEPTH;
+ "range - using %d.\n", pmc_callchaindepth,
+ PMC_CALLCHAIN_DEPTH_MAX);
+ pmc_callchaindepth = PMC_CALLCHAIN_DEPTH_MAX;
}
md = pmc_md_initialize();
OpenPOWER on IntegriCloud