diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-05-13 23:50:31 +0900 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-05-13 23:50:31 +0900 |
commit | 5b2d1c0c6eceb5fd6c9527bc2863179644dce840 (patch) | |
tree | 157db719b486e9bdd971efc9aa15fca4e77a3681 /trace2/tr2_sysenv.h | |
parent | The eighth batch (diff) | |
parent | trace2: fixup access problem on /etc/gitconfig in read_very_early_config (diff) | |
download | tgif-5b2d1c0c6eceb5fd6c9527bc2863179644dce840.tar.xz |
Merge branch 'jh/trace2-sid-fix'
Polishing of the new trace2 facility continues. The system-level
configuration can specify site-wide trace2 settings, which can be
overridden with per-user configuration and environment variables.
* jh/trace2-sid-fix:
trace2: fixup access problem on /etc/gitconfig in read_very_early_config
trace2: update docs to describe system/global config settings
trace2: make SIDs more unique
trace2: clarify UTC datetime formatting
trace2: report peak memory usage of the process
trace2: use system/global config for default trace2 settings
config: add read_very_early_config()
trace2: find exec-dir before trace2 initialization
trace2: add absolute elapsed time to start event
trace2: refactor setting process starting time
config: initialize opts structure in repo_read_config()
Diffstat (limited to 'trace2/tr2_sysenv.h')
-rw-r--r-- | trace2/tr2_sysenv.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/trace2/tr2_sysenv.h b/trace2/tr2_sysenv.h new file mode 100644 index 0000000000..369b20bd87 --- /dev/null +++ b/trace2/tr2_sysenv.h @@ -0,0 +1,36 @@ +#ifndef TR2_SYSENV_H +#define TR2_SYSENV_H + +/* + * The Trace2 settings that can be loaded from /etc/gitconfig + * and/or user environment variables. + * + * Note that this set does not contain any of the transient + * environment variables used to pass information from parent + * to child git processes, such "GIT_TR2_PARENT_SID". + */ +enum tr2_sysenv_variable { + TR2_SYSENV_CFG_PARAM = 0, + + TR2_SYSENV_DST_DEBUG, + + TR2_SYSENV_NORMAL, + TR2_SYSENV_NORMAL_BRIEF, + + TR2_SYSENV_EVENT, + TR2_SYSENV_EVENT_BRIEF, + TR2_SYSENV_EVENT_NESTING, + + TR2_SYSENV_PERF, + TR2_SYSENV_PERF_BRIEF, + + TR2_SYSENV_MUST_BE_LAST +}; + +void tr2_sysenv_load(void); + +const char *tr2_sysenv_get(enum tr2_sysenv_variable); +const char *tr2_sysenv_display_name(enum tr2_sysenv_variable var); +void tr2_sysenv_release(void); + +#endif /* TR2_SYSENV_H */ |