~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/tools/tracing/rtla/src/osnoise.h

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 // SPDX-License-Identifier: GPL-2.0
  2 #include "trace.h"
  3 
  4 /*
  5  * osnoise_context - read, store, write, restore osnoise configs.
  6  */
  7 struct osnoise_context {
  8         int                     flags;
  9         int                     ref;
 10 
 11         char                    *curr_cpus;
 12         char                    *orig_cpus;
 13 
 14         /* 0 as init value */
 15         unsigned long long      orig_runtime_us;
 16         unsigned long long      runtime_us;
 17 
 18         /* 0 as init value */
 19         unsigned long long      orig_period_us;
 20         unsigned long long      period_us;
 21 
 22         /* 0 as init value */
 23         long long               orig_timerlat_period_us;
 24         long long               timerlat_period_us;
 25 
 26         /* 0 as init value */
 27         long long               orig_tracing_thresh;
 28         long long               tracing_thresh;
 29 
 30         /* -1 as init value because 0 is disabled */
 31         long long               orig_stop_us;
 32         long long               stop_us;
 33 
 34         /* -1 as init value because 0 is disabled */
 35         long long               orig_stop_total_us;
 36         long long               stop_total_us;
 37 
 38         /* -1 as init value because 0 is disabled */
 39         long long               orig_print_stack;
 40         long long               print_stack;
 41 
 42         /* -1 as init value because 0 is off */
 43         int                     orig_opt_irq_disable;
 44         int                     opt_irq_disable;
 45 
 46         /* -1 as init value because 0 is off */
 47         int                     orig_opt_workload;
 48         int                     opt_workload;
 49 };
 50 
 51 /*
 52  * *_INIT_VALs are also invalid values, they are used to
 53  * communicate errors.
 54  */
 55 #define OSNOISE_OPTION_INIT_VAL (-1)
 56 #define OSNOISE_TIME_INIT_VAL   (0)
 57 
 58 struct osnoise_context *osnoise_context_alloc(void);
 59 int osnoise_get_context(struct osnoise_context *context);
 60 void osnoise_put_context(struct osnoise_context *context);
 61 
 62 int osnoise_set_cpus(struct osnoise_context *context, char *cpus);
 63 void osnoise_restore_cpus(struct osnoise_context *context);
 64 
 65 int osnoise_set_runtime_period(struct osnoise_context *context,
 66                                unsigned long long runtime,
 67                                unsigned long long period);
 68 void osnoise_restore_runtime_period(struct osnoise_context *context);
 69 
 70 int osnoise_set_stop_us(struct osnoise_context *context,
 71                         long long stop_us);
 72 void osnoise_restore_stop_us(struct osnoise_context *context);
 73 
 74 int osnoise_set_stop_total_us(struct osnoise_context *context,
 75                               long long stop_total_us);
 76 void osnoise_restore_stop_total_us(struct osnoise_context *context);
 77 
 78 int osnoise_set_timerlat_period_us(struct osnoise_context *context,
 79                                    long long timerlat_period_us);
 80 void osnoise_restore_timerlat_period_us(struct osnoise_context *context);
 81 
 82 int osnoise_set_tracing_thresh(struct osnoise_context *context,
 83                                long long tracing_thresh);
 84 void osnoise_restore_tracing_thresh(struct osnoise_context *context);
 85 
 86 void osnoise_restore_print_stack(struct osnoise_context *context);
 87 int osnoise_set_print_stack(struct osnoise_context *context,
 88                             long long print_stack);
 89 
 90 int osnoise_set_irq_disable(struct osnoise_context *context, bool onoff);
 91 int osnoise_set_workload(struct osnoise_context *context, bool onoff);
 92 
 93 /*
 94  * osnoise_tool -  osnoise based tool definition.
 95  */
 96 struct osnoise_tool {
 97         struct trace_instance           trace;
 98         struct osnoise_context          *context;
 99         void                            *data;
100         void                            *params;
101         time_t                          start_time;
102 };
103 
104 void osnoise_destroy_tool(struct osnoise_tool *top);
105 struct osnoise_tool *osnoise_init_tool(char *tool_name);
106 struct osnoise_tool *osnoise_init_trace_tool(char *tracer);
107 
108 int osnoise_hist_main(int argc, char *argv[]);
109 int osnoise_top_main(int argc, char **argv);
110 int osnoise_main(int argc, char **argv);
111 int hwnoise_main(int argc, char **argv);
112 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php