Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Nov 2014 23:16:20 +0000 (UTC)
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r274766 - head/sys/dev/hwpmc
Message-ID:  <201411202316.sAKNGKUu041832@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: emaste
Date: Thu Nov 20 23:16:19 2014
New Revision: 274766
URL: https://svnweb.freebsd.org/changeset/base/274766

Log:
  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

Modified:
  head/sys/dev/hwpmc/hwpmc_mod.c

Modified: head/sys/dev/hwpmc/hwpmc_mod.c
==============================================================================
--- head/sys/dev/hwpmc/hwpmc_mod.c	Thu Nov 20 23:00:17 2014	(r274765)
+++ head/sys/dev/hwpmc/hwpmc_mod.c	Thu Nov 20 23:16:19 2014	(r274766)
@@ -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();



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201411202316.sAKNGKUu041832>