From owner-p4-projects@FreeBSD.ORG Wed Aug 2 02:32:01 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 09CBF16A4E0; Wed, 2 Aug 2006 02:32:01 +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 D81D816A4DE for ; Wed, 2 Aug 2006 02:32:00 +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 A962543D45 for ; Wed, 2 Aug 2006 02:32:00 +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 k722W0Bs081561 for ; Wed, 2 Aug 2006 02:32:00 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k722W0ps081556 for perforce@freebsd.org; Wed, 2 Aug 2006 02:32:00 GMT (envelope-from jb@freebsd.org) Date: Wed, 2 Aug 2006 02:32:00 GMT Message-Id: <200608020232.k722W0ps081556@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 102985 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: Wed, 02 Aug 2006 02:32:01 -0000 http://perforce.freebsd.org/chv.cgi?CH=102985 Change 102985 by jb@jb_freebsd2 on 2006/08/02 02:31:16 Add some debugging statements to set aside the %pc and %tick in the per-cpu structure. Affected files ... .. //depot/projects/kmacy_sun4v_stable/src/sys/sun4v/sun4v/interrupt.S#2 edit Differences ... ==== //depot/projects/kmacy_sun4v_stable/src/sys/sun4v/sun4v/interrupt.S#2 (text+ko) ==== @@ -29,6 +29,7 @@ __FBSDID("$FreeBSD: src/sys/sparc64/sparc64/interrupt.S,v 1.8 2005/04/16 15:05:56 marius Exp $"); #include "opt_simulator.h" +#include "opt_trap_trace.h" #include #include #include @@ -437,6 +438,25 @@ membar #Sync GET_PCPU_PHYS_SCRATCH(%g6) wr %g0, ASI_REAL, %asi + +#ifdef TRAP_TRACING + /* pcpu->pad[0] = %pc */ + rd %pc, %g4 + stxa %g4, [PCPU(PAD)]%asi + + /* pcpu->pad[1] = %tick */ + rdpr %tick, %g4 + stxa %g4, [PCPU(PAD) + 8]%asi + + /* + * Increment a counter which might help us notice if we're + * stuck in a loop. pcpu->pad[2] = count + */ + ldxa [PCPU(PAD) + 16]%asi, %g4 + add %g4, 1, %g4 + stxa %g4, [PCPU(PAD) + 16]%asi +#endif + lda [PCPU(CPUMASK)]%asi, %g4 lda [%g3]%asi, %g1 1: or %g1, %g4, %g2