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>
This commit is contained in:
Jeff Hostetler
2019-04-15 13:39:48 -07:00
committed by Junio C Hamano
parent bce9db6de9
commit 26c6f251d7
4 changed files with 60 additions and 8 deletions

View File

@@ -213,6 +213,8 @@ int trace2_cmd_exit_fl(const char *file, int line, int code)
if (!trace2_enabled)
return code;
trace2_collect_process_info(TRACE2_PROCESS_INFO_EXIT);
tr2main_exit_code = code;
us_now = getnanotime() / 1000;