Date: Fri, 28 Jul 2006 01:04:16 GMT From: John Birrell <jb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 102623 for review Message-ID: <200607280104.k6S14GYd053184@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=102623 Change 102623 by jb@jb_freebsd2 on 2006/07/28 01:03:53 Add the index (program counter or call address) and the program counter. Add a function for ddb to report the CPU register snapshots. Affected files ... .. //depot/projects/dtrace/src/sys/sun4v/sun4v/cpu_snapshot.c#3 edit Differences ... ==== //depot/projects/dtrace/src/sys/sun4v/sun4v/cpu_snapshot.c#3 (text+ko) ==== @@ -5,8 +5,10 @@ #include <stdio.h> #include <stdlib.h> #else +#include "opt_ddb.h" #include <sys/kernel.h> #include <sys/systm.h> +#include <ddb/ddb.h> #endif #define CPU_SNAPSHOT_GLOBAL @@ -32,7 +34,7 @@ if (p->r_o7 == 0) continue; - printf("[%02d] CallAddr: 0x%jx count %jd pstate 0x%jx tl 0x%jx tick 0x%jx pil 0x%jx\n",j,p->r_o7,p->count,p->pstate,p->tl,p->tick,p->pil); + printf("[%02d] CallAddr: 0x%jx count %jd pc 0x%jx sp 0x%jx pstate 0x%jx tl 0x%jx tick 0x%jx pil 0x%jx\n",j,p->indx,p->count,p->pc,p->sp,p->pstate,p->tl,p->tick,p->pil); printf(" I: 0x%jx 0x%jx 0x%jx 0x%jx 0x%jx 0x%jx 0x%jx 0x%jx\n",p->r_i0,p->r_i1,p->r_i2,p->r_i3,p->r_i4,p->r_i5,p->r_i6,p->r_i7); printf(" O: 0x%jx 0x%jx 0x%jx 0x%jx 0x%jx 0x%jx 0x%jx 0x%jx\n",p->r_o0,p->r_o1,p->r_o2,p->r_o3,p->r_o4,p->r_o5,p->r_o6,p->r_o7); printf(" G: 0x%jx 0x%jx 0x%jx 0x%jx 0x%jx 0x%jx 0x%jx\n",p->r_g1,p->r_g2,p->r_g3,p->r_g4,p->r_g5,p->r_g6,p->r_g7); @@ -40,6 +42,13 @@ } } +#ifdef DDB +DB_SHOW_COMMAND(cpu_snapshot, db_show_cpu_snapshot) +{ + cpu_snapshot_report(-1); +} +#endif + #ifdef CPU_SNAPSHOT_TEST int main(int argc, char *argv[]) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200607280104.k6S14GYd053184>