svn commit: r240101 - head/tools/test/hwpmc

George V. Neville-Neil gnn at FreeBSD.org
Tue Sep 4 20:14:37 UTC 2012


Author: gnn
Date: Tue Sep  4 20:14:37 2012
New Revision: 240101
URL: http://svn.freebsd.org/changeset/base/240101

Log:
  Add a reasonable error message telling the caller to specify a program
  to be executed under hwpmc.  If there is no program to run then
  exit.

Modified:
  head/tools/test/hwpmc/pmctest.py

Modified: head/tools/test/hwpmc/pmctest.py
==============================================================================
--- head/tools/test/hwpmc/pmctest.py	Tue Sep  4 19:49:37 2012	(r240100)
+++ head/tools/test/hwpmc/pmctest.py	Tue Sep  4 20:14:37 2012	(r240101)
@@ -67,6 +67,10 @@ def main():
 
     (options, args) = parser.parse_args()
 
+    if (options.program == None):
+        print "specify program, such as ls, with -p/--program"
+        sys.exit()
+        
     p = subprocess.Popen(["pmccontrol", "-L"], stdout=PIPE)
     counters = p.communicate()[0]
 


More information about the svn-src-all mailing list