diff options
author | Stefan Beller <sbeller@google.com> | 2018-05-08 12:37:32 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-05-09 12:12:36 +0900 |
commit | 17bfe87369a726ebf3b1156ffd38c014bbd67e88 (patch) | |
tree | 2f3cf7b22d4e8620679f32340a7a83078e043816 | |
parent | alloc: add repository argument to alloc_object_node (diff) | |
download | tgif-17bfe87369a726ebf3b1156ffd38c014bbd67e88.tar.xz |
alloc: add repository argument to alloc_report
This is a small mechanical change; it doesn't change the
implementation to handle repositories other than the_repository yet.
Use a macro to catch callers passing a repository other than
the_repository at compile time.
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r-- | alloc.c | 2 | ||||
-rw-r--r-- | cache.h | 3 |
2 files changed, 3 insertions, 2 deletions
@@ -105,7 +105,7 @@ static void report(const char *name, unsigned int count, size_t size) #define REPORT(name, type) \ report(#name, name##_state.count, name##_state.count * sizeof(type) >> 10) -void alloc_report(void) +void alloc_report_the_repository(void) { REPORT(blob, struct blob); REPORT(tree, struct tree); @@ -1774,7 +1774,8 @@ extern void *alloc_commit_node_the_repository(void); extern void *alloc_tag_node_the_repository(void); #define alloc_object_node(r) alloc_object_node_##r() extern void *alloc_object_node_the_repository(void); -extern void alloc_report(void); +#define alloc_report(r) alloc_report_##r() +extern void alloc_report_the_repository(void); extern unsigned int alloc_commit_index(void); /* pkt-line.c */ |