]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Statistics: do not only count DRD_(bm_new)() calls but also DRD_(bm_init)() calls...
authorBart Van Assche <bvanassche@acm.org>
Sun, 21 Jun 2009 18:08:31 +0000 (18:08 +0000)
committerBart Van Assche <bvanassche@acm.org>
Sun, 21 Jun 2009 18:08:31 +0000 (18:08 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10358

drd/drd_bitmap.c

index 7c3c7d5ff127c532e024702b960616337d77dabb..82b6a0648616f75367d45e3998a058192d1cb235 100644 (file)
@@ -64,8 +64,6 @@ struct bitmap* DRD_(bm_new)()
    bm = VG_(malloc)("drd.bitmap.bn.1", sizeof(*bm));
    DRD_(bm_init)(bm);
 
-   s_bitmap_creation_count++;
-
    return bm;
 }
 
@@ -83,7 +81,8 @@ void DRD_(bm_init)(struct bitmap* const bm)
    unsigned i;
 
    tl_assert(bm);
-   /* Cache initialization. a1 is initialized with a value that never can
+   /*
+    * Cache initialization. a1 is initialized with a value that never can
     * match any valid address: the upper (ADDR_LSB_BITS + ADDR_IGNORED_BITS)
     * bits of a1 are always zero for a valid cache entry.
     */
@@ -94,6 +93,8 @@ void DRD_(bm_init)(struct bitmap* const bm)
    }
    bm->oset = VG_(OSetGen_Create)(0, 0, DRD_(bm2_alloc_node),
                                   "drd.bitmap.bn.2", DRD_(bm2_free_node));
+
+   s_bitmap_creation_count++;
 }
 
 /** Free the memory allocated by DRD_(bm_init)(). */