Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 May 2016 15:26:35 +0000 (UTC)
From:      Andrew Turner <andrew@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r300510 - head/sys/kern
Message-ID:  <201605231526.u4NFQZH1072658@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: andrew
Date: Mon May 23 15:26:35 2016
New Revision: 300510
URL: https://svnweb.freebsd.org/changeset/base/300510

Log:
  Add the needed hwpmc hooks to subr_intr.c. This is needed for the correct
  operation of hwpmc on, for example, arm64 with intrng.
  
  Obtained from:	ABT Systems Ltd
  Sponsored by:	The FreeBSD Foundation

Modified:
  head/sys/kern/subr_intr.c

Modified: head/sys/kern/subr_intr.c
==============================================================================
--- head/sys/kern/subr_intr.c	Mon May 23 15:11:01 2016	(r300509)
+++ head/sys/kern/subr_intr.c	Mon May 23 15:26:35 2016	(r300510)
@@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$");
 
 #include "opt_acpi.h"
 #include "opt_ddb.h"
+#include "opt_hwpmc_hooks.h"
 #include "opt_platform.h"
 
 #include <sys/param.h>
@@ -53,6 +54,10 @@ __FBSDID("$FreeBSD$");
 #include <sys/rman.h>
 #include <sys/sched.h>
 #include <sys/smp.h>
+#ifdef HWPMC_HOOKS
+#include <sys/pmckern.h>
+#endif
+
 #include <machine/atomic.h>
 #include <machine/intr.h>
 #include <machine/cpu.h>
@@ -311,6 +316,10 @@ intr_irq_handler(struct trapframe *tf)
 	irq_root_filter(irq_root_arg);
 	td->td_intr_frame = oldframe;
 	critical_exit();
+#ifdef HWPMC_HOOKS
+	if (pmc_hook && (PCPU_GET(curthread)->td_pflags & TDP_CALLCHAIN))
+		pmc_hook(PCPU_GET(curthread), PMC_FN_USER_CALLCHAIN, tf);
+#endif
 }
 
 /*



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