|
From: <sv...@va...> - 2009-05-03 18:50:40
|
Author: bart
Date: 2009-05-03 19:50:29 +0100 (Sun, 03 May 2009)
New Revision: 9736
Log:
Removed support for computed bitmaps.
Modified:
branches/DRDDEV/drd/drd_bitmap.c
branches/DRDDEV/drd/drd_bitmap.h
branches/DRDDEV/drd/pub_drd_bitmap.h
Modified: branches/DRDDEV/drd/drd_bitmap.c
===================================================================
--- branches/DRDDEV/drd/drd_bitmap.c 2009-05-03 18:33:45 UTC (rev 9735)
+++ branches/DRDDEV/drd/drd_bitmap.c 2009-05-03 18:50:29 UTC (rev 9736)
@@ -59,16 +59,6 @@
struct bitmap* DRD_(bm_new)()
{
- return bm_new_cb(0);
-}
-
-/** Allocate and initialize a new bitmap structure.
- *
- * @param compute_bitmap2 Callback function for computing the actual bitmap
- * data.
- */
-struct bitmap* bm_new_cb(void (*compute_bitmap2)(UWord, struct bitmap2*))
-{
unsigned i;
struct bitmap* bm;
@@ -89,7 +79,6 @@
}
bm->oset = VG_(OSetGen_Create)(0, 0, VG_(malloc), "drd.bitmap.bn.2",
VG_(free));
- bm->compute_bitmap2 = compute_bitmap2;
s_bitmap_creation_count++;
Modified: branches/DRDDEV/drd/drd_bitmap.h
===================================================================
--- branches/DRDDEV/drd/drd_bitmap.h 2009-05-03 18:33:45 UTC (rev 9735)
+++ branches/DRDDEV/drd/drd_bitmap.h 2009-05-03 18:50:29 UTC (rev 9736)
@@ -65,7 +65,7 @@
/** Number of bits assigned to the least significant component of an address.
*/
-#define ADDR_LSB_BITS 12
+#define ADDR_LSB_BITS 14
/** Mask that has to be applied to an address of type Addr in order to
* compute the least significant part of an address split, after having
@@ -318,7 +318,6 @@
{
struct bm_cache_elem cache[N_CACHE_ELEM];
OSet* oset;
- void (*compute_bitmap2)(const UWord a1, struct bitmap2* bm2);
};
@@ -491,18 +490,7 @@
if (! bm_cache_lookup(bm, a1, &bm2))
{
bm2 = VG_(OSetGen_Lookup)(bm->oset, &a1);
- if (bm2 == 0 && bm->compute_bitmap2)
- {
- bm2 = bm2_insert(bm, a1);
- bm2_clear(bm2);
- /* Compute the second-level bitmap, and insert the pointer to the
- * computed bitmap. Note: this pointer may be NULL. */
- (*bm->compute_bitmap2)(a1, bm2);
- }
- else
- {
- bm_update_cache(bm, a1, bm2);
- }
+ bm_update_cache(bm, a1, bm2);
}
return bm2;
}
@@ -521,7 +509,6 @@
#ifdef ENABLE_DRD_CONSISTENCY_CHECKS
tl_assert(bm);
- tl_assert(bm->compute_bitmap2 == 0);
#endif
if (! bm_cache_lookup(bm, a1, &bm2))
@@ -581,7 +568,6 @@
#ifdef ENABLE_DRD_CONSISTENCY_CHECKS
tl_assert(bm);
- tl_assert(bm->compute_bitmap2 == 0);
#endif
if (bm_cache_lookup(bm, a1, &bm2))
@@ -626,7 +612,6 @@
#ifdef ENABLE_DRD_CONSISTENCY_CHECKS
tl_assert(bm);
- tl_assert(bm->compute_bitmap2 == 0);
#endif
bm2 = bm2_lookup_or_insert_exclusive(bm, address_msb(a1));
@@ -643,7 +628,6 @@
#ifdef ENABLE_DRD_CONSISTENCY_CHECKS
tl_assert(bm);
- tl_assert(bm->compute_bitmap2 == 0);
#endif
bm2 = bm2_lookup_or_insert_exclusive(bm, address_msb(a1));
Modified: branches/DRDDEV/drd/pub_drd_bitmap.h
===================================================================
--- branches/DRDDEV/drd/pub_drd_bitmap.h 2009-05-03 18:33:45 UTC (rev 9735)
+++ branches/DRDDEV/drd/pub_drd_bitmap.h 2009-05-03 18:50:29 UTC (rev 9736)
@@ -62,7 +62,6 @@
/* Function declarations. */
struct bitmap* DRD_(bm_new)(void);
-struct bitmap* bm_new_cb(void (*compute_bitmap2)(UWord, struct bitmap2*));
void DRD_(bm_delete)(struct bitmap* const bm);
void DRD_(bm_access_range)(struct bitmap* const bm,
const Addr a1, const Addr a2,
|