Date: Wed, 2 Aug 2006 02:32:00 GMT From: John Birrell <jb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 102985 for review Message-ID: <200608020232.k722W0ps081556@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <machine/hypervisorvar.h> #include <machine/asi.h> #include <machine/asmacros.h> @@ -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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200608020232.k722W0ps081556>