git/trace2/tr2_tgt_perf.c

#include "git-compat-util.h"
#include "config.h"
#include "repository.h"
#include "run-command.h"
#include "quote.h"
#include "version.h"
#include "json-writer.h"
#include "trace2/tr2_dst.h"
#include "trace2/tr2_sid.h"
#include "trace2/tr2_sysenv.h"
#include "trace2/tr2_tbuf.h"
#include "trace2/tr2_tgt.h"
#include "trace2/tr2_tls.h"
#include "trace2/tr2_tmr.h"

static struct tr2_dst tr2dst_perf =;

/*
 * Use TR2_SYSENV_PERF_BRIEF to omit the "<time> <file>:<line>"
 * fields from each line written to the builtin performance target.
 *
 * Unit tests may want to use this to help with testing.
 */
static int tr2env_perf_be_brief;

#define TR2FMT_PERF_FL_WIDTH
#define TR2FMT_PERF_MAX_EVENT_NAME
#define TR2FMT_PERF_REPO_WIDTH
#define TR2FMT_PERF_CATEGORY_WIDTH

#define TR2_INDENT
#define TR2_INDENT_LENGTH(ctx)

static int fn_init(void)
{}

static void fn_term(void)
{}

/*
 * Format trace line prefix in human-readable classic format for
 * the performance target:
 *     "[<time> [<file>:<line>] <bar>] <nr_parents> <bar>
 *         <thread_name> <bar> <event_name> <bar> [<repo>] <bar>
 *         [<elapsed_absolute>] [<elapsed_relative>] <bar>
 *         [<category>] <bar> [<dots>] "
 */
static void perf_fmt_prepare(const char *event_name,
			     struct tr2tls_thread_ctx *ctx, const char *file,
			     int line, const struct repository *repo,
			     uint64_t *p_us_elapsed_absolute,
			     uint64_t *p_us_elapsed_relative,
			     const char *category, struct strbuf *buf)
{}

static void perf_io_write_fl(const char *file, int line, const char *event_name,
			     const struct repository *repo,
			     uint64_t *p_us_elapsed_absolute,
			     uint64_t *p_us_elapsed_relative,
			     const char *category,
			     const struct strbuf *buf_payload)
{}

static void fn_version_fl(const char *file, int line)
{}

static void fn_start_fl(const char *file, int line,
			uint64_t us_elapsed_absolute, const char **argv)
{}

static void fn_exit_fl(const char *file, int line, uint64_t us_elapsed_absolute,
		       int code)
{}

static void fn_signal(uint64_t us_elapsed_absolute, int signo)
{}

static void fn_atexit(uint64_t us_elapsed_absolute, int code)
{}

static void maybe_append_string_va(struct strbuf *buf, const char *fmt,
				   va_list ap)
{}

static void fn_error_va_fl(const char *file, int line, const char *fmt,
			   va_list ap)
{}

static void fn_command_path_fl(const char *file, int line, const char *pathname)
{}

static void fn_command_ancestry_fl(const char *file, int line, const char **parent_names)
{}

static void fn_command_name_fl(const char *file, int line, const char *name,
			       const char *hierarchy)
{}

static void fn_command_mode_fl(const char *file, int line, const char *mode)
{}

static void fn_alias_fl(const char *file, int line, const char *alias,
			const char **argv)
{}

static void fn_child_start_fl(const char *file, int line,
			      uint64_t us_elapsed_absolute,
			      const struct child_process *cmd)
{}

static void fn_child_exit_fl(const char *file, int line,
			     uint64_t us_elapsed_absolute, int cid, int pid,
			     int code, uint64_t us_elapsed_child)
{}

static void fn_child_ready_fl(const char *file, int line,
			      uint64_t us_elapsed_absolute, int cid, int pid,
			      const char *ready, uint64_t us_elapsed_child)
{}

static void fn_thread_start_fl(const char *file, int line,
			       uint64_t us_elapsed_absolute)
{}

static void fn_thread_exit_fl(const char *file, int line,
			      uint64_t us_elapsed_absolute,
			      uint64_t us_elapsed_thread)
{}

static void fn_exec_fl(const char *file, int line, uint64_t us_elapsed_absolute,
		       int exec_id, const char *exe, const char **argv)
{}

static void fn_exec_result_fl(const char *file, int line,
			      uint64_t us_elapsed_absolute, int exec_id,
			      int code)
{}

static void fn_param_fl(const char *file, int line, const char *param,
			const char *value, const struct key_value_info *kvi)
{}

static void fn_repo_fl(const char *file, int line,
		       const struct repository *repo)
{}

static void fn_region_enter_printf_va_fl(const char *file, int line,
					 uint64_t us_elapsed_absolute,
					 const char *category,
					 const char *label,
					 const struct repository *repo,
					 const char *fmt, va_list ap)
{}

static void fn_region_leave_printf_va_fl(
	const char *file, int line, uint64_t us_elapsed_absolute,
	uint64_t us_elapsed_region, const char *category, const char *label,
	const struct repository *repo, const char *fmt, va_list ap)
{}

static void fn_data_fl(const char *file, int line, uint64_t us_elapsed_absolute,
		       uint64_t us_elapsed_region, const char *category,
		       const struct repository *repo, const char *key,
		       const char *value)
{}

static void fn_data_json_fl(const char *file, int line,
			    uint64_t us_elapsed_absolute,
			    uint64_t us_elapsed_region, const char *category,
			    const struct repository *repo, const char *key,
			    const struct json_writer *value)
{}

static void fn_printf_va_fl(const char *file, int line,
			    uint64_t us_elapsed_absolute, const char *fmt,
			    va_list ap)
{}

static void fn_timer(const struct tr2_timer_metadata *meta,
		     const struct tr2_timer *timer,
		     int is_final_data)
{}

static void fn_counter(const struct tr2_counter_metadata *meta,
		       const struct tr2_counter *counter,
		       int is_final_data)
{}

struct tr2_tgt tr2_tgt_perf =;