tools/x264_disable_mc_mul: run perf
This commit is contained in:
@@ -1,8 +1,9 @@
|
|||||||
import os
|
import os
|
||||||
from pathlib import Path
|
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 import SPEC, check_bench_dir, find_build, get_benchspec_dir, x264
|
||||||
|
from speccpu.flaglib.perf import record as recordflags
|
||||||
|
|
||||||
|
|
||||||
def x264_disable_mc_mul(
|
def x264_disable_mc_mul(
|
||||||
@@ -38,7 +39,10 @@ def x264_disable_mc_mul(
|
|||||||
# Execute that new binary
|
# Execute that new binary
|
||||||
x264.update_exe(recompiled_x264_path, x264_dir / "exe")
|
x264.update_exe(recompiled_x264_path, x264_dir / "exe")
|
||||||
|
|
||||||
with Popen(
|
x264_run = x264_dir / "run" / "run_base_refspeed_mytest-m64.0000"
|
||||||
|
|
||||||
|
def runcpu():
|
||||||
|
return Popen(
|
||||||
spec.mkcmd_runcpu(
|
spec.mkcmd_runcpu(
|
||||||
spec_config,
|
spec_config,
|
||||||
["x264_s"],
|
["x264_s"],
|
||||||
@@ -48,8 +52,24 @@ def x264_disable_mc_mul(
|
|||||||
build_type=SPEC.BuildType.Nobuild,
|
build_type=SPEC.BuildType.Nobuild,
|
||||||
),
|
),
|
||||||
env=spec_env,
|
env=spec_env,
|
||||||
) as process:
|
encoding="utf-8",
|
||||||
process.wait()
|
)
|
||||||
|
|
||||||
|
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():
|
def main():
|
||||||
|
|||||||
Reference in New Issue
Block a user