PERFORCE change 102622 for review
John Birrell
jb at FreeBSD.org
Fri Jul 28 01:02:13 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=102622
Change 102622 by jb at 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)
More information about the p4-projects
mailing list