[test-suite] r358085 - [test-suite] litsupport/modules/perf.py: store profile filename in context.profilefile
Roman Lebedev via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 10 07:12:39 PDT 2019
Author: lebedevri
Date: Wed Apr 10 07:12:38 2019
New Revision: 358085
URL: http://llvm.org/viewvc/llvm-project?rev=358085&view=rev
Log:
[test-suite] litsupport/modules/perf.py: store profile filename in context.profilefile
Summary:
This
1. Removes duplication
2. Provides that filename to be potentially used by other modules (see D60337)
Reviewers: MatzeB, hfinkel, homerdin, fhahn
Reviewed By: fhahn
Subscribers: fhahn, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60336
Modified:
test-suite/trunk/litsupport/modules/perf.py
Modified: test-suite/trunk/litsupport/modules/perf.py
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/litsupport/modules/perf.py?rev=358085&r1=358084&r2=358085&view=diff
==============================================================================
--- test-suite/trunk/litsupport/modules/perf.py (original)
+++ test-suite/trunk/litsupport/modules/perf.py Wed Apr 10 07:12:38 2019
@@ -6,12 +6,13 @@ from litsupport.modules import run_under
def _mutateCommandLine(context, commandline):
- profilefile = context.tmpBase + ".perf_data"
+ context.profilefile = context.tmpBase + ".perf_data"
+ # Storing profile file in context allows other modules to be aware of it.
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 +34,4 @@ def mutatePlan(context, plan):
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})
More information about the llvm-commits
mailing list