git/trace2/tr2_tgt.h

#ifndef TR2_TGT_H
#define TR2_TGT_H

struct child_process;
struct repository;
struct json_writer;
struct tr2_timer_metadata;
struct tr2_timer;
struct tr2_counter_metadata;
struct tr2_counter;

#define NS_TO_SEC(ns)

/*
 * Function prototypes for a TRACE2 "target" vtable.
 */

tr2_tgt_init_t;
tr2_tgt_term_t;

tr2_tgt_evt_version_fl_t;

tr2_tgt_evt_start_fl_t;
tr2_tgt_evt_exit_fl_t;
tr2_tgt_evt_signal_t;
tr2_tgt_evt_atexit_t;

tr2_tgt_evt_error_va_fl_t;

tr2_tgt_evt_command_path_fl_t;
tr2_tgt_evt_command_ancestry_fl_t;
tr2_tgt_evt_command_name_fl_t;
tr2_tgt_evt_command_mode_fl_t;

tr2_tgt_evt_alias_fl_t;

tr2_tgt_evt_child_start_fl_t;
tr2_tgt_evt_child_exit_fl_t;
tr2_tgt_evt_child_ready_fl_t;

tr2_tgt_evt_thread_start_fl_t;
tr2_tgt_evt_thread_exit_fl_t;

tr2_tgt_evt_exec_fl_t;
tr2_tgt_evt_exec_result_fl_t;

struct key_value_info;
tr2_tgt_evt_param_fl_t;

tr2_tgt_evt_repo_fl_t;

tr2_tgt_evt_region_enter_printf_va_fl_t;
tr2_tgt_evt_region_leave_printf_va_fl_t;

tr2_tgt_evt_data_fl_t;
tr2_tgt_evt_data_json_fl_t;

tr2_tgt_evt_printf_va_fl_t;

tr2_tgt_evt_timer_t;

tr2_tgt_evt_counter_t;

/*
 * "vtable" for a TRACE2 target.  Use NULL if a target does not want
 * to emit that message.
 */
/* clang-format off */
struct tr2_tgt {};
/* clang-format on */

extern struct tr2_tgt tr2_tgt_event;
extern struct tr2_tgt tr2_tgt_normal;
extern struct tr2_tgt tr2_tgt_perf;

#endif /* TR2_TGT_H */