mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-30 13:52:50 +01:00
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]>
40 lines
522 B
C
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);
|