From owner-p4-projects@FreeBSD.ORG Fri Jul 28 01:02:13 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 83FB316A4E0; Fri, 28 Jul 2006 01:02:13 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5C7E616A4DD for ; Fri, 28 Jul 2006 01:02:13 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2965043D5C for ; Fri, 28 Jul 2006 01:02:13 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k6S12DkQ051851 for ; Fri, 28 Jul 2006 01:02:13 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k6S12Cgp051848 for perforce@freebsd.org; Fri, 28 Jul 2006 01:02:12 GMT (envelope-from jb@freebsd.org) Date: Fri, 28 Jul 2006 01:02:12 GMT Message-Id: <200607280102.k6S12Cgp051848@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 102622 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Jul 2006 01:02:13 -0000 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 __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 #include #include #include #include +#ifdef CPU_SNAPSHOT +#include +#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)