From: Bart Van Assche Date: Thu, 13 Mar 2008 20:11:33 +0000 (+0000) Subject: Small additional optimization. X-Git-Tag: svn/VALGRIND_3_4_0~880 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=350e6827a32cd966a23cf8925dda84ac71034b28;p=thirdparty%2Fvalgrind.git Small additional optimization. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7676 --- diff --git a/exp-drd/drd_bitmap.c b/exp-drd/drd_bitmap.c index d09ae47d3a..94818307f7 100644 --- a/exp-drd/drd_bitmap.c +++ b/exp-drd/drd_bitmap.c @@ -218,14 +218,6 @@ UWord bm_has_any_access(const struct bitmap* const bm, b_end = (bm2->addr << ADDR0_BITS) + ADDR0_COUNT; else b_end = a2; -#if 0 - VG_(message)(Vg_DebugMsg, - "in 0x%lx 0x%lx / cur 0x%lx 0x%lx / out 0x%lx 0x%lx", - a1, a2, - (bm2->addr << ADDR0_BITS), - (bm2->addr << ADDR0_BITS) + ADDR0_COUNT, - b_start, b_end); -#endif tl_assert(a1 <= b_end && b_end <= a2); tl_assert(b_start < b_end); tl_assert((b_start & ADDR0_MASK) <= ((b_end - 1) & ADDR0_MASK)); diff --git a/exp-drd/drd_main.c b/exp-drd/drd_main.c index 823cf21b4f..0a137efc90 100644 --- a/exp-drd/drd_main.c +++ b/exp-drd/drd_main.c @@ -181,7 +181,7 @@ VG_REGPARM(2) void drd_trace_load(Addr addr, SizeT size) #endif sg = thread_get_segment(thread_get_running_tid()); bm_access_range_load(sg->bm, addr, addr + size); - if (bm_has_conflict_with(thread_get_danger_set(), addr, addr + size, eLoad) + if (bm_load_has_conflict_with(thread_get_danger_set(), addr, addr + size) && ! drd_is_suppressed(addr, addr + size)) { DataRaceErrInfo drei; @@ -231,7 +231,7 @@ VG_REGPARM(2) void drd_trace_store(Addr addr, SizeT size) #endif sg = thread_get_segment(thread_get_running_tid()); bm_access_range_store(sg->bm, addr, addr + size); - if (bm_has_conflict_with(thread_get_danger_set(), addr, addr + size, eStore) + if (bm_store_has_conflict_with(thread_get_danger_set(), addr, addr + size) && ! drd_is_suppressed(addr, addr + size)) { DataRaceErrInfo drei;