]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Added bm_get_bitmap2_node_creation_count().
authorBart Van Assche <bvanassche@acm.org>
Sun, 6 Apr 2008 13:05:58 +0000 (13:05 +0000)
committerBart Van Assche <bvanassche@acm.org>
Sun, 6 Apr 2008 13:05:58 +0000 (13:05 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7850

exp-drd/drd_bitmap.c
exp-drd/drd_bitmap.h
exp-drd/pub_drd_bitmap.h

index 097b43d830fa52a3597870441763f7bc9db594fd..fed709187a1c1bf17785c34a408254a8e0b3660c 100644 (file)
@@ -879,6 +879,11 @@ ULong bm_get_bitmap_creation_count(void)
   return s_bitmap_creation_count;
 }
 
+ULong bm_get_bitmap2_node_creation_count(void)
+{
+  return s_bitmap2_creation_count;
+}
+
 ULong bm_get_bitmap2_creation_count(void)
 {
   return s_bitmap2_creation_count;
index 23ef6372c3bdefa57946000c20bae7c82530775f..a860cf4e021313c502d2b00db15d0d91059b6bf0 100644 (file)
@@ -78,6 +78,7 @@
 /* Local variables. */
 
 static ULong s_bitmap2_creation_count;
+static ULong s_node_creation_count;
 
 
 
@@ -386,6 +387,7 @@ struct bitmap2* bm2_insert(const struct bitmap* const bm, const UWord a1)
   struct bitmap2ref* bm2ref;
   struct bitmap2* bm2;
 
+  s_node_creation_count++;
   bm2ref       = VG_(OSetGen_AllocNode)(bm->oset, sizeof(*bm2ref));
   bm2ref->addr = a1;
   bm2          = bm2_new(a1);
@@ -409,6 +411,8 @@ struct bitmap2* bm2_insert_addref(const struct bitmap* const bm,
 
   tl_assert(bm);
   //tl_assert(VG_(OSetGen_Lookup)(bm->oset, &bm2->addr) == 0);
+
+  s_node_creation_count++;
   bm2ref       = VG_(OSetGen_AllocNode)(bm->oset, sizeof(*bm2ref));
   bm2ref->addr = bm2->addr;
   bm2ref->bm2  = bm2;
index 8bfdeeb504092e7d15bc9adb7e332125115b8c24..d8324e0e84eefcf15398299fb504da7c19011872 100644 (file)
@@ -112,7 +112,9 @@ void bm_report_races(ThreadId const tid1, ThreadId const tid2,
                      const struct bitmap* const bm2);
 void bm_print(const struct bitmap* bm);
 ULong bm_get_bitmap_creation_count(void);
+ULong bm_get_bitmap2_node_creation_count(void);
 ULong bm_get_bitmap2_creation_count(void);
+
 void bm_test(void);