Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Jul 2006 01:02:12 GMT
From:      John Birrell <jb@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 102622 for review
Message-ID:  <200607280102.k6S12Cgp051848@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=102622

Change 102622 by jb@jb_freebsd2 on 2006/07/28 01:01:47

	If the kernel CPU_SNAPSHOT option is defined, then take a snapshot
	of the per-cpu registers for each cpu switch.
	
	Yes, this will have a performance hit. It is anly intended to
	help diagnose what is going on when IPI's remain unacked. Once
	that problem is solved this code will be removed and CVS will have
	no record of it. Trust me, I know these things. 8-)

Affected files ...

.. //depot/projects/dtrace/src/sys/sun4v/sun4v/swtch.S#2 edit

Differences ...

==== //depot/projects/dtrace/src/sys/sun4v/sun4v/swtch.S#2 (text+ko) ====

@@ -27,12 +27,18 @@
 #include <machine/asm.h>
 __FBSDID("$FreeBSD: src/sys/sparc64/sparc64/swtch.S,v 1.33 2004/05/26 12:06:52 tmm Exp $");
 
+#include "opt_cpu_snapshot.h"
+
 #include <machine/asi.h>
 #include <machine/asmacros.h>
 #include <machine/ktr.h>
 #include <machine/tstate.h>
 #include <machine/hypervisorvar.h>
 
+#ifdef CPU_SNAPSHOT
+#include <machine/cpu_snapshot.h>
+#endif
+
 #include "assym.s"
 
 	.register	%g2, #ignore
@@ -226,8 +232,18 @@
 	/*
 	 * Done.  Return and load the new process's window from the stack.
 	 */
-5:	ret
+5:
+#ifdef CPU_SNAPSHOT
+	restore
+
+#include "machine/cpu_snapshot_save.h"
+
+	retl
+	 nop
+#else
+	ret
 	 restore
+#endif
 END(cpu_switch)
 
 ENTRY(savectx)



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