[PATCH] D60336: [test-suite] litsupport/modules/perf.py: store profile filename in context.profilefile

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 5 13:03:46 PDT 2019


lebedev.ri created this revision.
lebedev.ri added reviewers: MatzeB, hfinkel, homerdin.
Herald added a project: LLVM.
lebedev.ri added a child revision: D60337: [test-suite] litsupport/modules/microbenchmark.py: propagate perf file to the microbenchmarks.

This

1. Removes duplication
2. Provides that filename to be potentially used by other modules (see next patch)


Repository:
  rT test-suite

https://reviews.llvm.org/D60336

Files:
  litsupport/modules/perf.py


Index: litsupport/modules/perf.py
===================================================================
--- litsupport/modules/perf.py
+++ litsupport/modules/perf.py
@@ -6,12 +6,12 @@
 
 
 def _mutateCommandLine(context, commandline):
-    profilefile = context.tmpBase + ".perf_data"
+    context.profilefile = context.tmpBase + ".perf_data"
     cmd = shellcommand.parse(commandline)
     cmd.wrap('perf', [
         'record',
         '-e', context.config.perf_profile_events,
-        '-o', profilefile,
+        '-o', context.profilefile,
         '--'
     ])
     if cmd.stdout is None:
@@ -33,4 +33,4 @@
     script = testplan.mutateScript(context, script, _mutateCommandLine)
     plan.profilescript += script
     plan.metric_collectors.append(
-        lambda context: {'profile': context.tmpBase + '.perf_data'})
+        lambda context: {'profile': context.profilefile})


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60336.193945.patch
Type: text/x-patch
Size: 882 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190405/524c7bab/attachment.bin>


More information about the llvm-commits mailing list