diff options
author | Jeff King <peff@peff.net> | 2014-06-10 17:38:47 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-06-12 10:29:42 -0700 |
commit | c335d74d349d201cb7627aa7233638d2953a4b02 (patch) | |
tree | 68a140155f28938cc3472c4f91408bf13b8950b3 /alloc.c | |
parent | e6dfcd6767a58816dacec0df39515803b267fbe6 (diff) | |
download | git-c335d74d349d201cb7627aa7233638d2953a4b02.tar.gz |
alloc: include any-object allocations in alloc_report
When 2c1cbec (Use proper object allocators for unknown
object nodes too, 2007-04-16), added a special "any_object"
allocator, it never taught alloc_report to report on it. To
do so we need to add an extra type argument to the REPORT
macro, as that commit did for DEFINE_ALLOCATOR.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'alloc.c')
-rw-r--r-- | alloc.c | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -57,13 +57,14 @@ static void report(const char *name, unsigned int count, size_t size) name, count, (uintmax_t) size); } -#define REPORT(name) \ - report(#name, name##_allocs, name##_allocs * sizeof(struct name) >> 10) +#define REPORT(name, type) \ + report(#name, name##_allocs, name##_allocs * sizeof(type) >> 10) void alloc_report(void) { - REPORT(blob); - REPORT(tree); - REPORT(commit); - REPORT(tag); + REPORT(blob, struct blob); + REPORT(tree, struct tree); + REPORT(commit, struct commit); + REPORT(tag, struct tag); + REPORT(object, union any_object); } |