Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Aug 2006 06:44:25 GMT
From:      John Birrell <jb@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 102997 for review
Message-ID:  <200608020644.k726iP5e010387@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=102997

Change 102997 by jb@jb_freebsd2 on 2006/08/02 06:44:00

	Only print the trap trace data on the first CPU that decides to
	panic. We really don't need (potentially) 32 copies of the info.
	
	Also printf the pad fields in the per-cpu structure which we're
	using a temporary debug storage during traps.

Affected files ...

.. //depot/projects/dtrace/src/sys/sun4v/sun4v/pmap.c#10 edit

Differences ...

==== //depot/projects/dtrace/src/sys/sun4v/sun4v/pmap.c#10 (text+ko) ====

@@ -1218,6 +1218,10 @@
 	m->md.pv_list_count++;
 }
 
+#ifdef TRAP_TRACING
+static int trap_trace_report_done;
+#endif
+
 #ifdef SMP
 static cpumask_t
 pmap_ipi(pmap_t pmap, char *func, uint64_t arg1, uint64_t arg2)
@@ -1288,9 +1292,17 @@
 			       curactive & ~ackmask);
 
 #ifdef TRAP_TRACING
-			for (j = 0; j < MAXCPU; j++)
-				if (((1 << j) & curactive & ~ackmask) != 0)
-					trap_trace_report(j);
+			if (!trap_trace_report_done) {
+				trap_trace_report_done = 1;
+				for (j = 0; j < MAXCPU; j++)
+					if (((1 << j) & curactive & ~ackmask) != 0) {
+						struct pcpu *pc = pcpu_find(j);
+						printf("pcpu pad 0x%jx 0x%jx 0x%jx 0x%jx 0x%jx 0x%jx 0x%jx\n",
+						    pc->pad[0], pc->pad[1], pc->pad[2], pc->pad[3],
+						    pc->pad[4], pc->pad[5], pc->pad[6]);
+						trap_trace_report(j);
+					}
+			}
 #endif
 
 			hv_cpu_state((uint64_t)ffs64(curactive & ~ackmask), &cpu_state);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200608020644.k726iP5e010387>