Date: Wed, 19 Apr 2006 00:45:14 GMT From: John Birrell <jb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 95569 for review Message-ID: <200604190045.k3J0jEHO011177@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=95569 Change 95569 by jb@jb_freebsd2 on 2006/04/19 00:44:37 Add some diagnostic printfs to identify pieces of code that are commented out. I'll work on these when dtrace(1) gets up to the point of trying to use the code. For now we just need the code to compile and link. Affected files ... .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/drti.c#3 edit .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_aggregate.c#4 edit .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_consume.c#4 edit .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_error.c#2 edit .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_handle.c#3 edit .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_link.c#4 edit .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_pid.c#3 edit .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_proc.c#3 edit .. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_subr.c#4 edit Differences ... ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/drti.c#3 (text) ==== @@ -89,6 +89,7 @@ static void dtrace_dof_init(void) { +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); #ifdef DOODAD dof_hdr_t *dof = &__SUNW_dof; #ifdef _LP64 @@ -175,6 +176,7 @@ static void dtrace_dof_fini(void) { +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); #ifdef DOODAD int fd; ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_aggregate.c#4 (text) ==== @@ -233,6 +233,7 @@ static void dt_aggregate_usym(dtrace_hdl_t *dtp, uint64_t *data) { +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); #ifdef DOODAD uint64_t pid = data[0]; uint64_t *pc = &data[1]; @@ -258,6 +259,7 @@ static void dt_aggregate_umod(dtrace_hdl_t *dtp, uint64_t *data) { +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); #ifdef DOODAD uint64_t pid = data[0]; uint64_t *pc = &data[1]; @@ -973,6 +975,7 @@ assert(agp->dtat_ncpu == 0); assert(agp->dtat_cpus == NULL); +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); #ifdef DOODAD agp->dtat_maxcpu = dt_sysconf(dtp, _SC_CPUID_MAX) + 1; agp->dtat_ncpu = dt_sysconf(dtp, _SC_NPROCESSORS_MAX); ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_consume.c#4 (text) ==== @@ -568,6 +568,7 @@ dt_print_ustack(dtrace_hdl_t *dtp, FILE *fp, const char *format, caddr_t addr, uint64_t arg) { +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); #ifdef DOODAD /* LINTED - alignment */ uint64_t *pc = (uint64_t *)addr; @@ -613,6 +614,7 @@ dt_proc_lock(dtp, P); /* lock handle while we perform lookups */ for (i = 0; i < depth && pc[i] != 0; i++) { +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); #ifdef DOODAD const prmap_t *map; #endif @@ -632,6 +634,7 @@ (void) snprintf(c, sizeof (c), "%s`%s", dt_basename(objname), name); } +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); #ifdef DOODAD } else if (str != NULL && str[0] != '\0' && str[0] != '@' && (P != NULL && ((map = Paddr_to_map(P, pc[i])) == NULL || @@ -708,6 +711,7 @@ static int dt_print_usym(dtrace_hdl_t *dtp, FILE *fp, caddr_t addr, dtrace_actkind_t act) { +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); #ifdef DOODAD /* LINTED - alignment */ uint64_t pid = ((uint64_t *)addr)[0]; @@ -748,6 +752,7 @@ int dt_print_umod(dtrace_hdl_t *dtp, FILE *fp, const char *format, caddr_t addr) { +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); #ifdef DOODAD /* LINTED - alignment */ uint64_t pid = ((uint64_t *)addr)[0]; @@ -1801,6 +1806,7 @@ if ((nbuf.dtbd_data = malloc(size)) == NULL) return (dt_set_errno(dtp, EDT_NOMEM)); +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); #ifdef DOODAD if (max_ncpus == 0) max_ncpus = dt_sysconf(dtp, _SC_CPUID_MAX) + 1; @@ -1881,6 +1887,7 @@ if (!dtp->dt_active) return (dt_set_errno(dtp, EINVAL)); +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); #ifdef DOODAD if (max_ncpus == 0) max_ncpus = dt_sysconf(dtp, _SC_CPUID_MAX) + 1; ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_error.c#2 (text) ==== @@ -25,6 +25,7 @@ #pragma ident "@(#)dt_error.c 1.13 06/03/24 SMI" +#include <string.h> #include <strings.h> #include <dt_impl.h> ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_handle.c#3 (text) ==== @@ -249,7 +249,7 @@ err.dteda_action = -1; err.dteda_offset = -1; err.dteda_fault = DTRACEFLT_LIBRARY; - err.dteda_addr = NULL; + err.dteda_addr = 0; len = strlen(faultstr) + strlen(errpd->dtpd_provider) + strlen(errpd->dtpd_mod) + ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_link.c#4 (text) ==== @@ -400,6 +400,7 @@ s = &dofs[dofrh->dofr_tgtsec]; for (j = 0; j < nrel; j++) { +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); #ifdef DOODAD #if defined(__i386) || defined(__amd64) rel->r_offset = s->dofs_offset + @@ -1380,6 +1381,7 @@ * already been processed by an earlier link * invocation. */ +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); #ifdef DOODAD if (rsym.st_shndx != SHN_SUNW_IGNORE) { rsym.st_shndx = SHN_SUNW_IGNORE; ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_pid.c#3 (text) ==== @@ -453,6 +453,7 @@ dt_pid_create_pid_probes(dtrace_probedesc_t *pdp, dtrace_hdl_t *dtp, dt_pcb_t *pcb, dt_proc_t *dpr) { +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); #ifdef DOODAD dt_pid_probe_t pp; int ret = 0; @@ -607,6 +608,7 @@ dt_pid_create_usdt_probes(dtrace_probedesc_t *pdp, dtrace_hdl_t *dtp, dt_pcb_t *pcb, dt_proc_t *dpr) { +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); #ifdef DOODAD struct ps_prochandle *P = dpr->dpr_proc; int ret = 0; @@ -665,6 +667,7 @@ int dt_pid_create_probes(dtrace_probedesc_t *pdp, dtrace_hdl_t *dtp, dt_pcb_t *pcb) { +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); #ifdef DOODAD char provname[DTRACE_PROVNAMELEN]; struct ps_prochandle *P; ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_proc.c#3 (text) ==== @@ -169,6 +169,7 @@ void dt_proc_bpenable(dt_proc_t *dpr) { +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); #ifdef DOODAD dt_bkpt_t *dbp; @@ -188,6 +189,7 @@ void dt_proc_bpdisable(dt_proc_t *dpr) { +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); #ifdef DOODAD dt_bkpt_t *dbp; @@ -673,6 +675,7 @@ dt_proc_t * dt_proc_lookup(dtrace_hdl_t *dtp, struct ps_prochandle *P, int remove) { +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); #ifdef DOODAD dt_proc_hash_t *dph = dtp->dt_procs; pid_t pid = Pstatus(P)->pr_pid; @@ -700,6 +703,7 @@ static void dt_proc_destroy(dtrace_hdl_t *dtp, struct ps_prochandle *P) { +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); #ifdef DOODAD dt_proc_t *dpr = dt_proc_lookup(dtp, P, B_FALSE); dt_proc_hash_t *dph = dtp->dt_procs; @@ -872,6 +876,7 @@ struct ps_prochandle * dt_proc_create(dtrace_hdl_t *dtp, const char *file, char *const *argv) { +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); #ifdef DOODAD dt_proc_hash_t *dph = dtp->dt_procs; dt_proc_t *dpr; @@ -913,6 +918,7 @@ struct ps_prochandle * dt_proc_grab(dtrace_hdl_t *dtp, pid_t pid, int flags, int nomonitor) { +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); #ifdef DOODAD dt_proc_hash_t *dph = dtp->dt_procs; uint_t h = pid & (dph->dph_hashlen - 1); @@ -1011,6 +1017,7 @@ void dt_proc_release(dtrace_hdl_t *dtp, struct ps_prochandle *P) { +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); #ifdef DOODAD dt_proc_t *dpr = dt_proc_lookup(dtp, P, B_FALSE); dt_proc_hash_t *dph = dtp->dt_procs; @@ -1085,6 +1092,7 @@ struct ps_prochandle * dtrace_proc_create(dtrace_hdl_t *dtp, const char *file, char *const *argv) { +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); #ifdef DOODAD dt_ident_t *idp = dt_idhash_lookup(dtp->dt_macros, "target"); struct ps_prochandle *P = dt_proc_create(dtp, file, argv); ==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_subr.c#4 (text) ==== @@ -490,6 +490,7 @@ { const dtrace_vector_t *v = dtp->dt_vector; +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); #ifdef DOODAD if (v == NULL) return (p_online(cpu, P_STATUS)); @@ -914,6 +915,7 @@ dtrace_uaddr2str(dtrace_hdl_t *dtp, pid_t pid, uint64_t addr, char *str, int nbytes) { +printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); #ifdef DOODAD char name[PATH_MAX], objname[PATH_MAX], c[PATH_MAX * 2]; struct ps_prochandle *P = NULL;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200604190045.k3J0jEHO011177>