You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(122) |
Nov
(152) |
Dec
(69) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(6) |
Feb
(25) |
Mar
(73) |
Apr
(82) |
May
(24) |
Jun
(25) |
Jul
(10) |
Aug
(11) |
Sep
(10) |
Oct
(54) |
Nov
(203) |
Dec
(182) |
| 2004 |
Jan
(307) |
Feb
(305) |
Mar
(430) |
Apr
(312) |
May
(187) |
Jun
(342) |
Jul
(487) |
Aug
(637) |
Sep
(336) |
Oct
(373) |
Nov
(441) |
Dec
(210) |
| 2005 |
Jan
(385) |
Feb
(480) |
Mar
(636) |
Apr
(544) |
May
(679) |
Jun
(625) |
Jul
(810) |
Aug
(838) |
Sep
(634) |
Oct
(521) |
Nov
(965) |
Dec
(543) |
| 2006 |
Jan
(494) |
Feb
(431) |
Mar
(546) |
Apr
(411) |
May
(406) |
Jun
(322) |
Jul
(256) |
Aug
(401) |
Sep
(345) |
Oct
(542) |
Nov
(308) |
Dec
(481) |
| 2007 |
Jan
(427) |
Feb
(326) |
Mar
(367) |
Apr
(255) |
May
(244) |
Jun
(204) |
Jul
(223) |
Aug
(231) |
Sep
(354) |
Oct
(374) |
Nov
(497) |
Dec
(362) |
| 2008 |
Jan
(322) |
Feb
(482) |
Mar
(658) |
Apr
(422) |
May
(476) |
Jun
(396) |
Jul
(455) |
Aug
(267) |
Sep
(280) |
Oct
(253) |
Nov
(232) |
Dec
(304) |
| 2009 |
Jan
(486) |
Feb
(470) |
Mar
(458) |
Apr
(423) |
May
(696) |
Jun
(461) |
Jul
(551) |
Aug
(575) |
Sep
(134) |
Oct
(110) |
Nov
(157) |
Dec
(102) |
| 2010 |
Jan
(226) |
Feb
(86) |
Mar
(147) |
Apr
(117) |
May
(107) |
Jun
(203) |
Jul
(193) |
Aug
(238) |
Sep
(300) |
Oct
(246) |
Nov
(23) |
Dec
(75) |
| 2011 |
Jan
(133) |
Feb
(195) |
Mar
(315) |
Apr
(200) |
May
(267) |
Jun
(293) |
Jul
(353) |
Aug
(237) |
Sep
(278) |
Oct
(611) |
Nov
(274) |
Dec
(260) |
| 2012 |
Jan
(303) |
Feb
(391) |
Mar
(417) |
Apr
(441) |
May
(488) |
Jun
(655) |
Jul
(590) |
Aug
(610) |
Sep
(526) |
Oct
(478) |
Nov
(359) |
Dec
(372) |
| 2013 |
Jan
(467) |
Feb
(226) |
Mar
(391) |
Apr
(281) |
May
(299) |
Jun
(252) |
Jul
(311) |
Aug
(352) |
Sep
(481) |
Oct
(571) |
Nov
(222) |
Dec
(231) |
| 2014 |
Jan
(185) |
Feb
(329) |
Mar
(245) |
Apr
(238) |
May
(281) |
Jun
(399) |
Jul
(382) |
Aug
(500) |
Sep
(579) |
Oct
(435) |
Nov
(487) |
Dec
(256) |
| 2015 |
Jan
(338) |
Feb
(357) |
Mar
(330) |
Apr
(294) |
May
(191) |
Jun
(108) |
Jul
(142) |
Aug
(261) |
Sep
(190) |
Oct
(54) |
Nov
(83) |
Dec
(22) |
| 2016 |
Jan
(49) |
Feb
(89) |
Mar
(33) |
Apr
(50) |
May
(27) |
Jun
(34) |
Jul
(53) |
Aug
(53) |
Sep
(98) |
Oct
(206) |
Nov
(93) |
Dec
(53) |
| 2017 |
Jan
(65) |
Feb
(82) |
Mar
(102) |
Apr
(86) |
May
(187) |
Jun
(67) |
Jul
(23) |
Aug
(93) |
Sep
(65) |
Oct
(45) |
Nov
(35) |
Dec
(17) |
| 2018 |
Jan
(26) |
Feb
(35) |
Mar
(38) |
Apr
(32) |
May
(8) |
Jun
(43) |
Jul
(27) |
Aug
(30) |
Sep
(43) |
Oct
(42) |
Nov
(38) |
Dec
(67) |
| 2019 |
Jan
(32) |
Feb
(37) |
Mar
(53) |
Apr
(64) |
May
(49) |
Jun
(18) |
Jul
(14) |
Aug
(53) |
Sep
(25) |
Oct
(30) |
Nov
(49) |
Dec
(31) |
| 2020 |
Jan
(87) |
Feb
(45) |
Mar
(37) |
Apr
(51) |
May
(99) |
Jun
(36) |
Jul
(11) |
Aug
(14) |
Sep
(20) |
Oct
(24) |
Nov
(40) |
Dec
(23) |
| 2021 |
Jan
(14) |
Feb
(53) |
Mar
(85) |
Apr
(15) |
May
(19) |
Jun
(3) |
Jul
(14) |
Aug
(1) |
Sep
(57) |
Oct
(73) |
Nov
(56) |
Dec
(22) |
| 2022 |
Jan
(3) |
Feb
(22) |
Mar
(6) |
Apr
(55) |
May
(46) |
Jun
(39) |
Jul
(15) |
Aug
(9) |
Sep
(11) |
Oct
(34) |
Nov
(20) |
Dec
(36) |
| 2023 |
Jan
(79) |
Feb
(41) |
Mar
(99) |
Apr
(169) |
May
(48) |
Jun
(16) |
Jul
(16) |
Aug
(57) |
Sep
(19) |
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
|
|
1
(21) |
|
2
(19) |
3
(33) |
4
(24) |
5
(18) |
6
(13) |
7
(22) |
8
(21) |
|
9
(38) |
10
(25) |
11
(20) |
12
(27) |
13
(43) |
14
(9) |
15
(19) |
|
16
(37) |
17
(19) |
18
(13) |
19
(11) |
20
(8) |
21
(11) |
22
(25) |
|
23
(21) |
24
(30) |
25
(18) |
26
(11) |
27
(10) |
28
(14) |
29
(40) |
|
30
(24) |
31
(14) |
|
|
|
|
|
|
From: Bart V. A. <bar...@gm...> - 2008-03-15 16:46:03
|
Hello, Code executed in Valgrind tools that analyzes runtime behavior of clients often can be made faster by specifying branch prediction information. E.g. gcc offers the built-in function __builtin_expect() to allow branch prediction information to be specified in source code. Unfortunately there is not yet a standard way in Valgrind to specify branch prediction hints. The patch below is modeled after the include file linux/compiler.h in the Linux kernel source tree, and should replace the EXPECTED_TAKEN / EXPECTED_NOT_TAKEN / LIKELY / UNLIKELY macro's found in various source files. Comments are welcome. Index: include/pub_tool_compiler.h =================================================================== --- include/pub_tool_compiler.h (revision 0) +++ include/pub_tool_compiler.h (revision 0) @@ -0,0 +1,9 @@ +/* Compiler-dependent functionality. */ + +#include "config.h" + +#if HAVE_BUILTIN_EXPECT +#define LIKELY(x) __builtin_expect(!!(x), 1) +#define UNLIKELY(x) __builtin_expect((x), 0) +#else +#define LIKELY(x) (x) +#define UNLIKELY(x) (x) +#endif Bart. |
|
From: <sv...@va...> - 2008-03-15 14:30:21
|
Author: bart
Date: 2008-03-15 14:30:20 +0000 (Sat, 15 Mar 2008)
New Revision: 7689
Log:
More performance tuning.
Modified:
trunk/exp-drd/drd_bitmap.c
trunk/exp-drd/drd_bitmap.h
Modified: trunk/exp-drd/drd_bitmap.c
===================================================================
--- trunk/exp-drd/drd_bitmap.c 2008-03-15 11:42:34 UTC (rev 7688)
+++ trunk/exp-drd/drd_bitmap.c 2008-03-15 14:30:20 UTC (rev 7689)
@@ -141,8 +141,6 @@
struct bitmap2* bm2;
bm2 = bm2_lookup_or_insert(bm, a1 >> ADDR0_BITS);
- tl_assert(bm2);
-
bm0_set_range(bm2->bm1.bm0_r, a1 & ADDR0_MASK, size);
}
@@ -153,8 +151,6 @@
struct bitmap2* bm2;
bm2 = bm2_lookup_or_insert(bm, a1 >> ADDR0_BITS);
- tl_assert(bm2);
-
bm0_set_range(bm2->bm1.bm0_w, a1 & ADDR0_MASK, size);
}
Modified: trunk/exp-drd/drd_bitmap.h
===================================================================
--- trunk/exp-drd/drd_bitmap.h 2008-03-15 11:42:34 UTC (rev 7688)
+++ trunk/exp-drd/drd_bitmap.h 2008-03-15 14:30:20 UTC (rev 7689)
@@ -40,7 +40,7 @@
/* Macro definitions. */
-#define ADDR0_BITS 12
+#define ADDR0_BITS 16
#define ADDR0_COUNT ((UWord)1 << ADDR0_BITS)
@@ -159,7 +159,6 @@
const UWord a1 = a >> ADDR0_BITS;
if (a1 == bm->last_lookup_a1)
{
- //tl_assert(bm->last_lookup_result == VG_(OSetGen_Lookup)(bm->oset, &a1));
return bm->last_lookup_result;
}
result = VG_(OSetGen_Lookup)(bm->oset,&a1);
@@ -196,7 +195,6 @@
if (a1 == bm->last_lookup_a1)
{
- //tl_assert(bm->last_lookup_result == VG_(OSetGen_Lookup)(bm->oset, &a1));
return bm->last_lookup_result;
}
|
|
From: <sv...@va...> - 2008-03-15 11:42:32
|
Author: bart
Date: 2008-03-15 11:42:34 +0000 (Sat, 15 Mar 2008)
New Revision: 7688
Log:
Modified bitmap implementation such that more expressions can be evaluated at compile time.
Modified:
trunk/exp-drd/drd_bitmap.c
trunk/exp-drd/drd_bitmap.h
Modified: trunk/exp-drd/drd_bitmap.c
===================================================================
--- trunk/exp-drd/drd_bitmap.c 2008-03-15 10:28:36 UTC (rev 7687)
+++ trunk/exp-drd/drd_bitmap.c 2008-03-15 11:42:34 UTC (rev 7688)
@@ -136,44 +136,26 @@
static inline
void bm_access_aligned_load(struct bitmap* const bm,
- const Addr a1, const Addr a2)
+ const Addr a1, const SizeT size)
{
struct bitmap2* bm2;
-#if 0
- /* Commented out the statements below because of performance reasons. */
- tl_assert(bm);
- tl_assert(a1 < a2);
- tl_assert((a2 - a1) == 1 || (a2 - a1) == 2
- || (a2 - a1) == 4 || (a2 - a1) == 8);
- tl_assert((a1 & (a2 - a1 - 1)) == 0);
-#endif
-
bm2 = bm2_lookup_or_insert(bm, a1 >> ADDR0_BITS);
tl_assert(bm2);
- bm0_set_range(bm2->bm1.bm0_r, a1 & ADDR0_MASK, (a2 - 1) & ADDR0_MASK);
+ bm0_set_range(bm2->bm1.bm0_r, a1 & ADDR0_MASK, size);
}
static inline
void bm_access_aligned_store(struct bitmap* const bm,
- const Addr a1, const Addr a2)
+ const Addr a1, const SizeT size)
{
struct bitmap2* bm2;
-#if 0
- /* Commented out the statements below because of performance reasons. */
- tl_assert(bm);
- tl_assert(a1 < a2);
- tl_assert((a2 - a1) == 1 || (a2 - a1) == 2
- || (a2 - a1) == 4 || (a2 - a1) == 8);
- tl_assert((a1 & (a2 - a1 - 1)) == 0);
-#endif
-
bm2 = bm2_lookup_or_insert(bm, a1 >> ADDR0_BITS);
tl_assert(bm2);
- bm0_set_range(bm2->bm1.bm0_w, a1 & ADDR0_MASK, (a2 - 1) & ADDR0_MASK);
+ bm0_set_range(bm2->bm1.bm0_w, a1 & ADDR0_MASK, size);
}
void bm_access_range_load(struct bitmap* const bm,
@@ -184,13 +166,13 @@
void bm_access_load_1(struct bitmap* const bm, const Addr a1)
{
- bm_access_aligned_load(bm, a1, a1 + 1);
+ bm_access_aligned_load(bm, a1, 1);
}
void bm_access_load_2(struct bitmap* const bm, const Addr a1)
{
if ((a1 & 1) == 0)
- bm_access_aligned_load(bm, a1, a1 + 2);
+ bm_access_aligned_load(bm, a1, 2);
else
bm_access_range(bm, a1, a1 + 2, eLoad);
}
@@ -198,7 +180,7 @@
void bm_access_load_4(struct bitmap* const bm, const Addr a1)
{
if ((a1 & 3) == 0)
- bm_access_aligned_load(bm, a1, a1 + 4);
+ bm_access_aligned_load(bm, a1, 4);
else
bm_access_range(bm, a1, a1 + 4, eLoad);
}
@@ -206,11 +188,11 @@
void bm_access_load_8(struct bitmap* const bm, const Addr a1)
{
if ((a1 & 7) == 0)
- bm_access_aligned_load(bm, a1, a1 + 8);
+ bm_access_aligned_load(bm, a1, 8);
else if ((a1 & 3) == 0)
{
- bm_access_aligned_load(bm, a1 + 0, a1 + 4);
- bm_access_aligned_load(bm, a1 + 4, a1 + 8);
+ bm_access_aligned_load(bm, a1 + 0, 4);
+ bm_access_aligned_load(bm, a1 + 4, 4);
}
else
bm_access_range(bm, a1, a1 + 8, eLoad);
@@ -218,13 +200,13 @@
void bm_access_store_1(struct bitmap* const bm, const Addr a1)
{
- bm_access_aligned_store(bm, a1, a1 + 1);
+ bm_access_aligned_store(bm, a1, 1);
}
void bm_access_store_2(struct bitmap* const bm, const Addr a1)
{
if ((a1 & 1) == 0)
- bm_access_aligned_store(bm, a1, a1 + 2);
+ bm_access_aligned_store(bm, a1, 2);
else
bm_access_range(bm, a1, a1 + 2, eStore);
}
@@ -232,7 +214,7 @@
void bm_access_store_4(struct bitmap* const bm, const Addr a1)
{
if ((a1 & 3) == 0)
- bm_access_aligned_store(bm, a1, a1 + 4);
+ bm_access_aligned_store(bm, a1, 4);
else
bm_access_range(bm, a1, a1 + 4, eStore);
}
@@ -240,11 +222,11 @@
void bm_access_store_8(struct bitmap* const bm, const Addr a1)
{
if ((a1 & 7) == 0)
- bm_access_aligned_store(bm, a1, a1 + 8);
+ bm_access_aligned_store(bm, a1, 8);
else if ((a1 & 3) == 0)
{
- bm_access_aligned_store(bm, a1 + 0, a1 + 4);
- bm_access_aligned_store(bm, a1 + 4, a1 + 8);
+ bm_access_aligned_store(bm, a1 + 0, 4);
+ bm_access_aligned_store(bm, a1 + 4, 4);
}
else
bm_access_range(bm, a1, a1 + 8, eStore);
@@ -531,52 +513,27 @@
static inline
Bool bm_aligned_load_has_conflict_with(const struct bitmap* const bm,
- const Addr a1, const Addr a2)
+ const Addr a1, const SizeT size)
{
struct bitmap2* bm2;
-#if 0
- /* Commented out the statements below because of performance reasons. */
- tl_assert(bm);
- tl_assert(a1 < a2);
- tl_assert((a2 - a1) == 1 || (a2 - a1) == 2
- || (a2 - a1) == 4 || (a2 - a1) == 8);
- tl_assert((a1 & (a2 - a1 - 1)) == 0);
-#endif
-
bm2 = bm_lookup(bm, a1);
- if (bm2
- && bm0_is_any_set(bm2->bm1.bm0_w, a1 & ADDR0_MASK, (a2-1) & ADDR0_MASK))
- {
- return True;
- }
- return False;
+ return (bm2 && bm0_is_any_set(bm2->bm1.bm0_w, a1 & ADDR0_MASK, size));
}
static inline
Bool bm_aligned_store_has_conflict_with(const struct bitmap* const bm,
- const Addr a1, const Addr a2)
+ const Addr a1, const SizeT size)
{
struct bitmap2* bm2;
-#if 0
- /* Commented out the statements below because of performance reasons. */
- tl_assert(bm);
- tl_assert(a1 < a2);
- tl_assert((a2 - a1) == 1 || (a2 - a1) == 2
- || (a2 - a1) == 4 || (a2 - a1) == 8);
- tl_assert((a1 & (a2 - a1 - 1)) == 0);
-#endif
-
bm2 = bm_lookup(bm, a1);
if (bm2)
{
- const struct bitmap1* const p1 = &bm2->bm1;
-
- if (bm0_is_any_set(p1->bm0_r, a1 & ADDR0_MASK, (a2-1) & ADDR0_MASK)
- | bm0_is_any_set(p1->bm0_w, a1 & ADDR0_MASK, (a2-1) & ADDR0_MASK))
+ if (bm0_is_any_set(bm2->bm1.bm0_r, a1 & ADDR0_MASK, size)
+ | bm0_is_any_set(bm2->bm1.bm0_w, a1 & ADDR0_MASK, size))
{
return True;
}
@@ -592,13 +549,13 @@
Bool bm_load_1_has_conflict_with(const struct bitmap* const bm, const Addr a1)
{
- return bm_aligned_load_has_conflict_with(bm, a1, a1 + 1);
+ return bm_aligned_load_has_conflict_with(bm, a1, 1);
}
Bool bm_load_2_has_conflict_with(const struct bitmap* const bm, const Addr a1)
{
if ((a1 & 1) == 0)
- return bm_aligned_load_has_conflict_with(bm, a1, a1 + 2);
+ return bm_aligned_load_has_conflict_with(bm, a1, 2);
else
return bm_has_conflict_with(bm, a1, a1 + 2, eLoad);
}
@@ -606,7 +563,7 @@
Bool bm_load_4_has_conflict_with(const struct bitmap* const bm, const Addr a1)
{
if ((a1 & 3) == 0)
- return bm_aligned_load_has_conflict_with(bm, a1, a1 + 4);
+ return bm_aligned_load_has_conflict_with(bm, a1, 4);
else
return bm_has_conflict_with(bm, a1, a1 + 4, eLoad);
}
@@ -614,20 +571,20 @@
Bool bm_load_8_has_conflict_with(const struct bitmap* const bm, const Addr a1)
{
if ((a1 & 7) == 0)
- return bm_aligned_load_has_conflict_with(bm, a1, a1 + 8);
+ return bm_aligned_load_has_conflict_with(bm, a1, 8);
else
return bm_has_conflict_with(bm, a1, a1 + 8, eLoad);
}
Bool bm_store_1_has_conflict_with(const struct bitmap* const bm, const Addr a1)
{
- return bm_aligned_store_has_conflict_with(bm, a1, a1 + 1);
+ return bm_aligned_store_has_conflict_with(bm, a1, 1);
}
Bool bm_store_2_has_conflict_with(const struct bitmap* const bm, const Addr a1)
{
if ((a1 & 1) == 0)
- return bm_aligned_store_has_conflict_with(bm, a1, a1 + 2);
+ return bm_aligned_store_has_conflict_with(bm, a1, 2);
else
return bm_has_conflict_with(bm, a1, a1 + 2, eStore);
}
@@ -635,7 +592,7 @@
Bool bm_store_4_has_conflict_with(const struct bitmap* const bm, const Addr a1)
{
if ((a1 & 3) == 0)
- return bm_aligned_store_has_conflict_with(bm, a1, a1 + 4);
+ return bm_aligned_store_has_conflict_with(bm, a1, 4);
else
return bm_has_conflict_with(bm, a1, a1 + 4, eStore);
}
@@ -643,7 +600,7 @@
Bool bm_store_8_has_conflict_with(const struct bitmap* const bm, const Addr a1)
{
if ((a1 & 7) == 0)
- return bm_aligned_store_has_conflict_with(bm, a1, a1 + 8);
+ return bm_aligned_store_has_conflict_with(bm, a1, 8);
else
return bm_has_conflict_with(bm, a1, a1 + 8, eStore);
}
Modified: trunk/exp-drd/drd_bitmap.h
===================================================================
--- trunk/exp-drd/drd_bitmap.h 2008-03-15 10:28:36 UTC (rev 7687)
+++ trunk/exp-drd/drd_bitmap.h 2008-03-15 11:42:34 UTC (rev 7688)
@@ -98,17 +98,18 @@
bm0[a >> BITS_PER_BITS_PER_UWORD] |= (UWord)1 << UWORD_LSB(a);
}
-/** Set all of the addresses in range a1..a2 (inclusive) in bitmap bm0. */
-static __inline__ void bm0_set_range(UWord* bm0, const Addr a1, const Addr a2)
+/** Set all of the addresses in range [ a1 .. a1 + size [ in bitmap bm0. */
+static __inline__ void bm0_set_range(UWord* bm0,
+ const Addr a1, const SizeT size)
{
#if 0
tl_assert(a1 < ADDR0_COUNT);
- tl_assert(a2 < ADDR0_COUNT);
- tl_assert(a1 <= a2);
- tl_assert(UWORD_MSB(a1) == UWORD_MSB(a2));
+ tl_assert(size > 0);
+ tl_assert(a1 + size <= ADDR0_COUNT);
+ tl_assert(UWORD_MSB(a1) == UWORD_MSB(a1 + size - 1));
#endif
bm0[a1 >> BITS_PER_BITS_PER_UWORD]
- |= ((UWord)2 << UWORD_LSB(a2)) - ((UWord)1 << UWORD_LSB(a1));
+ |= (((UWord)1 << size) - 1) << UWORD_LSB(a1);
}
static __inline__ void bm0_clear(UWord* bm0, const Addr a)
@@ -123,18 +124,18 @@
return (bm0[a >> BITS_PER_BITS_PER_UWORD] & ((UWord)1 << UWORD_LSB(a)));
}
-/** Return true if any of the bits a1..a2 (inclusive) are set in bm0. */
+/** Return true if any of the bits [ a1 .. a1+size [ are set in bm0. */
static __inline__ UWord bm0_is_any_set(const UWord* bm0,
- const Addr a1, const Addr a2)
+ const Addr a1, const SizeT size)
{
#if 0
tl_assert(a1 < ADDR0_COUNT);
- tl_assert(a2 < ADDR0_COUNT);
- tl_assert(a1 <= a2);
- tl_assert(UWORD_MSB(a1) == UWORD_MSB(a2));
+ tl_assert(size > 0);
+ tl_assert(a1 + size <= ADDR0_COUNT);
+ tl_assert(UWORD_MSB(a1) == UWORD_MSB(a1 + size - 1));
#endif
return (bm0[a1 >> BITS_PER_BITS_PER_UWORD]
- & (((UWord)2 << UWORD_LSB(a2)) - ((UWord)1 << UWORD_LSB(a1))));
+ & ((((UWord)1 << size) - 1) << UWORD_LSB(a1)));
}
struct bitmap2
|
|
From: <sv...@va...> - 2008-03-15 10:28:31
|
Author: bart
Date: 2008-03-15 10:28:36 +0000 (Sat, 15 Mar 2008)
New Revision: 7687
Log:
Fixed compiler warning.
Modified:
trunk/exp-drd/drd_main.c
Modified: trunk/exp-drd/drd_main.c
===================================================================
--- trunk/exp-drd/drd_main.c 2008-03-15 10:23:53 UTC (rev 7686)
+++ trunk/exp-drd/drd_main.c 2008-03-15 10:28:36 UTC (rev 7687)
@@ -171,10 +171,11 @@
static void drd_report_race(const Addr addr, const SizeT size,
const BmAccessTypeT access_type)
{
+ DataRaceErrInfo drei;
+
if (drd_is_suppressed(addr, addr + size))
return;
- DataRaceErrInfo drei;
drei.tid = VG_(get_running_tid)();
drei.addr = addr;
drei.size = size;
|
|
From: <sv...@va...> - 2008-03-15 10:23:51
|
Author: bart
Date: 2008-03-15 10:23:53 +0000 (Sat, 15 Mar 2008)
New Revision: 7686
Log:
Because of a recent change the glibc 2.0 and glibc 2.x (x>=1) redirections are now identical. Removed the duplicate redirections.
Modified:
trunk/exp-drd/drd_pthread_intercepts.c
Modified: trunk/exp-drd/drd_pthread_intercepts.c
===================================================================
--- trunk/exp-drd/drd_pthread_intercepts.c 2008-03-15 08:34:23 UTC (rev 7685)
+++ trunk/exp-drd/drd_pthread_intercepts.c 2008-03-15 10:23:53 UTC (rev 7686)
@@ -639,23 +639,6 @@
// sem_init
-PTH_FUNC(int, semZuinitZAGLIBCZu2Zd0, // sem_init@GLIBC_2.0
- sem_t *sem,
- int pshared,
- unsigned int value)
-{
- int ret;
- int res;
- OrigFn fn;
- VALGRIND_GET_ORIG_FN(fn);
- VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__PRE_SEM_INIT,
- sem, pshared, value, 0, 0);
- CALL_FN_W_WWW(ret, fn, sem, pshared, value);
- VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__POST_SEM_INIT,
- sem, 0, 0, 0, 0);
- return ret;
-}
-
PTH_FUNC(int, semZuinitZa, // sem_init*
sem_t *sem,
int pshared,
@@ -674,21 +657,6 @@
}
// sem_destroy
-PTH_FUNC(int, semZudestroyZAGLIBCZu2Zd0, // sem_destroy@GLIBC_2.0
- sem_t *sem)
-{
- int ret;
- int res;
- OrigFn fn;
- VALGRIND_GET_ORIG_FN(fn);
- VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__PRE_SEM_DESTROY,
- sem, 0, 0, 0, 0);
- CALL_FN_W_W(ret, fn, sem);
- VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__POST_SEM_DESTROY,
- sem, 0, 0, 0, 0);
- return ret;
-}
-
PTH_FUNC(int, semZudestroyZa, // sem_destroy*
sem_t *sem)
{
@@ -705,22 +673,6 @@
}
// sem_wait
-PTH_FUNC(int, semZuwaitZAGLIBCZu2Zd0, // sem_wait@GLIBC_2.0
- sem_t *sem)
-{
- int ret;
- int res;
- OrigFn fn;
- VALGRIND_GET_ORIG_FN(fn);
- VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__PRE_SEM_WAIT,
- sem, 0, 0, 0, 0);
- CALL_FN_W_W(ret, fn, sem);
- VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__POST_SEM_WAIT,
- sem, ret == 0, 0, 0, 0);
- return ret;
-}
-
-// sem_wait
PTH_FUNC(int, semZuwaitZa, // sem_wait*
sem_t *sem)
{
@@ -737,21 +689,6 @@
}
// sem_trywait
-PTH_FUNC(int, semZutrywaitZAGLIBCZu2Zd0, // sem_trywait@GLIBC_2.0
- sem_t *sem)
-{
- int ret;
- int res;
- OrigFn fn;
- VALGRIND_GET_ORIG_FN(fn);
- VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__PRE_SEM_WAIT,
- sem, 0, 0, 0, 0);
- CALL_FN_W_W(ret, fn, sem);
- VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__POST_SEM_WAIT,
- sem, ret == 0, 0, 0, 0);
- return ret;
-}
-
PTH_FUNC(int, semZutrywaitZa, // sem_trywait*
sem_t *sem)
{
@@ -784,22 +721,6 @@
}
// sem_post
-PTH_FUNC(int, semZupostZAGLIBCZu2Zd0, // sem_post@GLIBC_2.0
- sem_t *sem)
-{
- int ret;
- int res;
- OrigFn fn;
- VALGRIND_GET_ORIG_FN(fn);
- VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__PRE_SEM_POST,
- sem, 0, 0, 0, 0);
- CALL_FN_W_W(ret, fn, sem);
- VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__POST_SEM_POST,
- sem, ret == 0, 0, 0, 0);
- return ret;
-}
-
-// sem_post
PTH_FUNC(int, semZupostZa, // sem_post*
sem_t *sem)
{
|
|
From: <sv...@va...> - 2008-03-15 08:34:22
|
Author: bart
Date: 2008-03-15 08:34:23 +0000 (Sat, 15 Mar 2008)
New Revision: 7685
Log:
Moved drd_is_suppressed() call inside drd_report_race().
Modified:
trunk/exp-drd/drd_main.c
Modified: trunk/exp-drd/drd_main.c
===================================================================
--- trunk/exp-drd/drd_main.c 2008-03-15 08:11:03 UTC (rev 7684)
+++ trunk/exp-drd/drd_main.c 2008-03-15 08:34:23 UTC (rev 7685)
@@ -171,6 +171,9 @@
static void drd_report_race(const Addr addr, const SizeT size,
const BmAccessTypeT access_type)
{
+ if (drd_is_suppressed(addr, addr + size))
+ return;
+
DataRaceErrInfo drei;
drei.tid = VG_(get_running_tid)();
drei.addr = addr;
@@ -202,8 +205,7 @@
}
sg = running_thread_get_segment();
bm_access_range_load(sg->bm, addr, addr + size);
- if (bm_load_has_conflict_with(thread_get_danger_set(), addr, addr + size)
- && ! drd_is_suppressed(addr, addr + size))
+ if (bm_load_has_conflict_with(thread_get_danger_set(), addr, addr + size))
{
drd_report_race(addr, size, eLoad);
}
@@ -222,8 +224,7 @@
}
sg = running_thread_get_segment();
bm_access_load_1(sg->bm, addr);
- if (bm_load_1_has_conflict_with(thread_get_danger_set(), addr)
- && ! drd_is_suppressed(addr, addr + 1))
+ if (bm_load_1_has_conflict_with(thread_get_danger_set(), addr))
{
drd_report_race(addr, 1, eLoad);
}
@@ -242,8 +243,7 @@
}
sg = running_thread_get_segment();
bm_access_load_2(sg->bm, addr);
- if (bm_load_2_has_conflict_with(thread_get_danger_set(), addr)
- && ! drd_is_suppressed(addr, addr + 2))
+ if (bm_load_2_has_conflict_with(thread_get_danger_set(), addr))
{
drd_report_race(addr, 2, eLoad);
}
@@ -262,8 +262,7 @@
}
sg = running_thread_get_segment();
bm_access_load_4(sg->bm, addr);
- if (bm_load_4_has_conflict_with(thread_get_danger_set(), addr)
- && ! drd_is_suppressed(addr, addr + 4))
+ if (bm_load_4_has_conflict_with(thread_get_danger_set(), addr))
{
drd_report_race(addr, 4, eLoad);
}
@@ -282,8 +281,7 @@
}
sg = running_thread_get_segment();
bm_access_load_8(sg->bm, addr);
- if (bm_load_8_has_conflict_with(thread_get_danger_set(), addr)
- && ! drd_is_suppressed(addr, addr + 8))
+ if (bm_load_8_has_conflict_with(thread_get_danger_set(), addr))
{
drd_report_race(addr, 8, eLoad);
}
@@ -309,8 +307,7 @@
}
sg = running_thread_get_segment();
bm_access_range_store(sg->bm, addr, addr + size);
- if (bm_store_has_conflict_with(thread_get_danger_set(), addr, addr + size)
- && ! drd_is_suppressed(addr, addr + size))
+ if (bm_store_has_conflict_with(thread_get_danger_set(), addr, addr + size))
{
drd_report_race(addr, size, eStore);
}
@@ -329,8 +326,7 @@
}
sg = running_thread_get_segment();
bm_access_store_1(sg->bm, addr);
- if (bm_store_1_has_conflict_with(thread_get_danger_set(), addr)
- && ! drd_is_suppressed(addr, addr + 1))
+ if (bm_store_1_has_conflict_with(thread_get_danger_set(), addr))
{
drd_report_race(addr, 1, eStore);
}
@@ -349,8 +345,7 @@
}
sg = running_thread_get_segment();
bm_access_store_2(sg->bm, addr);
- if (bm_store_2_has_conflict_with(thread_get_danger_set(), addr)
- && ! drd_is_suppressed(addr, addr + 2))
+ if (bm_store_2_has_conflict_with(thread_get_danger_set(), addr))
{
drd_report_race(addr, 2, eStore);
}
@@ -369,8 +364,7 @@
}
sg = running_thread_get_segment();
bm_access_store_4(sg->bm, addr);
- if (bm_store_4_has_conflict_with(thread_get_danger_set(), addr)
- && ! drd_is_suppressed(addr, addr + 4))
+ if (bm_store_4_has_conflict_with(thread_get_danger_set(), addr))
{
drd_report_race(addr, 4, eStore);
}
@@ -389,8 +383,7 @@
}
sg = running_thread_get_segment();
bm_access_store_8(sg->bm, addr);
- if (bm_store_8_has_conflict_with(thread_get_danger_set(), addr)
- && ! drd_is_suppressed(addr, addr + 8))
+ if (bm_store_8_has_conflict_with(thread_get_danger_set(), addr))
{
drd_report_race(addr, 8, eStore);
}
|
|
From: <sv...@va...> - 2008-03-15 08:11:00
|
Author: bart Date: 2008-03-15 08:11:03 +0000 (Sat, 15 Mar 2008) New Revision: 7684 Log: Made indentation in the DRD source code uniform: indentation size is now two spaces in all soure files. Modified: trunk/exp-drd/drd_bitmap.c trunk/exp-drd/drd_clientreq.c trunk/exp-drd/drd_error.c trunk/exp-drd/drd_error.h trunk/exp-drd/drd_main.c trunk/exp-drd/drd_malloc_wrappers.c trunk/exp-drd/drd_mutex.c trunk/exp-drd/drd_pthread_intercepts.c trunk/exp-drd/drd_rwlock.c trunk/exp-drd/drd_segment.c trunk/exp-drd/drd_suppression.c trunk/exp-drd/drd_thread.c trunk/exp-drd/tests/pth_create_chain.c [... diff too large to include ...] |
|
From: <dj...@go...> - 2008-03-15 05:29:23
|
Hi. Small typo fix.
[I couldn't find docs on any requirements for patch submissions.
Is there any?]
Index: m_transtab.c
===================================================================
--- m_transtab.c (revision 7678)
+++ m_transtab.c (working copy)
@@ -184,12 +184,12 @@
youngest sector is recorded, and new translations are put into that
sector. When it fills up, we move along to the next sector and
start to fill that up, wrapping around at the end of the array.
- That way, once all N_TC_SECTORS have been bought into use for the
+ That way, once all N_SECTORS have been bought into use for the
first time, and are full, we then re-use the oldest sector,
endlessly.
When running, youngest sector should be between >= 0 and <
- N_TC_SECTORS. The initial -1 value indicates the TT/TC system is
+ N_SECTORS. The initial -1 value indicates the TT/TC system is
not yet initialised.
*/
static Sector sectors[N_SECTORS];
|
|
From: Tom H. <th...@cy...> - 2008-03-15 05:18:39
|
Nightly build on alvis ( i686, Red Hat 7.3 ) started at 2008-03-15 03:15:02 GMT Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 378 tests, 78 stderr failures, 1 stdout failure, 29 post failures == memcheck/tests/addressable (stderr) memcheck/tests/badjump (stderr) memcheck/tests/describe-block (stderr) memcheck/tests/erringfds (stderr) memcheck/tests/leak-0 (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/leak-pool-0 (stderr) memcheck/tests/leak-pool-1 (stderr) memcheck/tests/leak-pool-2 (stderr) memcheck/tests/leak-pool-3 (stderr) memcheck/tests/leak-pool-4 (stderr) memcheck/tests/leak-pool-5 (stderr) memcheck/tests/leak-regroot (stderr) memcheck/tests/leak-tree (stderr) memcheck/tests/long_namespace_xml (stderr) memcheck/tests/lsframe1 (stderr) memcheck/tests/lsframe2 (stderr) memcheck/tests/malloc_free_fill (stderr) memcheck/tests/match-overrun (stderr) memcheck/tests/noisy_child (stderr) memcheck/tests/partial_load_dflt (stderr) memcheck/tests/partial_load_ok (stderr) memcheck/tests/partiallydefinedeq (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/sigkill (stderr) memcheck/tests/stack_changes (stderr) memcheck/tests/varinfo1 (stderr) memcheck/tests/varinfo2 (stderr) memcheck/tests/varinfo3 (stderr) memcheck/tests/varinfo4 (stderr) memcheck/tests/varinfo5 (stderr) memcheck/tests/varinfo6 (stderr) memcheck/tests/x86/bug152022 (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) memcheck/tests/x86/xor-undef-x86 (stderr) memcheck/tests/xml1 (stderr) massif/tests/alloc-fns-A (post) massif/tests/alloc-fns-B (post) massif/tests/basic (post) massif/tests/basic2 (post) massif/tests/big-alloc (post) massif/tests/culling1 (stderr) massif/tests/culling2 (stderr) massif/tests/custom_alloc (post) massif/tests/deep-A (post) massif/tests/deep-B (stderr) massif/tests/deep-B (post) massif/tests/deep-C (stderr) massif/tests/deep-C (post) massif/tests/deep-D (post) massif/tests/ignoring (post) massif/tests/insig (post) massif/tests/long-names (post) massif/tests/long-time (post) massif/tests/new-cpp (post) massif/tests/null (post) massif/tests/one (post) massif/tests/overloaded-new (post) massif/tests/peak (post) massif/tests/peak2 (stderr) massif/tests/peak2 (post) massif/tests/realloc (stderr) massif/tests/realloc (post) massif/tests/thresholds_0_0 (post) massif/tests/thresholds_0_10 (post) massif/tests/thresholds_10_0 (post) massif/tests/thresholds_10_10 (post) massif/tests/thresholds_5_0 (post) massif/tests/thresholds_5_10 (post) massif/tests/zero1 (post) massif/tests/zero2 (post) none/tests/blockfault (stderr) none/tests/faultstatus (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) none/tests/shell (stderr) none/tests/shell_valid1 (stderr) none/tests/shell_valid2 (stderr) none/tests/shell_valid3 (stderr) helgrind/tests/hg01_all_ok (stderr) helgrind/tests/hg02_deadlock (stderr) helgrind/tests/hg03_inherit (stderr) helgrind/tests/hg04_race (stderr) helgrind/tests/hg05_race2 (stderr) helgrind/tests/hg06_readshared (stderr) helgrind/tests/tc01_simple_race (stderr) helgrind/tests/tc02_simple_tls (stderr) helgrind/tests/tc03_re_excl (stderr) helgrind/tests/tc05_simple_race (stderr) helgrind/tests/tc06_two_races (stderr) helgrind/tests/tc07_hbl1 (stderr) helgrind/tests/tc08_hbl2 (stderr) helgrind/tests/tc09_bad_unlock (stderr) helgrind/tests/tc11_XCHG (stderr) helgrind/tests/tc12_rwl_trivial (stderr) helgrind/tests/tc14_laog_dinphils (stderr) helgrind/tests/tc16_byterace (stderr) helgrind/tests/tc17_sembar (stderr) helgrind/tests/tc18_semabuse (stderr) helgrind/tests/tc19_shadowmem (stderr) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc21_pthonce (stderr) helgrind/tests/tc22_exit_w_lock (stderr) helgrind/tests/tc23_bogus_condwait (stderr) helgrind/tests/tc24_nonzero_sem (stderr) exp-drd/tests/tc09_bad_unlock (stderr) exp-drd/tests/tc12_rwl_trivial (stderr) |
|
From: Tom H. <th...@cy...> - 2008-03-15 04:24:13
|
Nightly build on lloyd ( x86_64, Fedora 7 ) started at 2008-03-15 03:05:08 GMT Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 415 tests, 10 stderr failures, 2 stdout failures, 0 post failures == memcheck/tests/pointer-trace (stderr) memcheck/tests/vcpu_fnfns (stdout) memcheck/tests/x86/scalar (stderr) none/tests/faultstatus (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc22_exit_w_lock (stderr) exp-drd/tests/omp_matinv (stderr) exp-drd/tests/omp_matinv_racy (stderr) exp-drd/tests/omp_prime_racy (stderr) exp-drd/tests/pth_detached2 (stderr) |
|
From: Tom H. <th...@cy...> - 2008-03-15 03:53:28
|
Nightly build on aston ( x86_64, Fedora Core 5 ) started at 2008-03-15 03:20:07 GMT Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 421 tests, 13 stderr failures, 1 stdout failure, 0 post failures == memcheck/tests/malloc_free_fill (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/x86/scalar (stderr) none/tests/blockfault (stderr) none/tests/faultstatus (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc21_pthonce (stderr) helgrind/tests/tc22_exit_w_lock (stderr) exp-drd/tests/omp_matinv (stderr) exp-drd/tests/omp_matinv_racy (stderr) exp-drd/tests/omp_prime_racy (stderr) exp-drd/tests/pth_detached2 (stderr) |
|
From: Tom H. <th...@cy...> - 2008-03-15 03:40:19
|
Nightly build on trojan ( x86_64, Fedora Core 6 ) started at 2008-03-15 03:25:06 GMT Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 419 tests, 12 stderr failures, 5 stdout failures, 0 post failures == memcheck/tests/pointer-trace (stderr) memcheck/tests/vcpu_fnfns (stdout) memcheck/tests/x86/bug133694 (stdout) memcheck/tests/x86/bug133694 (stderr) memcheck/tests/x86/scalar (stderr) none/tests/cmdline1 (stdout) none/tests/cmdline2 (stdout) none/tests/faultstatus (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc21_pthonce (stderr) helgrind/tests/tc22_exit_w_lock (stderr) exp-drd/tests/omp_matinv (stderr) exp-drd/tests/omp_matinv_racy (stderr) exp-drd/tests/omp_prime_racy (stderr) exp-drd/tests/pth_detached2 (stderr) |
|
From: Tom H. <th...@cy...> - 2008-03-15 03:33:22
|
Nightly build on dellow ( x86_64, Fedora 8 ) started at 2008-03-15 03:10:05 GMT Results differ from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 415 tests, 12 stderr failures, 3 stdout failures, 0 post failures == memcheck/tests/pointer-trace (stderr) memcheck/tests/vcpu_fnfns (stdout) memcheck/tests/x86/scalar (stderr) none/tests/faultstatus (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) none/tests/pth_cvsimple (stdout) helgrind/tests/tc18_semabuse (stderr) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc21_pthonce (stderr) helgrind/tests/tc22_exit_w_lock (stderr) exp-drd/tests/omp_matinv (stderr) exp-drd/tests/omp_matinv_racy (stderr) exp-drd/tests/omp_prime_racy (stderr) exp-drd/tests/pth_detached2 (stderr) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 415 tests, 12 stderr failures, 2 stdout failures, 0 post failures == memcheck/tests/pointer-trace (stderr) memcheck/tests/vcpu_fnfns (stdout) memcheck/tests/x86/scalar (stderr) none/tests/faultstatus (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) helgrind/tests/tc18_semabuse (stderr) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc21_pthonce (stderr) helgrind/tests/tc22_exit_w_lock (stderr) exp-drd/tests/omp_matinv (stderr) exp-drd/tests/omp_matinv_racy (stderr) exp-drd/tests/omp_prime_racy (stderr) exp-drd/tests/pth_detached2 (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Sat Mar 15 03:21:50 2008 --- new.short Sat Mar 15 03:33:25 2008 *************** *** 8,10 **** ! == 415 tests, 12 stderr failures, 2 stdout failures, 0 post failures == memcheck/tests/pointer-trace (stderr) --- 8,10 ---- ! == 415 tests, 12 stderr failures, 3 stdout failures, 0 post failures == memcheck/tests/pointer-trace (stderr) *************** *** 15,16 **** --- 15,17 ---- none/tests/mremap2 (stdout) + none/tests/pth_cvsimple (stdout) helgrind/tests/tc18_semabuse (stderr) |
|
From: Tom H. <th...@cy...> - 2008-03-15 03:17:39
|
Nightly build on gill ( x86_64, Fedora Core 2 ) started at 2008-03-15 03:00:09 GMT Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 418 tests, 32 stderr failures, 3 stdout failures, 0 post failures == memcheck/tests/malloc_free_fill (stderr) memcheck/tests/pointer-trace (stderr) memcheck/tests/stack_switch (stderr) memcheck/tests/varinfo6 (stderr) memcheck/tests/x86/scalar (stderr) memcheck/tests/x86/scalar_supp (stderr) none/tests/amd64/insn_ssse3 (stdout) none/tests/amd64/insn_ssse3 (stderr) none/tests/amd64/ssse3_misaligned (stderr) none/tests/blockfault (stderr) none/tests/faultstatus (stderr) none/tests/fdleak_fcntl (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) none/tests/x86/insn_ssse3 (stdout) none/tests/x86/insn_ssse3 (stderr) none/tests/x86/ssse3_misaligned (stderr) helgrind/tests/hg01_all_ok (stderr) helgrind/tests/hg02_deadlock (stderr) helgrind/tests/hg03_inherit (stderr) helgrind/tests/hg04_race (stderr) helgrind/tests/hg05_race2 (stderr) helgrind/tests/tc01_simple_race (stderr) helgrind/tests/tc05_simple_race (stderr) helgrind/tests/tc06_two_races (stderr) helgrind/tests/tc09_bad_unlock (stderr) helgrind/tests/tc14_laog_dinphils (stderr) helgrind/tests/tc16_byterace (stderr) helgrind/tests/tc17_sembar (stderr) helgrind/tests/tc19_shadowmem (stderr) helgrind/tests/tc20_verifywrap (stderr) helgrind/tests/tc21_pthonce (stderr) helgrind/tests/tc22_exit_w_lock (stderr) helgrind/tests/tc23_bogus_condwait (stderr) exp-drd/tests/pth_create_chain (stderr) |
|
From: <sv...@va...> - 2008-03-15 02:38:49
|
Author: sewardj
Date: 2008-03-15 02:38:00 +0000 (Sat, 15 Mar 2008)
New Revision: 7683
Log:
In error messages, describe race addresses that fall into a malloc'd
block. This & the use of VG_(get_data_description) means almost all
race addresses now get a description of some kind.
Modified:
branches/HGDEV/helgrind/hg_main.c
Modified: branches/HGDEV/helgrind/hg_main.c
===================================================================
--- branches/HGDEV/helgrind/hg_main.c 2008-03-15 02:36:22 UTC (rev 7682)
+++ branches/HGDEV/helgrind/hg_main.c 2008-03-15 02:38:00 UTC (rev 7683)
@@ -8547,8 +8547,13 @@
SVal old_state;
ExeContext* mb_lastlock;
Thread* thr;
- Char descr1[96];
- Char descr2[96];
+ /* Describe addr in a variable, or data sym */
+ HChar descr1[96];
+ HChar descr2[96];
+ /* Describe addr in a malloc'd block */
+ SizeT block_szB;
+ OffT block_rwoffset;
+ ExeContext* block_allocdAt;
} Race;
struct {
Thread* thr; /* doing the freeing */
@@ -8616,8 +8621,28 @@
tl_assert(xe);
if (xe->tag == XE_Race) {
+ MallocMeta* md;
+
tl_assert(sizeof(xe->XE.Race.descr1) == sizeof(xe->XE.Race.descr2));
+
+ /* Perhaps in a malloc'd block? */
xe->XE.Race.descr1[0] = xe->XE.Race.descr2[0] = 0;
+ VG_(HT_ResetIter)(hg_mallocmeta_table);
+ while ( (md = VG_(HT_Next)(hg_mallocmeta_table)) ) {
+ if (md->payload <= xe->XE.Race.data_addr
+ && xe->XE.Race.data_addr < md->payload + md->szB) {
+ xe->XE.Race.block_szB
+ = md->szB;
+ xe->XE.Race.block_rwoffset
+ = (Word)xe->XE.Race.data_addr - (Word)md->payload;
+ xe->XE.Race.block_allocdAt
+ = md->where;
+ goto out;
+ }
+ }
+
+ /* Perhaps the variable type/location data describes it? */
+ xe->XE.Race.descr1[0] = xe->XE.Race.descr2[0] = 0;
if (VG_(get_data_description)(
&xe->XE.Race.descr1[0],
&xe->XE.Race.descr2[0],
@@ -8627,9 +8652,15 @@
[ sizeof(xe->XE.Race.descr1)-1 ] == 0);
tl_assert( xe->XE.Race.descr2
[ sizeof(xe->XE.Race.descr2)-1 ] == 0);
+ goto out;
}
- }
+ /* No description. Bummer. */
+ xe->XE.Race.descr1[0] = xe->XE.Race.descr2[0] = 0;
+
+ } /* if (xe->tag == XE_Race) */
+
+ out:
return sizeof(XError);
}
@@ -8641,15 +8672,18 @@
tl_assert( is_sane_Thread(thr) );
init_XError(&xe);
xe.tag = XE_Race;
- xe.XE.Race.data_addr = data_addr;
- xe.XE.Race.szB = szB;
- xe.XE.Race.isWrite = isWrite;
- xe.XE.Race.new_state = new_sv;
- xe.XE.Race.old_state = old_sv;
- xe.XE.Race.mb_lastlock = mb_lastlock;
- xe.XE.Race.thr = thr;
- xe.XE.Race.descr1[0] = 0;
- xe.XE.Race.descr2[0] = 0;
+ xe.XE.Race.data_addr = data_addr;
+ xe.XE.Race.szB = szB;
+ xe.XE.Race.isWrite = isWrite;
+ xe.XE.Race.new_state = new_sv;
+ xe.XE.Race.old_state = old_sv;
+ xe.XE.Race.mb_lastlock = mb_lastlock;
+ xe.XE.Race.thr = thr;
+ xe.XE.Race.descr1[0] = 0;
+ xe.XE.Race.descr2[0] = 0;
+ xe.XE.Race.block_szB = 0;
+ xe.XE.Race.block_rwoffset = 0;
+ xe.XE.Race.block_allocdAt = NULL;
// FIXME: tid vs thr
tl_assert(isWrite == False || isWrite == True);
@@ -9199,6 +9233,15 @@
VG_(message)(Vg_UserMsg, " %s", &xe->XE.Race.descr1);
if (xe->XE.Race.descr2[0] != 0)
VG_(message)(Vg_UserMsg, " %s", &xe->XE.Race.descr2);
+ if (xe->XE.Race.block_allocdAt) {
+ VG_(message)(Vg_UserMsg,
+ " Location 0x%lx is %,ld bytes inside a block of "
+ "size %,lu alloc'd",
+ xe->XE.Race.data_addr,
+ xe->XE.Race.block_rwoffset, xe->XE.Race.block_szB
+ );
+ VG_(pp_ExeContext)( xe->XE.Race.block_allocdAt );
+ }
break; /* case XE_Race */
} /* case XE_Race */
|
|
From: <sv...@va...> - 2008-03-15 02:36:19
|
Author: sewardj
Date: 2008-03-15 02:36:22 +0000 (Sat, 15 Mar 2008)
New Revision: 7682
Log:
VG_(get_data_description): if no description found from the Dwarf3
info, use VG_(get_datasym_and_offset) to at least see if it is in a
data symbol. This means callers can avoid the hassle of calling the
latter function directly. MERGE TO TRUNK.
Modified:
branches/HGDEV/coregrind/m_debuginfo/debuginfo.c
Modified: branches/HGDEV/coregrind/m_debuginfo/debuginfo.c
===================================================================
--- branches/HGDEV/coregrind/m_debuginfo/debuginfo.c 2008-03-15 00:37:41 UTC (rev 7681)
+++ branches/HGDEV/coregrind/m_debuginfo/debuginfo.c 2008-03-15 02:36:22 UTC (rev 7682)
@@ -2073,6 +2073,28 @@
}
}
if (!found) {
+ /* Last ditch attempt at identification if it's not on any
+ thread's stack *and* it isn't a global variable: see if it is
+ inside a data symbol. That's better than returning
+ completely emptyhanded. Get the name temporarily into dname2
+ and then format the message properly in dname1. */
+ OffT datasym_offset = 0;
+ dname2[0] = 0;
+ if (VG_(get_datasym_and_offset)( data_addr, &dname2[0], n_dname-1,
+ &datasym_offset )) {
+ dname2[n_dname-1] = 0;
+ dname1[0] = 0;
+ VG_(snprintf)(
+ dname1, n_dname,
+ "Address 0x%llx is %llu bytes "
+ "inside data symbol \"%t\"",
+ (ULong)data_addr, (ULong)datasym_offset, &dname2[0]
+ );
+ dname2[0] = 0; /* need to pretend we didn't mess with it */
+ dname1[n_dname-1] = 0;
+ return True;
+ }
+ /* Ok, we really didn't find anything useful. */
dname1[n_dname-1] = dname2[n_dname-1] = 0;
return False;
}
@@ -2139,6 +2161,7 @@
/* We didn't find anything useful. */
dname1[n_dname-1] = dname2[n_dname-1] = 0;
return False;
+
# undef N_FRAMES
}
|
|
From: <sv...@va...> - 2008-03-15 00:37:37
|
Author: sewardj
Date: 2008-03-15 00:37:41 +0000 (Sat, 15 Mar 2008)
New Revision: 7681
Log:
Move the call to VG_(get_data_description) to the correct place. This
fixes some very strange performance effects observed whilst running
Firefox built from source. MERGE TO TRUNK.
Modified:
branches/HGDEV/helgrind/hg_main.c
Modified: branches/HGDEV/helgrind/hg_main.c
===================================================================
--- branches/HGDEV/helgrind/hg_main.c 2008-03-15 00:21:44 UTC (rev 7680)
+++ branches/HGDEV/helgrind/hg_main.c 2008-03-15 00:37:41 UTC (rev 7681)
@@ -8612,11 +8612,24 @@
/* Updates the copy with address info if necessary. */
static UInt hg_update_extra ( Error* err )
{
- XError* extra = (XError*)VG_(get_error_extra)(err);
- tl_assert(extra);
- //if (extra != NULL && Undescribed == extra->addrinfo.akind) {
- // describe_addr ( VG_(get_error_address)(err), &(extra->addrinfo) );
- //}
+ XError* xe = (XError*)VG_(get_error_extra)(err);
+ tl_assert(xe);
+
+ if (xe->tag == XE_Race) {
+ tl_assert(sizeof(xe->XE.Race.descr1) == sizeof(xe->XE.Race.descr2));
+ xe->XE.Race.descr1[0] = xe->XE.Race.descr2[0] = 0;
+ if (VG_(get_data_description)(
+ &xe->XE.Race.descr1[0],
+ &xe->XE.Race.descr2[0],
+ sizeof(xe->XE.Race.descr1)-1,
+ xe->XE.Race.data_addr )) {
+ tl_assert( xe->XE.Race.descr1
+ [ sizeof(xe->XE.Race.descr1)-1 ] == 0);
+ tl_assert( xe->XE.Race.descr2
+ [ sizeof(xe->XE.Race.descr2)-1 ] == 0);
+ }
+ }
+
return sizeof(XError);
}
@@ -8635,6 +8648,9 @@
xe.XE.Race.old_state = old_sv;
xe.XE.Race.mb_lastlock = mb_lastlock;
xe.XE.Race.thr = thr;
+ xe.XE.Race.descr1[0] = 0;
+ xe.XE.Race.descr2[0] = 0;
+
// FIXME: tid vs thr
tl_assert(isWrite == False || isWrite == True);
tl_assert(szB == 8 || szB == 4 || szB == 2 || szB == 1);
@@ -8653,8 +8669,8 @@
}
}
-
- if (1) { // Do not print an error if it is expected or benign.
+ /* Do not collect this error if it is expected or benign */
+ if (1) {
ExpectedError *expected_error = get_expected_error((Word)data_addr);
if (expected_error) {
expected_error->detected = True;
@@ -8662,21 +8678,6 @@
}
}
-
- /* Ok, so we're really going to collect this race. */
- tl_assert(sizeof(xe.XE.Race.descr1) == sizeof(xe.XE.Race.descr2));
- xe.XE.Race.descr1[0] = xe.XE.Race.descr2[0] = 0;
- if (VG_(get_data_description)(
- &xe.XE.Race.descr1[0],
- &xe.XE.Race.descr2[0],
- sizeof(xe.XE.Race.descr1)-1,
- data_addr )) {
- tl_assert( xe.XE.Race.descr1
- [ sizeof(xe.XE.Race.descr1)-1 ] == 0);
- tl_assert( xe.XE.Race.descr2
- [ sizeof(xe.XE.Race.descr2)-1 ] == 0);
- }
-
VG_(maybe_record_error)( map_threads_reverse_lookup_SLOW(thr),
XE_Race, data_addr, NULL, &xe );
}
|
|
From: Philippe W. <phi...@sk...> - 2008-03-15 00:22:46
|
----- Original Message ----- From: "Doug Evans" <dj...@go...> To: <val...@li...> Sent: Saturday, March 15, 2008 12:35 AM Subject: [Valgrind-developers] gdb stub support > Hi. I've found a couple of references to work on adding a gdb stub to > valgrind but I don't see anything in the repository. What's the state > of this work and is there any source I can play with. [I've hacked on > gdb and written gdb stubs in the past and am interested in helping > out.] Hello Doug, I started working on this in February, and obtained a "basic" working gdb stub. For more details about the current state, see my post of 17 Feb 2008. All this work was done based on valgrind 3.3.0, using gdbserver code from gdb 6.7.. I have been (privately) contacted by someone telling that a contribution of a port (and a stub more complete than what I did) should be contributed soon. Since then, I have put this work on hold, waiting for the above to be integrated, and continue based on that (e.g. to implement breakpoints which are done neither in what I did, nor in what should be contributed soon). That was more than one month ago but it has not yet materialised (all the legal paper takes time, I guess). If the port and stub is not contributed (for whatever reason), then I can provide the state I have reached as a starting point. However, for this: * I suppose some papers have to be signed (?) * I suppose some patch files have to be then prepared * and someone with write access has to put it in the repository (in a branch I guess) Note that the changes I did in the valgrind code are relatively small (something like 150 lines added/changed to add a few basic "lib" services needed for gdbserver stub). The gdbserver code itself is bigger (a few thousands lines from the gdbserver directory "converted" to run under valgrind). I am not sure that the approach I have taken (which is to convert the gdbserver code to valgrind) is more appropriate than just starting from scratch : the gdbserver code is very general, and so, contains code which is not necessarily useful in a valgrind context. I have not done anything about breakpoints implementation, but I am now thinking that the correct implementation is to add a special "trap" instruction in the vex IR (but I had no time to dig more). Not clear to me if this would work for single step. Any feedback about the above points is welcome (and of course, some news about the "to be contributed" would be very useful) Philippe |
|
From: <sv...@va...> - 2008-03-15 00:21:40
|
Author: sewardj
Date: 2008-03-15 00:21:44 +0000 (Sat, 15 Mar 2008)
New Revision: 7680
Log:
Unfortunately glibc's ultra-optimised string functions result in
Helgrind reporting false errors, so we have to intercept them and
replace with simple variants. (Sound familiar?) This is basically
because the optimised versions read memory beyond the end of strings
that they are not going to use, possibly leading to apparent races on
the the bytes immediately following the zero terminator.
Current only 3 functions are replaced: memcpy, strchr and strlen.
Probably more will need to be replaced in future.
Code and infrastructure copied verbatim from
memcheck/mc_replace_strmem.c. Problem originally identified and
diagnosed by Konstantin Serebryany.
Modified:
branches/HGDEV/helgrind/hg_intercepts.c
Modified: branches/HGDEV/helgrind/hg_intercepts.c
===================================================================
--- branches/HGDEV/helgrind/hg_intercepts.c 2008-03-14 23:45:11 UTC (rev 7679)
+++ branches/HGDEV/helgrind/hg_intercepts.c 2008-03-15 00:21:44 UTC (rev 7680)
@@ -54,7 +54,7 @@
/*----------------------------------------------------------------*/
-/*--- ---*/
+/*--- Basic stuff ---*/
/*----------------------------------------------------------------*/
#define PTH_FUNC(ret_ty, f, args...) \
@@ -1337,6 +1337,146 @@
}
+/*----------------------------------------------------------------*/
+/*--- Replace glibc's wretched optimised string fns (again!) ---*/
+/*----------------------------------------------------------------*/
+
+#include "pub_tool_redir.h" /* VG_REPLACE_FUNCTION_ZU */
+
+/* Why we have to do all this nonsense:
+
+ Some implementations of strlen may read up to 7 bytes past the end
+ of the string thus touching memory which may not belong to this
+ string.
+
+ Such race is benign because the data read past the end of the
+ string is not used.
+*/
+
+/* BEGIN tiresome boilerplate. All this stuff is copied from
+ memcheck/mc_replace_strmem.c. If you update that, consider
+ updating this too (and vice versa). */
+
+/* --- Soname of the standard C library. --- */
+
+#if defined(VGO_linux)
+# define m_libc_soname libcZdsoZa // libc.so*
+#elif defined(VGP_ppc32_aix5)
+ /* AIX has both /usr/lib/libc.a and /usr/lib/libc_r.a. */
+# define m_libc_soname libcZaZdaZLshrZdoZR // libc*.a(shr.o)
+#elif defined(VGP_ppc64_aix5)
+# define m_libc_soname libcZaZdaZLshrZu64ZdoZR // libc*.a(shr_64.o)
+#else
+# error "Unknown platform"
+#endif
+
+/* --- Sonames for Linux ELF linkers. --- */
+
+#define m_ld_linux_so_2 ldZhlinuxZdsoZd2 // ld-linux.so.2
+#define m_ld_linux_x86_64_so_2 ldZhlinuxZhx86Zh64ZdsoZd2 // ld-linux-x86-64.so.2
+#define m_ld64_so_1 ld64ZdsoZd1 // ld64.so.1
+#define m_ld_so_1 ldZdsoZd1 // ld.so.1
+
+/* END tiresome boilerplate */
+
+
+#define MEMCPY(soname, fnname) \
+ void* VG_REPLACE_FUNCTION_ZU(soname,fnname) \
+ ( void *dst, const void *src, SizeT len ); \
+ void* VG_REPLACE_FUNCTION_ZU(soname,fnname) \
+ ( void *dst, const void *src, SizeT len ) \
+ { \
+ register char *d; \
+ register char *s; \
+ \
+ if (len == 0) \
+ return dst; \
+ \
+ if ( dst > src ) { \
+ d = (char *)dst + len - 1; \
+ s = (char *)src + len - 1; \
+ while ( len >= 4 ) { \
+ *d-- = *s--; \
+ *d-- = *s--; \
+ *d-- = *s--; \
+ *d-- = *s--; \
+ len -= 4; \
+ } \
+ while ( len-- ) { \
+ *d-- = *s--; \
+ } \
+ } else if ( dst < src ) { \
+ d = (char *)dst; \
+ s = (char *)src; \
+ while ( len >= 4 ) { \
+ *d++ = *s++; \
+ *d++ = *s++; \
+ *d++ = *s++; \
+ *d++ = *s++; \
+ len -= 4; \
+ } \
+ while ( len-- ) { \
+ *d++ = *s++; \
+ } \
+ } \
+ return dst; \
+ }
+
+MEMCPY(m_libc_soname, memcpy)
+MEMCPY(m_ld_so_1, memcpy) /* ld.so.1 */
+MEMCPY(m_ld64_so_1, memcpy) /* ld64.so.1 */
+/* icc9 blats these around all over the place. Not only in the main
+ executable but various .so's. They are highly tuned and read
+ memory beyond the source boundary (although work correctly and
+ never go across page boundaries), so give errors when run natively,
+ at least for misaligned source arg. Just intercepting in the exe
+ only until we understand more about the problem. See
+ http://bugs.kde.org/show_bug.cgi?id=139776
+ */
+MEMCPY(NONE, _intel_fast_memcpy)
+
+
+#define STRCHR(soname, fnname) \
+ char* VG_REPLACE_FUNCTION_ZU(soname,fnname) ( const char* s, int c ); \
+ char* VG_REPLACE_FUNCTION_ZU(soname,fnname) ( const char* s, int c ) \
+ { \
+ UChar ch = (UChar)((UInt)c); \
+ UChar* p = (UChar*)s; \
+ while (True) { \
+ if (*p == ch) return p; \
+ if (*p == 0) return NULL; \
+ p++; \
+ } \
+ }
+
+// Apparently index() is the same thing as strchr()
+STRCHR(m_libc_soname, strchr)
+STRCHR(m_ld_linux_so_2, strchr)
+STRCHR(m_ld_linux_x86_64_so_2, strchr)
+STRCHR(m_libc_soname, index)
+STRCHR(m_ld_linux_so_2, index)
+STRCHR(m_ld_linux_x86_64_so_2, index)
+
+
+// Note that this replacement often doesn't get used because gcc inlines
+// calls to strlen() with its own built-in version. This can be very
+// confusing if you aren't expecting it. Other small functions in this file
+// may also be inline by gcc.
+#define STRLEN(soname, fnname) \
+ SizeT VG_REPLACE_FUNCTION_ZU(soname,fnname)( const char* str ); \
+ SizeT VG_REPLACE_FUNCTION_ZU(soname,fnname)( const char* str ) \
+ { \
+ SizeT i = 0; \
+ while (str[i] != 0) i++; \
+ return i; \
+ }
+
+STRLEN(m_libc_soname, strlen)
+STRLEN(m_ld_linux_so_2, strlen)
+STRLEN(m_ld_linux_x86_64_so_2, strlen)
+
+
+
/*--------------------------------------------------------------------*/
/*--- end tc_intercepts.c ---*/
/*--------------------------------------------------------------------*/
|