/*
* Initialize TRACE2 tracing facility if any of the builtin TRACE2
- * targets are enabled in the environment. Emits a 'version' event.
+ * targets are enabled in the system config or the environment.
+ * Emits a 'version' event.
*
* Cleanup/Termination is handled automatically by a registered
* atexit() routine.
* Emit one or more 'def_param' events for "interesting" configuration
* settings.
*
- * The environment variable "GIT_TR2_CONFIG_PARAMS" can be set to a
- * list of patterns considered important. For example:
- *
- * GIT_TR2_CONFIG_PARAMS="core.*,remote.*.url"
+ * Use the TR2_SYSENV_CFG_PARAM setting to register a comma-separated
+ * list of patterns configured important. For example:
+ * git config --system trace2.configParams 'core.*,remote.*.url'
+ * or:
+ * GIT_TRACE2_CONFIG_PARAMS=core.*,remote.*.url"
*
* Note: this routine does a read-only iteration on the config data
* (using read_early_config()), so it must not be called until enough
* on this thread.
*/
void trace2_region_enter_fl(const char *file, int line, const char *category,
- const char *label, const struct repository *repo);
+ const char *label, const struct repository *repo, ...);
#define trace2_region_enter(category, label, repo) \
trace2_region_enter_fl(__FILE__, __LINE__, (category), (label), (repo))
* in this nesting level.
*/
void trace2_region_leave_fl(const char *file, int line, const char *category,
- const char *label, const struct repository *repo);
+ const char *label, const struct repository *repo, ...);
#define trace2_region_leave(category, label, repo) \
trace2_region_leave_fl(__FILE__, __LINE__, (category), (label), (repo))
* Optional platform-specific code to dump information about the
* current and any parent process(es). This is intended to allow
* post-processors to know who spawned this git instance and anything
- * else the platform may be able to tell us about the current process.
+ * else that the platform may be able to tell us about the current process.
*/
+
+enum trace2_process_info_reason {
+ TRACE2_PROCESS_INFO_STARTUP,
+ TRACE2_PROCESS_INFO_EXIT,
+};
+
#if defined(GIT_WINDOWS_NATIVE)
-void trace2_collect_process_info(void);
+void trace2_collect_process_info(enum trace2_process_info_reason reason);
#else
-#define trace2_collect_process_info() \
- do { \
+#define trace2_collect_process_info(reason) \
+ do { \
} while (0)
#endif