diff options
author | rpaulo <rpaulo@FreeBSD.org> | 2010-08-02 13:40:53 +0000 |
---|---|---|
committer | rpaulo <rpaulo@FreeBSD.org> | 2010-08-02 13:40:53 +0000 |
commit | 577761e1812fe4592e28db32d4518e8cba986503 (patch) | |
tree | 3fd229f631527cecfed36a148a8b8d4077b143b5 /cddl/contrib/opensolaris/lib/libdtrace/common/dt_pid.c | |
parent | 796dcddd184bb641110681caa8686cd769bc02ac (diff) | |
parent | 679969c11d8f283ad56fa4b5bbd853cd1e7aa8fa (diff) | |
download | FreeBSD-src-577761e1812fe4592e28db32d4518e8cba986503.zip FreeBSD-src-577761e1812fe4592e28db32d4518e8cba986503.tar.gz |
MFV OpenSolaris DTrace userland bits.
Diffstat (limited to 'cddl/contrib/opensolaris/lib/libdtrace/common/dt_pid.c')
-rw-r--r-- | cddl/contrib/opensolaris/lib/libdtrace/common/dt_pid.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_pid.c b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_pid.c index 5640b4a..b2ae972 100644 --- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_pid.c +++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_pid.c @@ -20,12 +20,10 @@ */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2010 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include <assert.h> #include <strings.h> #include <stdlib.h> @@ -443,7 +441,12 @@ dt_pid_mod_filt(void *arg, const prmap_t *pmp, const char *obj) else pp->dpp_obj++; - dt_pid_objname(name, sizeof (name), pp->dpp_lmid, obj); + if (gmatch(pp->dpp_obj, pp->dpp_mod)) + return (dt_pid_per_mod(pp, pmp, obj)); + + (void) Plmid(pp->dpp_pr, pmp->pr_vaddr, &pp->dpp_lmid); + + dt_pid_objname(name, sizeof (name), pp->dpp_lmid, pp->dpp_obj); if (gmatch(name, pp->dpp_mod)) return (dt_pid_per_mod(pp, pmp, obj)); @@ -673,7 +676,7 @@ dt_pid_create_usdt_probes(dtrace_probedesc_t *pdp, dtrace_hdl_t *dtp, struct ps_prochandle *P = dpr->dpr_proc; int ret = 0; - assert(DT_MUTEX_HELD(&dpr->dpr_lock)); + assert(MUTEX_HELD(&dpr->dpr_lock)); #ifdef DOODAD (void) Pupdate_maps(P); |