Date: Fri, 4 Jan 2008 07:56:28 GMT From: John Birrell <jb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 132465 for review Message-ID: <200801040756.m047uSfg052331@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=132465 Change 132465 by jb@jb_freebsd1 on 2008/01/04 07:55:55 Add some debug stuff. Add a missing function all. Comment out the toxic range stuff for now because it is not accurate. Affected files ... .. //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/dtrace/dtrace.c#11 edit Differences ... ==== //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/dtrace/dtrace.c#11 (text) ==== @@ -2616,6 +2616,7 @@ return (dtrace_getreg(lwp->lwp_regs, ndx)); #else +printf("%s(%d): DOODAD\n",__func__,__LINE__); return (0); #endif } @@ -2854,7 +2855,8 @@ (uintptr_t)curthread->t_procp->p_user.u_comm, state, mstate)); #else - return ((uint64_t)(uintptr_t) curthread->td_proc->p_comm); + return (dtrace_dif_varstr( + (uintptr_t) curthread->td_proc->p_comm, state, mstate)); #endif case DIF_VAR_ZONENAME: @@ -2993,6 +2995,7 @@ break; case DIF_SUBR_MUTEX_OWNED: +printf("%s(%d): DOODAD\n",__func__,__LINE__); #ifdef DOODAD union { if (!dtrace_canload(tupregs[0].dttk_value, sizeof (kmutex_t), @@ -3010,6 +3013,7 @@ break; case DIF_SUBR_MUTEX_OWNER: +printf("%s(%d): DOODAD\n",__func__,__LINE__); #ifdef DOODAD union { if (!dtrace_canload(tupregs[0].dttk_value, sizeof (kmutex_t), @@ -3028,6 +3032,7 @@ break; case DIF_SUBR_MUTEX_TYPE_ADAPTIVE: +printf("%s(%d): DOODAD\n",__func__,__LINE__); #ifdef DOODAD union { if (!dtrace_canload(tupregs[0].dttk_value, sizeof (kmutex_t), @@ -3042,6 +3047,7 @@ break; case DIF_SUBR_MUTEX_TYPE_SPIN: +printf("%s(%d): DOODAD\n",__func__,__LINE__); #ifdef DOODAD union { if (!dtrace_canload(tupregs[0].dttk_value, sizeof (kmutex_t), @@ -3056,6 +3062,7 @@ break; case DIF_SUBR_RW_READ_HELD: { +printf("%s(%d): DOODAD\n",__func__,__LINE__); #ifdef DOODAD union { uintptr_t tmp; @@ -3073,6 +3080,7 @@ } case DIF_SUBR_RW_WRITE_HELD: +printf("%s(%d): DOODAD\n",__func__,__LINE__); #ifdef DOODAD union { if (!dtrace_canload(tupregs[0].dttk_value, sizeof (krwlock_t), @@ -3087,6 +3095,7 @@ break; case DIF_SUBR_RW_ISWRITER: +printf("%s(%d): DOODAD\n",__func__,__LINE__); #ifdef DOODAD union { if (!dtrace_canload(tupregs[0].dttk_value, sizeof (krwlock_t), @@ -3210,6 +3219,7 @@ case DIF_SUBR_MSGSIZE: case DIF_SUBR_MSGDSIZE: { +printf("%s(%d): DOODAD\n",__func__,__LINE__); #ifdef DOODAD uintptr_t baddr = tupregs[0].dttk_value, daddr; uintptr_t wptr, rptr; @@ -3687,6 +3697,7 @@ } case DIF_SUBR_GETMAJOR: +printf("%s(%d): DOODAD\n",__func__,__LINE__); #ifdef DOODAD #ifdef _LP64 regs[rd] = (tupregs[0].dttk_value >> NBITSMINOR64) & MAXMAJ64; @@ -3697,6 +3708,7 @@ break; case DIF_SUBR_GETMINOR: +printf("%s(%d): DOODAD\n",__func__,__LINE__); #ifdef DOODAD #ifdef _LP64 regs[rd] = tupregs[0].dttk_value & MAXMIN64; @@ -3707,6 +3719,7 @@ break; case DIF_SUBR_DDI_PATHNAME: { +printf("%s(%d): DOODAD\n",__func__,__LINE__); #ifdef DOODAD /* * This one is a galactic mess. We are going to roughly @@ -4250,6 +4263,7 @@ case DIF_SUBR_INET_NTOA: case DIF_SUBR_INET_NTOA6: case DIF_SUBR_INET_NTOP: { +printf("%s(%d): DOODAD\n",__func__,__LINE__); #ifdef DOODAD size_t size; int af, argi, i; @@ -5306,6 +5320,7 @@ c[i++] = ')'; c[i] = '\0'; +printf("%s(%d): DOODAD\n",__func__,__LINE__); #ifdef DOODAD debug_enter(c); #endif @@ -5358,6 +5373,7 @@ if (curthread->t_dtrace_sig == 0) curthread->t_dtrace_sig = (uint8_t)sig; +printf("%s(%d): DOODAD\n",__func__,__LINE__); #ifdef DOODAD curthread->t_sig_check = 1; aston(curthread); @@ -5372,6 +5388,7 @@ if (!curthread->t_dtrace_stop) { curthread->t_dtrace_stop = 1; +printf("%s(%d): DOODAD\n",__func__,__LINE__); #ifdef DOODAD curthread->t_sig_check = 1; aston(curthread); @@ -5382,6 +5399,7 @@ static void dtrace_action_chill(dtrace_mstate_t *mstate, hrtime_t val) { +printf("%s(%d): DOODAD\n",__func__,__LINE__); #ifdef DOODAD hrtime_t now; volatile uint16_t *flags; @@ -5435,6 +5453,7 @@ dtrace_action_ustack(dtrace_mstate_t *mstate, dtrace_state_t *state, uint64_t *buf, uint64_t arg) { +printf("%s(%d): DOODAD\n",__func__,__LINE__); #ifdef DOODAD int nframes = DTRACE_USTACK_NFRAMES(arg); int strsize = DTRACE_USTACK_STRSIZE(arg); @@ -5705,6 +5724,7 @@ * profile case, the check above will ensure that * we're examining a user context. */ +printf("%s(%d): DOODAD\n",__func__,__LINE__); #ifdef DOODAD if (ecb->dte_cond & DTRACE_COND_OWNER) { cred_t *cr; @@ -12461,6 +12481,7 @@ * we can do destructive things to processes which * have altered credentials. */ +printf("%s(%d): DOODAD\n",__func__,__LINE__); #ifdef DOODAD if (priv_isequalset(priv_getset(cr, PRIV_EFFECTIVE), cr->cr_zone->zone_privset)) { @@ -12508,6 +12529,7 @@ * we can do destructive things to processes which * have altered credentials. */ +printf("%s(%d): DOODAD\n",__func__,__LINE__); #ifdef DOODAD if (priv_isequalset(priv_getset(cr, PRIV_EFFECTIVE), cr->cr_zone->zone_privset)) { @@ -14527,6 +14549,8 @@ static void dtrace_toxrange_add(uintptr_t base, uintptr_t limit) { +printf("%s(%d): DOODAD\n",__func__,__LINE__); +#ifdef DOODAD if (dtrace_toxranges >= dtrace_toxranges_max) { int osize, nsize; dtrace_toxrange_t *range; @@ -14559,6 +14583,7 @@ dtrace_toxrange[dtrace_toxranges].dtt_base = base; dtrace_toxrange[dtrace_toxranges].dtt_limit = limit; dtrace_toxranges++; +#endif } /*
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200801040756.m047uSfg052331>