@@ -27,7 +27,6 @@ union any_object {
2727};
2828
2929struct alloc_state {
30- int count ; /* total number of nodes allocated */
3130 int nr ; /* number of nodes left in current allocation */
3231 void * p ; /* first free node in current allocation */
3332
@@ -63,7 +62,6 @@ static inline void *alloc_node(struct alloc_state *s, size_t node_size)
6362 s -> slabs [s -> slab_nr ++ ] = s -> p ;
6463 }
6564 s -> nr -- ;
66- s -> count ++ ;
6765 ret = s -> p ;
6866 s -> p = (char * )s -> p + node_size ;
6967 memset (ret , 0 , node_size );
@@ -122,22 +120,3 @@ void *alloc_commit_node(struct repository *r)
122120 init_commit_node (c );
123121 return c ;
124122}
125-
126- static void report (const char * name , unsigned int count , size_t size )
127- {
128- fprintf (stderr , "%10s: %8u (%" PRIuMAX " kB)\n" ,
129- name , count , (uintmax_t ) size );
130- }
131-
132- #define REPORT (name , type ) \
133- report(#name, r->parsed_objects->name##_state->count, \
134- r->parsed_objects->name##_state->count * sizeof(type) >> 10)
135-
136- void alloc_report (struct repository * r )
137- {
138- REPORT (blob , struct blob );
139- REPORT (tree , struct tree );
140- REPORT (commit , struct commit );
141- REPORT (tag , struct tag );
142- REPORT (object , union any_object );
143- }
0 commit comments