Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1// SPDX-License-Identifier: GPL-2.0
2#include "osnoise.h"
3
4/*
5 * Define timerlat tracing mode.
6 *
7 * There are three tracing modes:
8 * - tracefs-only, used when BPF is unavailable.
9 * - BPF-only, used when BPF is available and neither trace saving nor
10 * auto-analysis are enabled.
11 * - mixed mode, used when BPF is available and either trace saving or
12 * auto-analysis is enabled (which rely on sample collection through
13 * tracefs).
14 */
15enum timerlat_tracing_mode {
16 TRACING_MODE_BPF,
17 TRACING_MODE_TRACEFS,
18 TRACING_MODE_MIXED,
19};
20
21struct timerlat_params {
22 struct common_params common;
23 long long timerlat_period_us;
24 long long print_stack;
25 int dma_latency;
26 int no_aa;
27 int dump_tasks;
28 int deepest_idle_state;
29 enum timerlat_tracing_mode mode;
30};
31
32#define to_timerlat_params(ptr) container_of(ptr, struct timerlat_params, common)
33
34int timerlat_apply_config(struct osnoise_tool *tool, struct timerlat_params *params);
35int timerlat_main(int argc, char *argv[]);
36int timerlat_enable(struct osnoise_tool *tool);
37void timerlat_analyze(struct osnoise_tool *tool, bool stopped);
38void timerlat_free(struct osnoise_tool *tool);
39