summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pmcstat
diff options
context:
space:
mode:
authorjkoshy <jkoshy@FreeBSD.org>2008-07-01 15:20:15 +0000
committerjkoshy <jkoshy@FreeBSD.org>2008-07-01 15:20:15 +0000
commitef261a0536bab099cbfb430d8d8a55eeaa49fcbc (patch)
tree83f2ea5ac561f6e837d9194e3f002e4ea36c815c /usr.sbin/pmcstat
parent95363a633ab04b114ab502bbf0a98cfda36dc35d (diff)
downloadFreeBSD-src-ef261a0536bab099cbfb430d8d8a55eeaa49fcbc.zip
FreeBSD-src-ef261a0536bab099cbfb430d8d8a55eeaa49fcbc.tar.gz
Fix a regression: attach process PMCs to the process created when
a command line is specified.
Diffstat (limited to 'usr.sbin/pmcstat')
-rw-r--r--usr.sbin/pmcstat/pmcstat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/pmcstat/pmcstat.c b/usr.sbin/pmcstat/pmcstat.c
index 0fe0619..bc4f021 100644
--- a/usr.sbin/pmcstat/pmcstat.c
+++ b/usr.sbin/pmcstat/pmcstat.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2003-2007, Joseph Koshy
+ * Copyright (c) 2003-2008, Joseph Koshy
* Copyright (c) 2007 The FreeBSD Foundation
* All rights reserved.
*
@@ -1144,7 +1144,7 @@ main(int argc, char **argv)
err(EX_OSERR, "ERROR: Cannot retrieve driver statistics");
/* Attach process pmcs to the target process. */
- if (args.pa_flags & FLAG_HAS_TARGET) {
+ if (args.pa_flags & (FLAG_HAS_TARGET | FLAG_HAS_COMMANDLINE)) {
if (SLIST_EMPTY(&args.pa_targets))
errx(EX_DATAERR, "ERROR: No matching target "
"processes.");
OpenPOWER on IntegriCloud