@@ -116,6 +116,10 @@ struct bitmap_index {
116
116
117
117
static int pseudo_merges_satisfied_nr ;
118
118
static int pseudo_merges_cascades_nr ;
119
+ static int existing_bitmaps_hits_nr ;
120
+ static int existing_bitmaps_misses_nr ;
121
+ static int roots_with_bitmaps_nr ;
122
+ static int roots_without_bitmaps_nr ;
119
123
120
124
static struct ewah_bitmap * lookup_stored_bitmap (struct stored_bitmap * st )
121
125
{
@@ -1040,10 +1044,14 @@ static int add_to_include_set(struct bitmap_index *bitmap_git,
1040
1044
1041
1045
partial = bitmap_for_commit (bitmap_git , commit );
1042
1046
if (partial ) {
1047
+ existing_bitmaps_hits_nr ++ ;
1048
+
1043
1049
bitmap_or_ewah (data -> base , partial );
1044
1050
return 0 ;
1045
1051
}
1046
1052
1053
+ existing_bitmaps_misses_nr ++ ;
1054
+
1047
1055
bitmap_set (data -> base , bitmap_pos );
1048
1056
if (apply_pseudo_merges_for_commit_1 (bitmap_git , data -> base , commit ,
1049
1057
bitmap_pos ))
@@ -1099,8 +1107,12 @@ static int add_commit_to_bitmap(struct bitmap_index *bitmap_git,
1099
1107
{
1100
1108
struct ewah_bitmap * or_with = bitmap_for_commit (bitmap_git , commit );
1101
1109
1102
- if (!or_with )
1110
+ if (!or_with ) {
1111
+ existing_bitmaps_misses_nr ++ ;
1103
1112
return 0 ;
1113
+ }
1114
+
1115
+ existing_bitmaps_hits_nr ++ ;
1104
1116
1105
1117
if (!* base )
1106
1118
* base = ewah_to_bitmap (or_with );
@@ -1407,8 +1419,12 @@ static struct bitmap *find_objects(struct bitmap_index *bitmap_git,
1407
1419
object -> flags &= ~UNINTERESTING ;
1408
1420
add_pending_object (revs , object , "" );
1409
1421
needs_walk = 1 ;
1422
+
1423
+ roots_without_bitmaps_nr ++ ;
1410
1424
} else {
1411
1425
object -> flags |= SEEN ;
1426
+
1427
+ roots_with_bitmaps_nr ++ ;
1412
1428
}
1413
1429
}
1414
1430
@@ -1975,6 +1991,14 @@ struct bitmap_index *prepare_bitmap_walk(struct rev_info *revs,
1975
1991
pseudo_merges_satisfied_nr );
1976
1992
trace2_data_intmax ("bitmap" , the_repository , "pseudo_merges_cascades" ,
1977
1993
pseudo_merges_cascades_nr );
1994
+ trace2_data_intmax ("bitmap" , the_repository , "bitmap/hits" ,
1995
+ existing_bitmaps_hits_nr );
1996
+ trace2_data_intmax ("bitmap" , the_repository , "bitmap/misses" ,
1997
+ existing_bitmaps_misses_nr );
1998
+ trace2_data_intmax ("bitmap" , the_repository , "bitmap/roots_with_bitmap" ,
1999
+ roots_with_bitmaps_nr );
2000
+ trace2_data_intmax ("bitmap" , the_repository , "bitmap/roots_without_bitmap" ,
2001
+ roots_without_bitmaps_nr );
1978
2002
1979
2003
return bitmap_git ;
1980
2004
0 commit comments