From a27eecea75b3858b4052b191143f144a7e966869 Mon Sep 17 00:00:00 2001 From: Beat Bolli Date: Thu, 20 Jul 2023 18:48:23 +0200 Subject: wrapper: use trace2 counters to collect fsync stats As mentioned in the thread starting at [1], trace2 counters should be used to count events instead of ad-hoc static variables. Convert the two fsync static variables to trace2 counters, reducing the coupling between wrapper.c and the trace2 subsystem. Adjust t/t5351 to match the trace2 counter output format. The counters are not per-thread because the ones being replaced also were not. [1] https://lore.kernel.org/git/20230627195251.1973421-2-calvinwan@google.com/ Signed-off-by: Beat Bolli Signed-off-by: Junio C Hamano --- wrapper.h | 5 ----- 1 file changed, 5 deletions(-) (limited to 'wrapper.h') diff --git a/wrapper.h b/wrapper.h index c85b1328d1..79a9c1b507 100644 --- a/wrapper.h +++ b/wrapper.h @@ -87,11 +87,6 @@ enum fsync_action { */ int git_fsync(int fd, enum fsync_action action); -/* - * Writes out trace statistics for fsync using the trace2 API. - */ -void trace_git_fsync_stats(void); - /* * Preserves errno, prints a message, but gives no warning for ENOENT. * Returns 0 on success, which includes trying to unlink an object that does -- cgit v1.2.3