lavu/checkasm: add (private) kperf timing for macOS

Signed-off-by: J. Dekker <jdek@itanimul.li>
This commit is contained in:
J. Dekker
2021-07-20 19:09:22 +02:00
parent 4f49fa6abe
commit 9a727235fd
7 changed files with 201 additions and 4 deletions

View File

@@ -638,9 +638,17 @@ static int bench_init_linux(void)
}
return 0;
}
#endif
#elif CONFIG_MACOS_KPERF
static int bench_init_kperf(void)
{
if (ff_kperf_init()) {
fprintf(stderr, "checkasm must be run as root to use kperf on macOS\n");
return -1;
}
#if !CONFIG_LINUX_PERF
return 0;
}
#else
static int bench_init_ffmpeg(void)
{
#ifdef AV_READ_TIME
@@ -657,6 +665,8 @@ static int bench_init(void)
{
#if CONFIG_LINUX_PERF
int ret = bench_init_linux();
#elif CONFIG_MACOS_KPERF
int ret = bench_init_kperf();
#else
int ret = bench_init_ffmpeg();
#endif