FILE
osnoise.h
File preview with syntax highlighting.
linux-6.19.14/tools/tracing/rtla/src/osnoise.h
1// SPDX-License-Identifier: GPL-2.0 2#pragma once 3 4#include "common.h" 5 6enum osnoise_mode { 7 MODE_OSNOISE = 0, 8 MODE_HWNOISE 9}; 10 11struct osnoise_params { 12 struct common_params common; 13 unsigned long long runtime; 14 unsigned long long period; 15 long long threshold; 16 enum osnoise_mode mode; 17}; 18 19#define to_osnoise_params(ptr) container_of(ptr, struct osnoise_params, common) 20 21/* 22 * *_INIT_VALs are also invalid values, they are used to 23 * communicate errors. 24 */ 25#define OSNOISE_OPTION_INIT_VAL (-1) 26#define OSNOISE_TIME_INIT_VAL (0) 27 28struct osnoise_context *osnoise_context_alloc(void); 29int osnoise_get_context(struct osnoise_context *context); 30void osnoise_put_context(struct osnoise_context *context); 31 32int osnoise_set_runtime_period(struct osnoise_context *context, 33 unsigned long long runtime, 34 unsigned long long period); 35void osnoise_restore_runtime_period(struct osnoise_context *context); 36 37int osnoise_set_stop_us(struct osnoise_context *context, 38 long long stop_us); 39void osnoise_restore_stop_us(struct osnoise_context *context); 40 41int osnoise_set_stop_total_us(struct osnoise_context *context, 42 long long stop_total_us); 43void osnoise_restore_stop_total_us(struct osnoise_context *context); 44 45int osnoise_set_timerlat_period_us(struct osnoise_context *context, 46 long long timerlat_period_us); 47void osnoise_restore_timerlat_period_us(struct osnoise_context *context); 48 49int osnoise_set_tracing_thresh(struct osnoise_context *context, 50 long long tracing_thresh); 51void osnoise_restore_tracing_thresh(struct osnoise_context *context); 52 53void osnoise_restore_print_stack(struct osnoise_context *context); 54int osnoise_set_print_stack(struct osnoise_context *context, 55 long long print_stack); 56 57int osnoise_set_irq_disable(struct osnoise_context *context, bool onoff); 58void osnoise_report_missed_events(struct osnoise_tool *tool); 59int osnoise_apply_config(struct osnoise_tool *tool, struct osnoise_params *params); 60 61int osnoise_hist_main(int argc, char *argv[]); 62int osnoise_top_main(int argc, char **argv); 63int osnoise_enable(struct osnoise_tool *tool); 64int osnoise_main(int argc, char **argv); 65int hwnoise_main(int argc, char **argv); 66 67extern struct tool_ops timerlat_top_ops, timerlat_hist_ops; 68extern struct tool_ops osnoise_top_ops, osnoise_hist_ops; 69 70int run_tool(struct tool_ops *ops, int argc, char *argv[]); 71int hist_main_loop(struct osnoise_tool *tool);
~/
Read-only file preview.