diff options
Diffstat (limited to 'trace2')
-rw-r--r-- | trace2/tr2_tgt_event.c | 64 | ||||
-rw-r--r-- | trace2/tr2_tgt_normal.c | 64 | ||||
-rw-r--r-- | trace2/tr2_tgt_perf.c | 64 |
3 files changed, 99 insertions, 93 deletions
diff --git a/trace2/tr2_tgt_event.c b/trace2/tr2_tgt_event.c index bd17ecdc32..c5c8cfbbaa 100644 --- a/trace2/tr2_tgt_event.c +++ b/trace2/tr2_tgt_event.c @@ -10,7 +10,9 @@ #include "trace2/tr2_tgt.h" #include "trace2/tr2_tls.h" -static struct tr2_dst tr2dst_event = { TR2_SYSENV_EVENT, 0, 0, 0, 0 }; +static struct tr2_dst tr2dst_event = { + .sysenv_var = TR2_SYSENV_EVENT, +}; /* * The version number of the JSON data generated by the EVENT target in this @@ -613,34 +615,34 @@ static void fn_data_json_fl(const char *file, int line, } struct tr2_tgt tr2_tgt_event = { - &tr2dst_event, - - fn_init, - fn_term, - - fn_version_fl, - fn_start_fl, - fn_exit_fl, - fn_signal, - fn_atexit, - fn_error_va_fl, - fn_command_path_fl, - fn_command_ancestry_fl, - fn_command_name_fl, - fn_command_mode_fl, - fn_alias_fl, - fn_child_start_fl, - fn_child_exit_fl, - fn_child_ready_fl, - fn_thread_start_fl, - fn_thread_exit_fl, - fn_exec_fl, - fn_exec_result_fl, - fn_param_fl, - fn_repo_fl, - fn_region_enter_printf_va_fl, - fn_region_leave_printf_va_fl, - fn_data_fl, - fn_data_json_fl, - NULL, /* printf */ + .pdst = &tr2dst_event, + + .pfn_init = fn_init, + .pfn_term = fn_term, + + .pfn_version_fl = fn_version_fl, + .pfn_start_fl = fn_start_fl, + .pfn_exit_fl = fn_exit_fl, + .pfn_signal = fn_signal, + .pfn_atexit = fn_atexit, + .pfn_error_va_fl = fn_error_va_fl, + .pfn_command_path_fl = fn_command_path_fl, + .pfn_command_ancestry_fl = fn_command_ancestry_fl, + .pfn_command_name_fl = fn_command_name_fl, + .pfn_command_mode_fl = fn_command_mode_fl, + .pfn_alias_fl = fn_alias_fl, + .pfn_child_start_fl = fn_child_start_fl, + .pfn_child_exit_fl = fn_child_exit_fl, + .pfn_child_ready_fl = fn_child_ready_fl, + .pfn_thread_start_fl = fn_thread_start_fl, + .pfn_thread_exit_fl = fn_thread_exit_fl, + .pfn_exec_fl = fn_exec_fl, + .pfn_exec_result_fl = fn_exec_result_fl, + .pfn_param_fl = fn_param_fl, + .pfn_repo_fl = fn_repo_fl, + .pfn_region_enter_printf_va_fl = fn_region_enter_printf_va_fl, + .pfn_region_leave_printf_va_fl = fn_region_leave_printf_va_fl, + .pfn_data_fl = fn_data_fl, + .pfn_data_json_fl = fn_data_json_fl, + .pfn_printf_va_fl = NULL, }; diff --git a/trace2/tr2_tgt_normal.c b/trace2/tr2_tgt_normal.c index 6e429a3fb9..c42fbade7f 100644 --- a/trace2/tr2_tgt_normal.c +++ b/trace2/tr2_tgt_normal.c @@ -9,7 +9,9 @@ #include "trace2/tr2_tgt.h" #include "trace2/tr2_tls.h" -static struct tr2_dst tr2dst_normal = { TR2_SYSENV_NORMAL, 0, 0, 0, 0 }; +static struct tr2_dst tr2dst_normal = { + .sysenv_var = TR2_SYSENV_NORMAL, +}; /* * Use the TR2_SYSENV_NORMAL_BRIEF setting to omit the "<time> <file>:<line>" @@ -325,34 +327,34 @@ static void fn_printf_va_fl(const char *file, int line, } struct tr2_tgt tr2_tgt_normal = { - &tr2dst_normal, - - fn_init, - fn_term, - - fn_version_fl, - fn_start_fl, - fn_exit_fl, - fn_signal, - fn_atexit, - fn_error_va_fl, - fn_command_path_fl, - fn_command_ancestry_fl, - fn_command_name_fl, - fn_command_mode_fl, - fn_alias_fl, - fn_child_start_fl, - fn_child_exit_fl, - fn_child_ready_fl, - NULL, /* thread_start */ - NULL, /* thread_exit */ - fn_exec_fl, - fn_exec_result_fl, - fn_param_fl, - fn_repo_fl, - NULL, /* region_enter */ - NULL, /* region_leave */ - NULL, /* data */ - NULL, /* data_json */ - fn_printf_va_fl, + .pdst = &tr2dst_normal, + + .pfn_init = fn_init, + .pfn_term = fn_term, + + .pfn_version_fl = fn_version_fl, + .pfn_start_fl = fn_start_fl, + .pfn_exit_fl = fn_exit_fl, + .pfn_signal = fn_signal, + .pfn_atexit = fn_atexit, + .pfn_error_va_fl = fn_error_va_fl, + .pfn_command_path_fl = fn_command_path_fl, + .pfn_command_ancestry_fl = fn_command_ancestry_fl, + .pfn_command_name_fl = fn_command_name_fl, + .pfn_command_mode_fl = fn_command_mode_fl, + .pfn_alias_fl = fn_alias_fl, + .pfn_child_start_fl = fn_child_start_fl, + .pfn_child_exit_fl = fn_child_exit_fl, + .pfn_child_ready_fl = fn_child_ready_fl, + .pfn_thread_start_fl = NULL, + .pfn_thread_exit_fl = NULL, + .pfn_exec_fl = fn_exec_fl, + .pfn_exec_result_fl = fn_exec_result_fl, + .pfn_param_fl = fn_param_fl, + .pfn_repo_fl = fn_repo_fl, + .pfn_region_enter_printf_va_fl = NULL, + .pfn_region_leave_printf_va_fl = NULL, + .pfn_data_fl = NULL, + .pfn_data_json_fl = NULL, + .pfn_printf_va_fl = fn_printf_va_fl, }; diff --git a/trace2/tr2_tgt_perf.c b/trace2/tr2_tgt_perf.c index 2ff9cf7083..a1eff8bea3 100644 --- a/trace2/tr2_tgt_perf.c +++ b/trace2/tr2_tgt_perf.c @@ -11,7 +11,9 @@ #include "trace2/tr2_tgt.h" #include "trace2/tr2_tls.h" -static struct tr2_dst tr2dst_perf = { TR2_SYSENV_PERF, 0, 0, 0, 0 }; +static struct tr2_dst tr2dst_perf = { + .sysenv_var = TR2_SYSENV_PERF, +}; /* * Use TR2_SYSENV_PERF_BRIEF to omit the "<time> <file>:<line>" @@ -549,34 +551,34 @@ static void fn_printf_va_fl(const char *file, int line, } struct tr2_tgt tr2_tgt_perf = { - &tr2dst_perf, - - fn_init, - fn_term, - - fn_version_fl, - fn_start_fl, - fn_exit_fl, - fn_signal, - fn_atexit, - fn_error_va_fl, - fn_command_path_fl, - fn_command_ancestry_fl, - fn_command_name_fl, - fn_command_mode_fl, - fn_alias_fl, - fn_child_start_fl, - fn_child_exit_fl, - fn_child_ready_fl, - fn_thread_start_fl, - fn_thread_exit_fl, - fn_exec_fl, - fn_exec_result_fl, - fn_param_fl, - fn_repo_fl, - fn_region_enter_printf_va_fl, - fn_region_leave_printf_va_fl, - fn_data_fl, - fn_data_json_fl, - fn_printf_va_fl, + .pdst = &tr2dst_perf, + + .pfn_init = fn_init, + .pfn_term = fn_term, + + .pfn_version_fl = fn_version_fl, + .pfn_start_fl = fn_start_fl, + .pfn_exit_fl = fn_exit_fl, + .pfn_signal = fn_signal, + .pfn_atexit = fn_atexit, + .pfn_error_va_fl = fn_error_va_fl, + .pfn_command_path_fl = fn_command_path_fl, + .pfn_command_ancestry_fl = fn_command_ancestry_fl, + .pfn_command_name_fl = fn_command_name_fl, + .pfn_command_mode_fl = fn_command_mode_fl, + .pfn_alias_fl = fn_alias_fl, + .pfn_child_start_fl = fn_child_start_fl, + .pfn_child_exit_fl = fn_child_exit_fl, + .pfn_child_ready_fl = fn_child_ready_fl, + .pfn_thread_start_fl = fn_thread_start_fl, + .pfn_thread_exit_fl = fn_thread_exit_fl, + .pfn_exec_fl = fn_exec_fl, + .pfn_exec_result_fl = fn_exec_result_fl, + .pfn_param_fl = fn_param_fl, + .pfn_repo_fl = fn_repo_fl, + .pfn_region_enter_printf_va_fl = fn_region_enter_printf_va_fl, + .pfn_region_leave_printf_va_fl = fn_region_leave_printf_va_fl, + .pfn_data_fl = fn_data_fl, + .pfn_data_json_fl = fn_data_json_fl, + .pfn_printf_va_fl = fn_printf_va_fl, }; |