The branch main has been updated by gnn:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=e018fedef0a6389240322da9fa4b9fa9971f6e59

commit e018fedef0a6389240322da9fa4b9fa9971f6e59
Author:     George V. Neville-Neil <[email protected]>
AuthorDate: 2026-01-06 08:17:38 +0000
Commit:     George V. Neville-Neil <[email protected]>
CommitDate: 2026-01-06 08:18:22 +0000

    Correct the data collection arguments.  Add proper tempdirs.
---
 tools/test/hwpmc/pmctest.py | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/tools/test/hwpmc/pmctest.py b/tools/test/hwpmc/pmctest.py
index f54541aeea1e..8accdf09e69a 100755
--- a/tools/test/hwpmc/pmctest.py
+++ b/tools/test/hwpmc/pmctest.py
@@ -20,10 +20,12 @@
 # prompt would go to stdout you won't see it, just press return
 # to continue or Ctrl-D to stop.
 
+import sys
 import subprocess
 from subprocess import PIPE
 import argparse
 import tempfile
+from pathlib import Path
 
 def gather_counters():
     """Run program and return output as array of lines."""
@@ -50,8 +52,10 @@ def main():
         print("no counters found")
         sys.exit()
 
+    program = Path(args.program).name
+
     if args.exercise == True:
-        tmpdir = tempfile.mkdtemp()
+        tmpdir = tempfile.mkdtemp(prefix=program + "-", suffix="-pmc")
         print("Exercising program ", args.program, " storing results data in 
", tmpdir)
 
     for counter in counters:
@@ -59,8 +63,7 @@ def main():
             continue
         if args.exercise == True:
             p = subprocess.Popen(["pmcstat",
-                                  "-O", tmpdir + "/" + args.program + "-" + 
counter + ".pmc",
-                                  "-g",
+                                  "-O", tmpdir + "/" + program + "-" + counter 
+ ".pmc",
                                   "-P", counter, args.program],
                                  text=True, stderr=PIPE)
             result = p.communicate()[1]

Reply via email to