aboutsummaryrefslogtreecommitdiff
path: root/lib/libdtrace/common/dt_pid.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libdtrace/common/dt_pid.c')
-rw-r--r--lib/libdtrace/common/dt_pid.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/lib/libdtrace/common/dt_pid.c b/lib/libdtrace/common/dt_pid.c
index cf9498b3ed3f..241805154adc 100644
--- a/lib/libdtrace/common/dt_pid.c
+++ b/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>
@@ -370,17 +368,17 @@ dt_pid_mod_filt(void *arg, const prmap_t *pmp, const char *obj)
char name[DTRACE_MODNAMELEN];
dt_pid_probe_t *pp = arg;
- if (gmatch(obj, pp->dpp_mod))
- return (dt_pid_per_mod(pp, pmp, obj));
-
- (void) Plmid(pp->dpp_pr, pmp->pr_vaddr, &pp->dpp_lmid);
-
if ((pp->dpp_obj = strrchr(obj, '/')) == NULL)
pp->dpp_obj = 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));
@@ -578,7 +576,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));
(void) Pupdate_maps(P);
if (Pobject_iter(P, dt_pid_usdt_mapping, P) != 0) {