summaryrefslogtreecommitdiff
path: root/trace2.h
diff options
context:
space:
mode:
authorJeff Hostetler <jeffhost@microsoft.com>2019-04-15 20:39:48 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-04-16 04:37:07 (GMT)
commit26c6f251d754a33c188ce7ad8f5ea6cb0bc740d7 (patch)
treef61f6d37e895311970bec2daec7bc7ab329a666f /trace2.h
parentbce9db6de97c95882a7c46836bb6cc90acf0fef0 (diff)
downloadgit-26c6f251d754a33c188ce7ad8f5ea6cb0bc740d7.zip
git-26c6f251d754a33c188ce7ad8f5ea6cb0bc740d7.tar.gz
git-26c6f251d754a33c188ce7ad8f5ea6cb0bc740d7.tar.bz2
trace2: report peak memory usage of the process
Teach Windows version of git to report peak memory usage during exit() processing. Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'trace2.h')
-rw-r--r--trace2.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/trace2.h b/trace2.h
index 894bfca..888531e 100644
--- a/trace2.h
+++ b/trace2.h
@@ -391,13 +391,19 @@ void trace2_printf(const char *fmt, ...);
* 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