Files
James Clark 3fdf30607e perf test: Add deterministic workload
Add a workload that does the same thing every time for testing CPU trace
decoding.

Reviewed-by: Leo Yan <[email protected]>
Signed-off-by: James Clark <[email protected]>
Cc: Amir Ayupov <[email protected]>
Cc: Ian Rogers <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Jonathan Corbet <[email protected]>
Cc: Mike Leach <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Paschalis Mpeis <[email protected]>
Cc: Shuah Khan <[email protected]>
Cc: Suzuki Poulouse <[email protected]>
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
2026-06-10 18:55:48 -03:00

40 lines
522 B
C

// SPDX-License-Identifier: GPL-2.0
#include <linux/compiler.h>
#include "../tests.h"
int dt_work = 1234;
static void function1(void)
{
dt_work += 7;
dt_work += 7;
dt_work += 7;
}
static void function2(void)
{
dt_work += 7;
dt_work += 7;
dt_work += 7;
}
static int deterministic(int argc __maybe_unused,
const char **argv __maybe_unused)
{
dt_work += 7;
dt_work += 7;
dt_work += 7;
function1();
dt_work += 7;
dt_work += 7;
dt_work += 7;
function2();
return 0;
}
DEFINE_WORKLOAD(deterministic);