summaryrefslogtreecommitdiffstats
path: root/sys/dev/hwpmc/hwpmc_mod.c
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2014-11-20 23:16:19 +0000
committeremaste <emaste@FreeBSD.org>2014-11-20 23:16:19 +0000
commit7ed0dc3b7d060fe25947a8356da40e215f8b0d13 (patch)
treefcf0e52b2a71b68a0177414f512ad884a81b825d /sys/dev/hwpmc/hwpmc_mod.c
parent4c1f21b94e73bb3d630376deaf91af2cf45bc659 (diff)
downloadFreeBSD-src-7ed0dc3b7d060fe25947a8356da40e215f8b0d13.zip
FreeBSD-src-7ed0dc3b7d060fe25947a8356da40e215f8b0d13.tar.gz
Clamp too-large hwpmc callchaindepth to the maximum
If the depth requested by the user is too large, it's better to provide the maximum than the smaller default. Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'sys/dev/hwpmc/hwpmc_mod.c')
-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 42dd66c..f1506d6 100644
--- a/sys/dev/hwpmc/hwpmc_mod.c
+++ b/sys/dev/hwpmc/hwpmc_mod.c
@@ -4749,8 +4749,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