1libtracefs(3) 2============= 3 4NAME 5---- 6libtracefs - Linux kernel trace file system library 7 8SYNOPSIS 9-------- 10[verse] 11-- 12*#include <tracefs.h>* 13 14Locations of tracing files and directories: 15 char pass:[*]*tracefs_get_tracing_file*(const char pass:[*]_name_); 16 void *tracefs_put_tracing_file*(char pass:[*]_name_); 17 const char pass:[*]*tracefs_tracing_dir*(void); 18 const char pass:[*]*tracefs_debug_dir*(void); 19 int *tracefs_set_tracing_dir*(char pass:[*]_tracing_dir_) 20 int *tracefs_tracing_dir_is_mounted*(bool _mount_, const char pass:[**]_path_); 21 22Trace instances: 23 struct tracefs_instance pass:[*]*tracefs_instance_create*(const char pass:[*]_name_); 24 int *tracefs_instance_destroy*(struct tracefs_instance pass:[*]_instance_); 25 struct tracefs_instance pass:[*]*tracefs_instance_alloc*(const char pass:[*]_tracing_dir_, const char pass:[*]_name_); 26 void *tracefs_instance_free*(struct tracefs_instance pass:[*]_instance_); 27 char pass:[**]*tracefs_instances*(const char pass:[*]_regex_); 28 void *tracefs_instance_clear*(struct tracefs_instance pass:[*]_instance_); 29 void *tracefs_instance_reset*(struct tracefs_instance pass:[*]_instance_); 30 bool *tracefs_instance_is_new*(struct tracefs_instance pass:[*]_instance_); 31 bool *tracefs_file_exists*(struct tracefs_instance pass:[*]_instance_, char pass:[*]_name_); 32 bool *tracefs_dir_exists*(struct tracefs_instance pass:[*]_instance_, char pass:[*]_name_); 33 char pass:[*]*tracefs_instance_get_file*(struct tracefs_instance pass:[*]_instance_, const char pass:[*]_file_); 34 char pass:[*]*tracefs_instance_get_dir*(struct tracefs_instance pass:[*]_instance_); 35 int *tracefs_instance_file_open*(struct tracefs_instance pass:[*]_instance_, const char pass:[*]_file_, int _mode_); 36 int *tracefs_instance_file_write*(struct tracefs_instance pass:[*]_instance_, const char pass:[*]_file_, const char pass:[*]_str_); 37 int *tracefs_instance_file_write_number*(struct tracefs_instance pass:[*]_instance_, const char pass:[*]_file_, size_t _val_); 38 int *tracefs_instance_file_append*(struct tracefs_instance pass:[*]_instance_, const char pass:[*]_file_, const char pass:[*]_str_); 39 int *tracefs_instance_file_clear*(struct tracefs_instance pass:[*]_instance_, const char pass:[*]_file_); 40 char pass:[*]*tracefs_instance_file_read*(struct tracefs_instance pass:[*]_instance_, const char pass:[*]_file_, int pass:[*]_psize_); 41 int *tracefs_instance_file_read_number*(struct tracefs_instance pass:[*]_instance_, const char pass:[*]_file_, long long int pass:[*]_res_); 42 const char pass:[*]*tracefs_instance_get_name*(struct tracefs_instance pass:[*]_instance_); 43 const char pass:[*]*tracefs_instance_get_trace_dir*(struct tracefs_instance pass:[*]_instance_); 44 int *tracefs_instances_walk*(int (pass:[*]_callback_)(const char pass:[*], void pass:[*]), void pass:[*]_context)_; 45 bool *tracefs_instance_exists*(const char pass:[*]_name_); 46 int *tracefs_instance_set_affinity*(struct tracefs_instance pass:[*]_instance_, const char pass:[*]_cpu_str_); 47 int *tracefs_instance_set_affinity_set*(struct tracefs_instance pass:[*]_instance_, cpu_set_t pass:[*]_set_, size_t _set_size_); 48 int *tracefs_instance_set_affinity_raw*(struct tracefs_instance pass:[*]_instance_, const char pass:[*]_mask_); 49 char pass:[*]*tracefs_instance_get_affinity*(struct tracefs_instance pass:[*]_instance_); 50 int *tracefs_instance_get_affinity_set*(struct tracefs_instance pass:[*]_instance_, cpu_set_t pass:[*]_set_, size_t _set_size_); 51 char pass:[*]*tracefs_instance_get_affinity_raw*(struct tracefs_instance pass:[*]_instance_); 52 size_t *tracefs_instance_get_buffer_size*(struct tracefs_instance pass:[*]_instance_, int _cpu_); 53 int *tracefs_instance_set_buffer_size*(struct tracefs_instance pass:[*]_instance_, size_t _size_, int _cpu_); 54 int *tracefs_instance_get_buffer_percent*(struct tracefs_instance pass:[*]_instance_); 55 int *tracefs_instance_set_buffer_percent*(struct tracefs_instance pass:[*]_instance_, int _val_); 56 57Trace events: 58 char pass:[*]pass:[*]*tracefs_event_systems*(const char pass:[*]_tracing_dir_); 59 char pass:[*]pass:[*]*tracefs_system_events*(const char pass:[*]_tracing_dir_, const char pass:[*]_system_); 60 int *tracefs_event_enable*(struct tracefs_instance pass:[*]_instance_, const char pass:[*]_system_, 61 const char pass:[*]_event_); 62 int *tracefs_event_disable*(struct tracefs_instance pass:[*]_instance_, const char pass:[*]_system_, 63 const char pass:[*]_event_); 64 enum tracefs_enable_state *tracefs_event_is_enabled*(struct tracefs_instance pass:[*]_instance_, 65 const char pass:[*]_system_, const char pass:[*]_event_); 66 int *tracefs_iterate_raw_events*(struct tep_handle pass:[*]_tep_, struct tracefs_instance pass:[*]_instance_, cpu_set_t pass:[*]_cpus_, int _cpu_size_, int (pass:[*]_callback_)(struct tep_event pass:[*], struct tep_record pass:[*], int, void pass:[*]), void pass:[*]_callback_context_); 67 void *tracefs_iterate_stop*(struct tracefs_instance pass:[*]_instance_); 68 int *tracefs_follow_event*(struct tep_handle pass:[*]_tep_, struct tracefs_instance pass:[*]_instance_, 69 const char pass:[*]_system_, const char pass:[*]_event_name_, 70 int (pass:[*]_callback_)(struct tep_event pass:[*], 71 struct tep_record pass:[*], 72 int, void pass:[*]), 73 void pass:[*]_callback_data_); 74 int *tracefs_follow_missed_events*(struct tracefs_instance pass:[*]_instance_, 75 int (pass:[*]_callback_)(struct tep_event pass:[*], 76 struct tep_record pass:[*], 77 int, void pass:[*]), 78 void pass:[*]_callback_data_); 79 int *tracefs_follow_event_clear*(struct tracefs_instance pass:[*]_instance_, 80 const char pass:[*]_system_, const char pass:[*]_event_name_); 81 int *tracefs_follow_missed_events_clear*(struct tracefs_instance pass:[*]_instance_); 82 struct tep_handle pass:[*]*tracefs_local_events*(const char pass:[*]_tracing_dir_); 83 struct tep_handle pass:[*]*tracefs_local_events_system*(const char pass:[*]_tracing_dir_, const char pass:[*] const pass:[*]_sys_names_); 84 int *tracefs_fill_local_events*(const char pass:[*]_tracing_dir_, struct tep_handle pass:[*]_tep_, int pass:[*]_parsing_failures_); 85 int *tracefs_load_cmdlines*(const char pass:[*]_tracing_dir_, struct tep_handle pass:[*]_tep_); 86 int *tracefs_load_headers*(const char pass:[*]_tracing_dir_, struct tep_handle pass:[*]_tep_); 87 char pass:[*]*tracefs_event_get_file*(struct tracefs_instance pass:[*]_instance_, const char pass:[*]_system_, const char pass:[*]_event_, 88 const char pass:[*]_file_); 89 char pass:[*]*tracefs_event_file_read*(struct tracefs_instance pass:[*]_instance_, const char pass:[*]_system_, const char pass:[*]_event_, 90 const char pass:[*]_file_, int pass:[*]_psize_); 91 int *tracefs_event_file_write*(struct tracefs_instance pass:[*]_instance_, const char pass:[*]_system_, const char pass:[*]_event_, 92 const char pass:[*]_file_, const char pass:[*]_str_); 93 int *tracefs_event_file_append*(struct tracefs_instance pass:[*]_instance_, const char pass:[*]_system_, const char pass:[*]_event_, 94 const char pass:[*]_file_, const char pass:[*]_str_); 95 int *tracefs_event_file_clear*(struct tracefs_instance pass:[*]_instance_, const char pass:[*]_system_, const char pass:[*]_event_, 96 const char pass:[*]_file_); 97 bool *tracefs_event_file_exists*(struct tracefs_instance pass:[*]_instance_, const char pass:[*]_system_, const char pass:[*]_event_, 98 const char pass:[*]_file_); 99 100Snapshot buffer: 101 int *tracefs_snapshot_snap*(struct tracefs_instance pass:[*]instance); 102 int *tracefs_snapshot_clear*(struct tracefs_instance pass:[*]instance); 103 int *tracefs_snapshot_free*(struct tracefs_instance pass:[*]instance); 104 int *tracefs_iterate_snapshot_events*(struct tep_handle pass:[*]_tep_, struct tracefs_instance pass:[*]_instance_, 105 cpu_set_t pass:[*]_cpus_, int _cpu_size_, 106 int (pass:[*]_callback_)(struct tep_event pass:[*], struct tep_record pass:[*], int, void pass:[*]), 107 void pass:[*]_callback_context_); 108 struct tracefs_cpu pass:[*]*tracefs_cpu_snapshot_open*(struct tracefs_instance pass:[*]_instance_, 109 int _cpu_, bool _nonblock_); 110 111Event filters: 112 int *tracefs_filter_string_append*(struct tep_event pass:[*]_event_, char pass:[**]_filter_, 113 struct tracefs_filter _type_, const char pass:[*]_field_, 114 enum tracefs_synth_compare _compare_, const char pass:[*]_val_); 115 int *tracefs_filter_string_verify*(struct tep_event pass:[*]_event_, const char pass:[*]_filter_, char pass:[**]_err_); 116 int *tracefs_event_filter_apply*(struct tracefs_instance pass:[*]_instance_, struct tep_event pass:[*]_event_, const char pass:[*]_filter_); 117 int *tracefs_event_filter_clear*(struct tracefs_instance pass:[*]_instance_, struct tep_event pass:[*]_event_); 118 119Function filters: 120 int *tracefs_function_filter*(struct tracefs_instance pass:[*]_instance_, const char pass:[*]_filter_, const char pass:[*]_module_, int _flags_); 121 int *tracefs_function_notrace*(struct tracefs_instance pass:[*]_instance_, const char pass:[*]_filter_, const char pass:[*]_module_, int _flags_); 122 int *tracefs_filter_functions*(const char pass:[*]_filter_, const char pass:[*]_module_, char pass:[*]pass:[*]pass:[*]_list_); 123 124PID filters: 125 int *tracefs_filter_pid_function*(struct tracefs_instance pass:[*]_instance,_ int _pid_, 126 bool _reset_, bool _notrace_); 127 int *tracefs_filter_pid_function_clear*(struct tracefs_instance pass:[*]_instance_, bool _notrace_); 128 int *tracefs_filter_pid_events*(struct tracefs_instance pass:[*]_instance_, int _pid_, 129 bool _reset_, bool _notrace_); 130 int *tracefs_filter_pid_events_clear*(struct tracefs_instance pass:[*]_instance_, bool _notrace_); 131 132Trace helper functions: 133 void *tracefs_list_free*(char pass:[*]pass:[*]_list_); 134 char pass:[**]*tracefs_list_add*(char **_list_, const char *_string_); 135 int *tracefs_list_size*(char pass:[**]_list_); 136 char pass:[*]*tracefs_get_clock*(struct tracefs_instance pass:[*]_instance_); 137 int *tracefs_trace_is_on*(struct tracefs_instance pass:[*]_instance_); 138 int *tracefs_trace_on*(struct tracefs_instance pass:[*]_instance_); 139 int *tracefs_trace_off*(struct tracefs_instance pass:[*]_instance_); 140 int *tracefs_trace_on_get_fd*(struct tracefs_instance pass:[*]_instance_); 141 int *tracefs_trace_on_fd*(int _fd_); 142 int *tracefs_trace_off_fd*(int _fd_); 143 144Trace stream: 145 ssize_t *tracefs_trace_pipe_stream*(int _fd_, struct tracefs_instance pass:[*]_instance_, int _flags_); 146 ssize_t *tracefs_trace_pipe_print*(struct tracefs_instance pass:[*]_instance_, int _flags_); 147 void *tracefs_trace_pipe_stop*(struct tracefs_instance pass:[*]_instance_); 148 149Memory mapping the ring buffer: 150 bool *tracefs_cpu_is_mapped*(struct tracefs_cpu pass:[*]tcpu); 151 bool *tracefs_mapped_is_supported*(void); 152 int *tracefs_cpu_map*(struct tracefs_cpu pass:[*]tcpu); 153 void *tracefs_cpu_unmap*(struct tracefs_cpu pass:[*]tcpu); 154 struct tracefs_cpu pass:[*]*tracefs_cpu_open_mapped*(struct tracefs_instance pass:[*]instance, 155 int cpu, bool nonblock); 156 157Trace options: 158 const struct tracefs_options_mask pass:[*]*tracefs_options_get_supported*(struct tracefs_instance pass:[*]_instance_); 159 bool *tracefs_option_is_supported*(struct tracefs_instance pass:[*]_instance_, enum tracefs_option_id _id_); 160 const struct tracefs_options_mask pass:[*]*tracefs_options_get_enabled*(struct tracefs_instance pass:[*]_instance_); 161 bool *tracefs_option_is_enabled*(struct tracefs_instance pass:[*]_instance_, enum tracefs_option_id _id_); 162 bool *tracefs_option_mask_is_set*(const struct tracefs_options_mask *options, enum tracefs_option_id id); 163 int *tracefs_option_enable*(struct tracefs_instance pass:[*]_instance_, enum tracefs_option_id _id_); 164 int *tracefs_option_disable*(struct tracefs_instance pass:[*]_instance_, enum tracefs_option_id _id_); 165 const char pass:[*]*tracefs_option_name*(enum tracefs_option_id _id_); 166 enum tracefs_option_id *tracefs_option_id*(const char pass:[*]_name_); 167 168Ftrace tracers: 169 char pass:[*]pass:[*]*tracefs_tracers*(const char pass:[*]_tracing_dir_); 170 char pass:[**] *tracefs_instance_tracers*(struct tracefs_instance pass:[*]_instance_); 171 bool *tracefs_tracer_available*(const char pass:[*]_tracing_dir_, const char pass:[*]_tracer_); 172 int *tracefs_tracer_set*(struct tracefs_instance pass:[*]_instance_, enum tracefs_tracers _tracer_); 173 int *tracefs_tracer_set*(struct tracefs_instance pass:[*]_instance_, enum tracefs_tracers _tracer_, const char pass:[*]_name_); 174 int *tracefs_tracer_clear*(struct tracefs_instance pass:[*]_instance_); 175 176Writing data in the trace buffer: 177 int *tracefs_print_init*(struct tracefs_instance pass:[*]_instance_); 178 int *tracefs_printf*(struct tracefs_instance pass:[*]_instance_, const char pass:[*]_fmt_, _..._); 179 int *tracefs_vprintf*(struct tracefs_instance pass:[*]_instance_, const char pass:[*]_fmt_, va_list _ap_); 180 void *tracefs_print_close*(struct tracefs_instance pass:[*]_instance_); 181 int *tracefs_binary_init*(struct tracefs_instance pass:[*]_instance_); 182 int *tracefs_binary_write*(struct tracefs_instance pass:[*]_instance_, void pass:[*]_data_, int _len_); 183 void *tracefs_binary_close*(struct tracefs_instance pass:[*]_instance_); 184 185Control library logs: 186 int *tracefs_set_loglevel*(enum tep_loglevel _level_); 187 188Read the ring buffer statistics: 189 struct tracefs_buffer_stat pass:[*]*tracefs_instance_get_stat*(struct tracefs_instance pass:[*]_instance_, int _cpu_); 190 void *tracefs_instance_put_stat*(struct tracefs_buffer_stat pass:[*]_tstat_); 191 ssize_t *tracefs_buffer_stat_entries*(struct tracefs_buffer_stat pass:[*]_tstat_); 192 ssize_t *tracefs_buffer_stat_overrun*(struct tracefs_buffer_stat pass:[*]_tstat_); 193 ssize_t *tracefs_buffer_stat_commit_overrun*(struct tracefs_buffer_stat pass:[*]_tstat_); 194 ssize_t *tracefs_buffer_stat_bytes*(struct tracefs_buffer_stat pass:[*]_tstat_); 195 long long *tracefs_buffer_stat_event_timestamp*(struct tracefs_buffer_stat pass:[*]_tstat_); 196 long long *tracefs_buffer_stat_timestamp*(struct tracefs_buffer_stat pass:[*]_tstat_); 197 ssize_t *tracefs_buffer_stat_dropped_events*(struct tracefs_buffer_stat pass:[*]_tstat_); 198 ssize_t *tracefs_buffer_stat_read_events*(struct tracefs_buffer_stat pass:[*]_tstat_); 199 200Dynamic event generic APIs: 201 struct *tracefs_dynevent*; 202 enum *tracefs_dynevent_type*; 203 int *tracefs_dynevent_create*(struct tracefs_dynevent pass:[*]_devent_); 204 int *tracefs_dynevent_destroy*(struct tracefs_dynevent pass:[*]_devent_, bool _force_); 205 int *tracefs_dynevent_destroy_all*(unsigned int _types_, bool _force_); 206 void *tracefs_dynevent_free*(struct tracefs_dynevent pass:[*]_devent_); 207 void *tracefs_dynevent_list_free*(struct tracefs_dynevent pass:[*]pass:[*]_events_); 208 struct tracefs_dynevent pass:[*]*tracefs_dynevent_get*(enum tracefs_dynevent_type _type_, const char pass:[*]_system_, const char pass:[*]_event_); 209 struct tracefs_dynevent pass:[*]pass:[*]*tracefs_dynevent_get_all*(unsigned int _types_, const char pass:[*]_system_); 210 enum tracefs_dynevent_type *tracefs_dynevent_info*(struct tracefs_dynevent pass:[*]_dynevent_, char pass:[*]pass:[*]_system_, char pass:[*]pass:[*]_event_, char pass:[*]pass:[*]_prefix_, char pass:[*]pass:[*]_addr_, char pass:[*]pass:[*]_format_); 211 struct tep_event pass:[*]*tracefs_dynevent_get_event*(struct tep_handle pass:[*]_tep_, struct tracefs_dynevent pass:[*]_dynevent_); 212 213Even probes (eprobes): 214 struct tracefs_dynevent pass:[*] *tracefs_eprobe_alloc*(const char pass:[*]_system_, const char pass:[*]_event_, const char pass:[*]_target_system_, const char pass:[*]_target_event_, const char pass:[*]_fetchargs_); 215 216Uprobes, Kprobes and Kretprobes: 217 struct tracefs_dynevent pass:[*] *tracefs_kprobe_alloc*(const char pass:[*]_system_, const char pass:[*]_event_, const char pass:[*]_addr_, const char pass:[*]_format_); 218 struct tracefs_dynevent pass:[*] *tracefs_kretprobe_alloc*(const char pass:[*]_system_, const char pass:[*]_event_, const char pass:[*]_addr_, const char pass:[*]_format_, unsigned int _max_); 219 int *tracefs_kprobe_raw*(const char pass:[*]_system_, const char pass:[*]_event_, const char pass:[*]_addr_, const char pass:[*]_format_); 220 int *tracefs_kretprobe_raw*(const char pass:[*]_system_, const char pass:[*]_event_, const char pass:[*]_addr_, const char pass:[*]_format_); 221 *tracefs_uprobe_alloc*(const char pass:[*]_system_, const char pass:[*]_event_, 222 const char pass:[*]_file_, unsigned long long _offset_, const char pass:[*]_fetchargs_) 223 *tracefs_uretprobe_alloc*(const char pass:[*]_system_, const char pass:[*]_event_, 224 const char pass:[*]_file_, unsigned long long _offset_, const char pass:[*]_fetchargs_); 225 int *tracefs_kprobe_destroy*(const char pass:[*]_system_, const char pass:[*]_event_, 226 const char pass:[*]_addr_, const char pass:[*]_format_, bool _force_); 227 228Synthetic events: 229 struct tracefs_synth pass:[*]*tracefs_sql*(struct tep_handle pass:[*]_tep_, const char pass:[*]_name_, 230 const char pass:[*]_sql_buffer_, char pass:[**]_err_); 231 struct tracefs_synth pass:[*]*tracefs_synth_alloc*(struct tep_handle pass:[*]_tep_, 232 const char pass:[*]_name_, 233 const char pass:[*]_start_system_, 234 const char pass:[*]_start_event_, 235 const char pass:[*]_end_system_, 236 const char pass:[*]_end_event_, 237 const char pass:[*]_start_match_field_, 238 const char pass:[*]_end_match_field_, 239 const char pass:[*]_match_name_); 240 int *tracefs_synth_add_match_field*(struct tracefs_synth pass:[*]_synth_, 241 const char pass:[*]_start_match_field_, 242 const char pass:[*]_end_match_field_, 243 const char pass:[*]_name_); 244 int *tracefs_synth_add_compare_field*(struct tracefs_synth pass:[*]_synth_, 245 const char pass:[*]_start_compare_field_, 246 const char pass:[*]_end_compare_field_, 247 enum tracefs_synth_calc _calc_, 248 const char pass:[*]_name_); 249 int *tracefs_synth_add_start_field*(struct tracefs_synth pass:[*]_synth_, 250 const char pass:[*]_start_field_, 251 const char pass:[*]_name_); 252 int *tracefs_synth_add_end_field*(struct tracefs_synth pass:[*]_synth_, 253 const char pass:[*]_end_field_, 254 const char pass:[*]_name_); 255 int *tracefs_synth_append_start_filter*(struct tracefs_synth pass:[*]_synth_, 256 struct tracefs_filter _type_, 257 const char pass:[*]_field_, 258 enum tracefs_synth_compare _compare_, 259 const char pass:[*]_val_); 260 int *tracefs_synth_append_end_filter*(struct tracefs_synth pass:[*]_synth_, 261 struct tracefs_filter _type_, 262 const char pass:[*]_field_, 263 enum tracefs_synth_compare _compare_, 264 const char pass:[*]_val_); 265 void *tracefs_synth_free*(struct tracefs_synth pass:[*]_synth_); 266 int *tracefs_synth_create*(struct tracefs_synth pass:[*]_synth_); 267 int *tracefs_synth_destroy*(struct tracefs_synth pass:[*]_synth_); 268 int *tracefs_synth_set_instance*(struct tracefs_synth pass:[*]_synth_, struct tracefs_instance pass:[*]_instance_); 269 int *tracefs_synth_echo_cmd*(struct trace_seq pass:[*]_seq_, struct tracefs_synth pass:[*]_synth_); 270 bool *tracefs_synth_complete*(struct tracefs_synth pass:[*]_synth_); 271 struct tracefs_hist pass:[*]*tracefs_synth_get_start_hist*(struct tracefs_synth pass:[*]_synth_); 272 int *tracefs_synth_trace*(struct tracefs_synth pass:[*]_synth_, 273 enum tracefs_synth_handler _type_, const char pass:[*]_var_); 274 int *tracefs_synth_snapshot*(struct tracefs_synth pass:[*]_synth_, 275 enum tracefs_synth_handler _type_, const char pass:[*]_var_); 276 int *tracefs_synth_save*(struct tracefs_synth pass:[*]_synth_, 277 enum tracefs_synth_handler _type_, const char pass:[*]_var_, 278 char pass:[**]_save_fields_); 279 const char pass:[*]*tracefs_synth_get_name*(struct tracefs_synth pass:[*]_synth_); 280 int *tracefs_synth_raw_fmt*(struct trace_seq pass:[*]_seq_, struct tracefs_synth pass:[*]_synth_); 281 const char pass:[*]*tracefs_synth_show_event*(struct tracefs_synth pass:[*]_synth_); 282 const char pass:[*]*tracefs_synth_show_start_hist*(struct tracefs_synth pass:[*]_synth_); 283 const char pass:[*]*tracefs_synth_show_end_hist*(struct tracefs_synth pass:[*]_synth_); 284 struct tep_event pass:[*]*tracefs_synth_get_event*(struct tep_handle pass:[*]_tep_, struct tracefs_synth pass:[*]_synth_); 285 286Ftrace errors reporting: 287 char pass:[*]*tracefs_error_last*(struct tracefs_instance pass:[*]_instance_); 288 char pass:[*]*tracefs_error_all*(struct tracefs_instance pass:[*]_instance_); 289 int *tracefs_error_clear*(struct tracefs_instance pass:[*]_instance_); 290 291Histograms: 292 struct tracefs_hist pass:[*]*tracefs_hist_alloc*(struct tracefs_tep pass:[*] _tep_, 293 const char pass:[*]_system_, const char pass:[*]_event_, 294 const char pass:[*]_key_, enum tracefs_hist_key_type _type_); 295 struct tracefs_hist pass:[*]*tracefs_hist_alloc_2d*(struct tracefs_tep pass:[*] _tep_, 296 const char pass:[*]_system_, const char pass:[*]_event_, 297 const char pass:[*]_key1_, enum tracefs_hist_key_type _type1_, 298 const char pass:[*]_key2_, enum tracefs_hist_key_type _type2_)); 299 struct tracefs_hist pass:[*]*tracefs_hist_alloc_nd*(struct tracefs_tep pass:[*] _tep_, 300 const char pass:[*]_system_, const char pass:[*]_event_, 301 struct tracefs_hist_axis pass:[*]_axes_); 302 struct tracefs_hist pass:[*]*tracefs_hist_alloc_nd_cnt*(struct tep_handle pass:[*]_tep_, 303 const char pass:[*]_system_, const char pass:[*]_event_name_, 304 struct tracefs_hist_axis_cnt pass:[*]_axes_); 305 void *tracefs_hist_free*(struct tracefs_hist pass:[*]_hist_); 306 int *tracefs_hist_add_key*(struct tracefs_hist pass:[*]_hist_, const char pass:[*]_key_, 307 enum tracefs_hist_key_type _type_); 308 int *tracefs_hist_add_key_cnt*(struct tracefs_hist pass:[*]_hist_, const char pass:[*]_key_, 309 enum tracefs_hist_key_type _type_, int _cnt_); 310 int *tracefs_hist_add_value*(struct tracefs_hist pass:[*]_hist_, const char pass:[*]_value_); 311 int *tracefs_hist_add_sort_key*(struct tracefs_hist pass:[*]_hist_, 312 const char pass:[*]_sort_key_); 313 int *tracefs_hist_set_sort_key*(struct tracefs_hist pass:[*]_hist_, 314 const char pass:[*]_sort_key_, _..._); 315 int *tracefs_hist_sort_key_direction*(struct tracefs_hist pass:[*]_hist_, 316 const char pass:[*]_sort_key_, 317 enum tracefs_hist_sort_direction _dir_); 318 int *tracefs_hist_add_name*(struct tracefs_hist pass:[*]_hist_, const char pass:[*]_name_); 319 int *tracefs_hist_append_filter*(struct tracefs_hist pass:[*]_hist_, 320 enum tracefs_filter _type_, 321 const char pass:[*]_field_, 322 enum tracefs_compare _compare_, 323 const char pass:[*]_val_); 324 int *tracefs_hist_echo_cmd*(struct trace_seq pass:[*]_s_, struct tracefs_instance pass:[*]_instance_, 325 struct tracefs_hist pass:[*]_hist_, 326 enum tracefs_hist_command _command_); 327 int *tracefs_hist_command*(struct tracefs_instance pass:[*]_instance_, 328 struct tracefs_hist pass:[*]_hist_, 329 enum tracefs_hist_command _command_); 330 const char pass:[*]*tracefs_hist_get_name*(struct tracefs_hist pass:[*]_hist_); 331 const char pass:[*]*tracefs_hist_get_event*(struct tracefs_hist pass:[*]_hist_); 332 const char pass:[*]*tracefs_hist_get_system*(struct tracefs_hist pass:[*]_hist_); 333 int *tracefs_hist_start*(struct tracefs_instance pass:[*]_instance_, struct tracefs_hist pass:[*]_hist_); 334 int *tracefs_hist_destroy*(struct tracefs_instance pass:[*]_instance_, struct tracefs_hist pass:[*]_hist_); 335 int *tracefs_hist_pause*(struct tracefs_instance pass:[*]_instance_, struct tracefs_hist pass:[*]_hist_); 336 int *tracefs_hist_continue*(struct tracefs_instance pass:[*]_instance_, struct tracefs_hist pass:[*]_hist_); 337 int *tracefs_hist_reset*(struct tracefs_instance pass:[*]_instance_, struct tracefs_hist pass:[*]_hist_); 338 339Recording of trace_pipe_raw files: 340 struct tracefs_cpu pass:[*]*tracefs_cpu_open*(struct tracefs_instance pass:[*]_instance_, 341 int _cpu_, bool _nonblock_); 342 struct tracefs_cpu pass:[*]*tracefs_cpu_alloc_fd*(int _fd_, int _subbuf_size_, bool _nonblock_); 343 void *tracefs_cpu_close*(struct tracefs_cpu pass:[*]_tcpu_); 344 void *tracefs_cpu_free_fd*(struct tracefs_cpu pass:[*]_tcpu_); 345 int *tracefs_cpu_read_size*(struct tracefs_cpu pass:[*]_tcpu_); 346 int *tracefs_cpu_read*(struct tracefs_cpu pass:[*]_tcpu_, void pass:[*]_buffer_, bool _nonblock_); 347 int *tracefs_cpu_buffered_read*(struct tracefs_cpu pass:[*]_tcpu_, void pass:[*]_buffer_, bool _nonblock_); 348 int *tracefs_cpu_write*(struct tracefs_cpu pass:[*]_tcpu_, int _wfd_, bool _nonblock_); 349 int *tracefs_cpu_stop*(struct tracefs_cpu pass:[*]_tcpu_); 350 int *tracefs_cpu_flush*(struct tracefs_cpu pass:[*]_tcpu_, void pass:[*]_buffer_); 351 int *tracefs_cpu_flush_write*(struct tracefs_cpu pass:[*]_tcpu_, int _wfd_); 352 int *tracefs_cpu_pipe*(struct tracefs_cpu pass:[*]_tcpu_, int _wfd_, bool _nonblock_); 353 struct kbuffer pass:[*]*tracefs_cpu_read_buf*(struct tracefs_cpu pass:[*]_tcpu_, bool _nonblock_); 354 struct kbuffer pass:[*]*tracefs_cpu_buffered_read_buf*(struct tracefs_cpu pass:[*]_tcpu_, bool _nonblock_); 355 struct kbuffer pass:[*]*tracefs_cpu_flush_buf*(struct tracefs_cpu pass:[*]_tcpu_); 356 357Helper functions for modifying the ring buffer sub-buffers: 358 size_t *tracefs_instance_get_subbuf_size*(struct tracefs_instance pass:[*]_instance_); 359 int *tracefs_instance_set_subbuf_size*(struct tracefs_instance pass:[*]_instance_, size_t _size_); 360 361Helper functions for guest tracing: 362 char pass:[*]*tracefs_find_cid_pid*(int _cid_); 363 char pass:[*]*tracefs_instance_find_cid_pid*(struct tracefs_instance pass:[*]_instance_, int _cid_); 364 int *tracefs_time_conversion*(int _cpu_, int pass:[*]_shift_, int pass:[*]_multi_, long long pass:[*]offset); 365-- 366 367DESCRIPTION 368----------- 369The libtracefs(3) library provides APIs to access kernel trace file system. 370 371FILES 372----- 373[verse] 374-- 375*tracefs.h* 376 Header file to include in order to have access to the library APIs. 377*-ltracefs* 378 Linker switch to add when building a program that uses the library. 379-- 380 381SEE ALSO 382-------- 383*libtraceevent*(3), 384*trace-cmd*(1) 385 386AUTHOR 387------ 388[verse] 389-- 390*Steven Rostedt* <rostedt@goodmis.org> 391*Tzvetomir Stoyanov* <tz.stoyanov@gmail.com> 392-- 393REPORTING BUGS 394-------------- 395Report bugs to <linux-trace-devel@vger.kernel.org> 396 397LICENSE 398------- 399libtracefs is Free Software licensed under the GNU LGPL 2.1 400 401RESOURCES 402--------- 403https://git.kernel.org/pub/scm/libs/libtrace/libtracefs.git/ 404 405COPYING 406------- 407Copyright \(C) 2020 VMware, Inc. Free use of this software is granted under 408the terms of the GNU Public License (GPL). 409