From e5cedd89dc22f3670bcd5d0edc219e48ec32c5ed Mon Sep 17 00:00:00 2001 From: Kip Macy Date: Wed, 15 Nov 2006 03:53:27 +0000 Subject: [PATCH] add trap trace to tl1 trap --- sys/sun4v/sun4v/exception.S | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sys/sun4v/sun4v/exception.S b/sys/sun4v/sun4v/exception.S index f77b24be10a1..e8dfeabdb899 100644 --- a/sys/sun4v/sun4v/exception.S +++ b/sys/sun4v/sun4v/exception.S @@ -1929,6 +1929,15 @@ END(fork_trampoline) #define TRAP_ENTRY_SHIFT 5 #define TRAP_ENTRY_MASK 0x1ff ENTRY(tl1_trap) +#ifdef TRAP_TRACING + GET_PCPU_PHYS_SCRATCH(%g6) + mov 1, %g6 + sll %g6, RW_SHIFT, %g6 + add %g6, PC_TSBWBUF, %g6 + add PCPU_REG, %g6, %g6 + wr %g0, ASI_REAL, %asi + TTRACE_ADD_SAFE(%g6, 0, 0, 0, 0, 0) +#endif ! assume no tl1 handler rdpr %tpc, %g7