tools/x264_disable_mc_mul: run perf
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
import os
|
||||
from pathlib import Path
|
||||
from subprocess import Popen
|
||||
from subprocess import Popen, run
|
||||
|
||||
from speccpu import SPEC, check_bench_dir, find_build, get_benchspec_dir, x264
|
||||
from speccpu.flaglib.perf import record as recordflags
|
||||
|
||||
|
||||
def x264_disable_mc_mul(
|
||||
@@ -38,18 +39,37 @@ def x264_disable_mc_mul(
|
||||
# Execute that new binary
|
||||
x264.update_exe(recompiled_x264_path, x264_dir / "exe")
|
||||
|
||||
with Popen(
|
||||
spec.mkcmd_runcpu(
|
||||
spec_config,
|
||||
["x264_s"],
|
||||
setprocgroup=True,
|
||||
workload="ref",
|
||||
output_root=spec_outputroot,
|
||||
build_type=SPEC.BuildType.Nobuild,
|
||||
),
|
||||
env=spec_env,
|
||||
) as process:
|
||||
process.wait()
|
||||
x264_run = x264_dir / "run" / "run_base_refspeed_mytest-m64.0000"
|
||||
|
||||
def runcpu():
|
||||
return Popen(
|
||||
spec.mkcmd_runcpu(
|
||||
spec_config,
|
||||
["x264_s"],
|
||||
setprocgroup=True,
|
||||
workload="ref",
|
||||
output_root=spec_outputroot,
|
||||
build_type=SPEC.BuildType.Nobuild,
|
||||
),
|
||||
env=spec_env,
|
||||
encoding="utf-8",
|
||||
)
|
||||
|
||||
run(
|
||||
[
|
||||
"perf",
|
||||
"record",
|
||||
*recordflags(
|
||||
[
|
||||
str(x264_run / "x264_s_base.mytest-m64"),
|
||||
*x264.specinvoke_args["ref"],
|
||||
],
|
||||
output=str(Path() / "x264.perf"),
|
||||
),
|
||||
],
|
||||
check=True,
|
||||
cwd=x264_run,
|
||||
)
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
Reference in New Issue
Block a user