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: <sv...@va...> - 2008-03-04 22:10:52
|
Author: sewardj
Date: 2008-03-04 22:10:54 +0000 (Tue, 04 Mar 2008)
New Revision: 7567
Log:
Change the type SegmentSet to a 32-bit value; it doesn't need to be
64-bit.
Modified:
branches/HGDEV/helgrind/hg_main.c
Modified: branches/HGDEV/helgrind/hg_main.c
===================================================================
--- branches/HGDEV/helgrind/hg_main.c 2008-03-04 21:45:07 UTC (rev 7566)
+++ branches/HGDEV/helgrind/hg_main.c 2008-03-04 22:10:54 UTC (rev 7567)
@@ -1030,15 +1030,15 @@
#define SHVAL_Invalid ((SVal)(0))
#define SHVAL_Race ((SVal)(1ULL << 62))
-typedef ULong SegmentSet;
-typedef WordSetID LockSet;
+typedef UInt SegmentSet;
+typedef WordSetID LockSet; /* UInt */
static inline Bool SS_valid (SegmentSet ss) {
- return ss < (1ULL << SEGMENT_SET_BITS);
+ return ss < (1 << SEGMENT_SET_BITS);
}
static inline Bool SS_is_singleton (SegmentSet ss) {
- return (ss & (1ULL << (SEGMENT_SET_BITS-1))) != 0;
+ return (ss & (1 << (SEGMENT_SET_BITS-1))) != 0;
}
static inline UWord SS_get_size (SegmentSet ss) {
@@ -1049,14 +1049,14 @@
static inline SegmentSet SS_mk_singleton (SegmentID ss) {
tl_assert(SEG_id_is_sane(ss));
- ss |= (1ULL << (SEGMENT_SET_BITS-1));
+ ss |= (1 << (SEGMENT_SET_BITS-1));
tl_assert(SS_is_singleton(ss));
return ss;
}
static inline SegmentID SS_get_singleton (SegmentSet ss) {
tl_assert(SS_is_singleton(ss));
- ss &= ~(1ULL << (SEGMENT_SET_BITS-1));
+ ss &= ~(1 << (SEGMENT_SET_BITS-1));
tl_assert(SEG_id_is_sane(ss));
return ss;
}
@@ -1071,7 +1071,7 @@
}
static inline Bool LS_valid (LockSet ls) {
- return ls < (1ULL << LOCK_SET_BITS);
+ return ls < (1 << LOCK_SET_BITS);
}
static inline SVal mk_SHVAL_RW (Bool is_w, SegmentSet ss, LockSet ls) {
@@ -1108,15 +1108,15 @@
}
static inline Bool is_SHVAL_RW (SVal sv) {
- return (sv >> 63) != 0;
+ return (sv >> 63) != 0;
}
static inline Bool is_SHVAL_R (SVal sv) {
- tl_assert(is_SHVAL_RW(sv));
- return ((sv >> 62) & 1) == 0;
+ tl_assert(is_SHVAL_RW(sv));
+ return ((sv >> 62) & 1) == 0;
}
static inline Bool is_SHVAL_W (SVal sv) {
- tl_assert(is_SHVAL_RW(sv));
- return ((sv >> 62) & 1) == 1;
+ tl_assert(is_SHVAL_RW(sv));
+ return ((sv >> 62) & 1) == 1;
}
static inline Bool is_SHVAL_Shared (SVal sv) {
|
|
From: <sv...@va...> - 2008-03-04 21:45:09
|
Author: sewardj
Date: 2008-03-04 21:45:07 +0000 (Tue, 04 Mar 2008)
New Revision: 7566
Log:
Make happens-before caching more 32-bit friendly. Also, make the
table much smaller as that appears to have minimal effect on the hit
rate but trashes D1 less.
Modified:
branches/HGDEV/auxprogs/primes.c
branches/HGDEV/helgrind/hg_main.c
Modified: branches/HGDEV/auxprogs/primes.c
===================================================================
--- branches/HGDEV/auxprogs/primes.c 2008-03-04 20:32:23 UTC (rev 7565)
+++ branches/HGDEV/auxprogs/primes.c 2008-03-04 21:45:07 UTC (rev 7566)
@@ -1,6 +1,8 @@
#include <stdio.h>
#include <math.h>
+#include <stdlib.h>
+#include <assert.h>
int isprime ( int n )
{
@@ -13,8 +15,14 @@
int main ( int argc, char** argv )
{
- int i;
- for (i = 79000; i < 81000; i++)
+ int i, start;
+ if (argc != 2) {
+ fprintf(stderr, "usage: %s <number>\n", argv[0]);
+ return 1;
+ }
+ start = atoi(argv[1]);
+ assert(start >= 2);
+ for (i = start; i < start+2000; i++)
if (isprime(i)) { printf ( "%d ", i ); fflush(stdout); }
return 0;
}
Modified: branches/HGDEV/helgrind/hg_main.c
===================================================================
--- branches/HGDEV/helgrind/hg_main.c 2008-03-04 20:32:23 UTC (rev 7565)
+++ branches/HGDEV/helgrind/hg_main.c 2008-03-04 21:45:07 UTC (rev 7566)
@@ -2125,54 +2125,60 @@
return reachable;
}
+
/*--------------- the happens_before hash table ---------------*/
-
-
-// HBEFORE__N_HTABLE should be a prime number
+// HBEFORE__N_HTABLE should be a prime number. But not a large prime
+// number, as that just causes D1 misses and slows things down.
// #define HBEFORE__N_HTABLE 104729
// #define HBEFORE__N_HTABLE 399989
// #define HBEFORE__N_HTABLE 49999
- #define HBEFORE__N_HTABLE 19997
+// #define HBEFORE__N_HTABLE 19997
+// #define HBEFORE__N_HTABLE 9973
+#define HBEFORE__N_HTABLE 4999
-
// Simple closed hash table with prime size.
// Each entry is a 64-bit value:
// bits 0-31: SegmentID-2
// bits 32-62: SegmentID-1
// bit 63: happens-before(SegmentID-1, SegmentID-2)
-static ULong hbefore__hash_table[HBEFORE__N_HTABLE];
+
+static
+ struct { Bool res; SegmentID segid1; SegmentID segid2; }
+ hbefore__hash_table[HBEFORE__N_HTABLE];
+
static void hbefore__invalidate_htable ( void )
{
stats__hbefore_invals++;
VG_(memset)(hbefore__hash_table, 0, sizeof(hbefore__hash_table));
}
+static inline UInt ROL32 ( UInt w, Int n )
+{
+ w = (w << n) | (w >> (32-n));
+ return w;
+}
-
static Bool happens_before ( SegmentID segid1, SegmentID segid2 )
{
- ULong seg_1_and_2 = ((ULong)segid1) << 32 | (ULong)(segid2);
Bool hbG, hbV;
Segment *seg1, *seg2;
+ UInt hash;
+ tl_assert(sizeof(SegmentID) == sizeof(UInt));
tl_assert(SEG_id_is_sane(segid1));
tl_assert(SEG_id_is_sane(segid2));
tl_assert(segid1 != segid2);
stats__hbefore_queries++;
+ hash = (ROL32(segid1,19) ^ ROL32(segid2,13)) % HBEFORE__N_HTABLE;
{ // try hash table
// Hmm, % on ULong is OK on 64-bit machine (32ish cycles on Core2)
// but really bad on 32-bit (there is a call to umoddi3 and that
// can be many tens of instructions)
- ULong cached = hbefore__hash_table[seg_1_and_2 % HBEFORE__N_HTABLE];
- if (cached == seg_1_and_2) {
- stats__hbefore_hits++;
- return False;
- }
-
- if (cached == (seg_1_and_2 | (1ULL << 63))) {
- stats__hbefore_hits++;
- return True;
- }
+ if (hbefore__hash_table[hash].segid1 == segid1
+ && hbefore__hash_table[hash].segid2 == segid2) {
+ stats__hbefore_hits++;
+ return hbefore__hash_table[hash].res;
+ }
}
/* Not found. Search the graph and add an entry to the cache. */
@@ -2206,14 +2212,16 @@
tl_assert(hbV == hbG);
{ // remember the results in the hash table
- ULong cache = hbG ? (seg_1_and_2 | (1ULL << 63)) : seg_1_and_2;
- hbefore__hash_table[seg_1_and_2 % HBEFORE__N_HTABLE] = cache;
+ hbefore__hash_table[hash].segid1 = segid1;
+ hbefore__hash_table[hash].segid2 = segid2;
+ hbefore__hash_table[hash].res = hbG;
}
if (0)
VG_(printf)("hb %d %d\n", (Int)segid1, (Int)segid2);
return hbG;
}
+
/*--------------- generating .vcg output ---------------*/
static void segments__generate_vcg ( void )
|
|
From: <sv...@va...> - 2008-03-04 20:32:26
|
Author: sewardj
Date: 2008-03-04 20:32:23 +0000 (Tue, 04 Mar 2008)
New Revision: 7565
Log:
Use a hash table instead of a self-organising list to cache
happens-before results. (Konstantin Serebryany)
Modified:
branches/HGDEV/helgrind/hg_main.c
Modified: branches/HGDEV/helgrind/hg_main.c
===================================================================
--- branches/HGDEV/helgrind/hg_main.c 2008-03-04 19:58:43 UTC (rev 7564)
+++ branches/HGDEV/helgrind/hg_main.c 2008-03-04 20:32:23 UTC (rev 7565)
@@ -38,7 +38,13 @@
- Consider what to do about BHL all over again
- Consider what to do about last-lock-lossage mechanism.
- Should it be removed?
+ Should it be removed?
+
+ - get rid of SVal-cache dirty bits? Basically pointless; almost
+ all lines become dirty and have to be written back. Quantify.
+
+ - get rid of 64-bit mod in happens_before hash calculation
+ (is very expensive on 32-bit platforms)
*/
#include "pub_tool_basics.h"
@@ -1439,7 +1445,7 @@
/* fwds */
static void shmem__invalidate_scache ( void );
-static void hbefore__invalidate_cache ( void );
+static void hbefore__invalidate_htable ( void );
static void shmem__set_mbHasLocks ( Addr a, Bool b );
static Bool shmem__get_mbHasLocks ( Addr a );
static void shadow_mem_set8 ( Thread* uu_thr_acc, Addr a, SVal svNew );
@@ -1468,7 +1474,7 @@
/* re <=: < on 64-bit platforms, == on 32-bit ones */
tl_assert(sizeof(SegmentID) <= sizeof(Word));
tl_assert(sizeof(Segment*) == sizeof(Word));
- hbefore__invalidate_cache();
+ hbefore__invalidate_htable();
tl_assert(sizeof(Addr) == sizeof(Word));
tl_assert(map_locks == NULL);
@@ -1998,9 +2004,7 @@
/*------------ searching the happens-before graph ------------*/
static UWord stats__hbefore_queries = 0; // total # queries
-static UWord stats__hbefore_cache0s = 0; // hits at cache[0]
-static UWord stats__hbefore_cacheNs = 0; // hits at cache[> 0]
-static UWord stats__hbefore_probes = 0; // # checks in cache
+static UWord stats__hbefore_hits = 0; // hits at hash table
static UWord stats__hbefore_gsearches = 0; // # searches in graph
static UWord stats__hbefore_gsearchFs = 0; // # fast searches in graph
static UWord stats__hbefore_invals = 0; // # cache invals
@@ -2121,55 +2125,56 @@
return reachable;
}
-/*--------------- the happens_before cache ---------------*/
+/*--------------- the happens_before hash table ---------------*/
-#define HBEFORE__N_CACHE 64
-typedef
- struct { SegmentID segid1; SegmentID segid2; Bool result; }
- HBeforeCacheEnt;
-static HBeforeCacheEnt hbefore__cache[HBEFORE__N_CACHE];
-static void hbefore__invalidate_cache ( void )
-{
- Int i;
- SegmentID bogus = 0;
- tl_assert(!SEG_id_is_sane(bogus));
+// HBEFORE__N_HTABLE should be a prime number
+// #define HBEFORE__N_HTABLE 104729
+// #define HBEFORE__N_HTABLE 399989
+// #define HBEFORE__N_HTABLE 49999
+ #define HBEFORE__N_HTABLE 19997
+
+
+// Simple closed hash table with prime size.
+// Each entry is a 64-bit value:
+// bits 0-31: SegmentID-2
+// bits 32-62: SegmentID-1
+// bit 63: happens-before(SegmentID-1, SegmentID-2)
+static ULong hbefore__hash_table[HBEFORE__N_HTABLE];
+static void hbefore__invalidate_htable ( void )
+{
stats__hbefore_invals++;
- for (i = 0; i < HBEFORE__N_CACHE; i++) {
- hbefore__cache[i].segid1 = bogus;
- hbefore__cache[i].segid2 = bogus;
- hbefore__cache[i].result = False;
- }
+ VG_(memset)(hbefore__hash_table, 0, sizeof(hbefore__hash_table));
}
+
+
static Bool happens_before ( SegmentID segid1, SegmentID segid2 )
{
+ ULong seg_1_and_2 = ((ULong)segid1) << 32 | (ULong)(segid2);
Bool hbG, hbV;
- Int i, j, iNSERT_POINT;
Segment *seg1, *seg2;
tl_assert(SEG_id_is_sane(segid1));
tl_assert(SEG_id_is_sane(segid2));
tl_assert(segid1 != segid2);
stats__hbefore_queries++;
- stats__hbefore_probes++;
- if (segid1 == hbefore__cache[0].segid1
- && segid2 == hbefore__cache[0].segid2) {
- stats__hbefore_cache0s++;
- return hbefore__cache[0].result;
- }
- for (i = 1; i < HBEFORE__N_CACHE; i++) {
- stats__hbefore_probes++;
- if (segid1 == hbefore__cache[i].segid1
- && segid2 == hbefore__cache[i].segid2) {
- /* Found it. Move it 1 step closer to the front. */
- HBeforeCacheEnt tmp = hbefore__cache[i];
- hbefore__cache[i] = hbefore__cache[i-1];
- hbefore__cache[i-1] = tmp;
- stats__hbefore_cacheNs++;
- return tmp.result;
+ { // try hash table
+ // Hmm, % on ULong is OK on 64-bit machine (32ish cycles on Core2)
+ // but really bad on 32-bit (there is a call to umoddi3 and that
+ // can be many tens of instructions)
+ ULong cached = hbefore__hash_table[seg_1_and_2 % HBEFORE__N_HTABLE];
+ if (cached == seg_1_and_2) {
+ stats__hbefore_hits++;
+ return False;
}
+
+ if (cached == (seg_1_and_2 | (1ULL << 63))) {
+ stats__hbefore_hits++;
+ return True;
+ }
}
+
/* Not found. Search the graph and add an entry to the cache. */
stats__hbefore_gsearches++;
@@ -2200,18 +2205,12 @@
}
tl_assert(hbV == hbG);
- iNSERT_POINT = (1*HBEFORE__N_CACHE)/4 - 1;
- /* if (iNSERT_POINT > 4) iNSERT_POINT = 4; */
-
- for (j = HBEFORE__N_CACHE-1; j > iNSERT_POINT; j--) {
- hbefore__cache[j] = hbefore__cache[j-1];
+ { // remember the results in the hash table
+ ULong cache = hbG ? (seg_1_and_2 | (1ULL << 63)) : seg_1_and_2;
+ hbefore__hash_table[seg_1_and_2 % HBEFORE__N_HTABLE] = cache;
}
- hbefore__cache[iNSERT_POINT].segid1 = segid1;
- hbefore__cache[iNSERT_POINT].segid2 = segid2;
- hbefore__cache[iNSERT_POINT].result = hbG;
-
if (0)
- VG_(printf)("hb %d %d\n", (Int)segid1-(1<<24), (Int)segid2-(1<<24));
+ VG_(printf)("hb %d %d\n", (Int)segid1, (Int)segid2);
return hbG;
}
@@ -8414,15 +8413,13 @@
VG_(printf)("\n");
VG_(printf)(" hbefore: %,10lu queries\n", stats__hbefore_queries);
- VG_(printf)(" hbefore: %,10lu cache 0 hits\n", stats__hbefore_cache0s);
- VG_(printf)(" hbefore: %,10lu cache > 0 hits\n", stats__hbefore_cacheNs);
+ VG_(printf)(" hbefore: %,10lu hash table hits\n", stats__hbefore_hits);
VG_(printf)(" hbefore: %,10lu graph searches\n", stats__hbefore_gsearches);
VG_(printf)(" hbefore: %,10lu of which slow\n",
stats__hbefore_gsearches - stats__hbefore_gsearchFs);
VG_(printf)(" hbefore: %,10lu stack high water mark\n",
stats__hbefore_stk_hwm);
VG_(printf)(" hbefore: %,10lu cache invals\n", stats__hbefore_invals);
- VG_(printf)(" hbefore: %,10lu probes\n", stats__hbefore_probes);
VG_(printf)("\n");
VG_(printf)(" segments: %,8lu Segment objects allocated\n",
|
|
From: <sv...@va...> - 2008-03-04 19:58:41
|
Author: sewardj
Date: 2008-03-04 19:58:43 +0000 (Tue, 04 Mar 2008)
New Revision: 7564
Log:
Increase the size of the segment set operation cache from 8 to 32.
This cuts the startup time for firefox by about 20%.
Modified:
branches/HGDEV/helgrind/hg_main.c
Modified: branches/HGDEV/helgrind/hg_main.c
===================================================================
--- branches/HGDEV/helgrind/hg_main.c 2008-03-04 19:42:28 UTC (rev 7563)
+++ branches/HGDEV/helgrind/hg_main.c 2008-03-04 19:58:43 UTC (rev 7564)
@@ -35,12 +35,10 @@
*/
/* JRS: TODO 2008 Mar 03:
- - get rid of HG_(elementOfWS) since it breaks representational
- abstraction on WordSets
-
- - Check 64-bit SVal compression parameters are optimal
-
- Consider what to do about BHL all over again
+
+ - Consider what to do about last-lock-lossage mechanism.
+ Should it be removed?
*/
#include "pub_tool_basics.h"
@@ -1482,7 +1480,7 @@
HG_(addToFM)( map_locks, (Word)&__bus_lock, (Word)__bus_lock_Lock );
tl_assert(univ_ssets == NULL);
- univ_ssets = HG_(newWordSetU)( hg_zalloc, hg_free, 8/*cacheSize*/ );
+ univ_ssets = HG_(newWordSetU)( hg_zalloc, hg_free, 32/*cacheSize*/ );
tl_assert(univ_ssets != NULL);
tl_assert(univ_lsets == NULL);
|
|
From: <sv...@va...> - 2008-03-04 19:42:29
|
Author: sewardj
Date: 2008-03-04 19:42:28 +0000 (Tue, 04 Mar 2008)
New Revision: 7563
Log:
Disable the last-lock-lossage mechanism. It can be very slow with
MSMProp1, and there have been multiple reports of it generating
confusing results.
Modified:
branches/HGDEV/helgrind/hg_main.c
Modified: branches/HGDEV/helgrind/hg_main.c
===================================================================
--- branches/HGDEV/helgrind/hg_main.c 2008-03-04 19:11:38 UTC (rev 7562)
+++ branches/HGDEV/helgrind/hg_main.c 2008-03-04 19:42:28 UTC (rev 7563)
@@ -1336,7 +1336,7 @@
SegmentSet ss = get_SHVAL_SS(sv);
LockSet ls = get_SHVAL_LS(sv);
UWord n_segments = SS_get_size(ss);
- int n_locks = HG_(cardinalityWS)(univ_lsets, ls);
+ Int n_locks = HG_(cardinalityWS)(univ_lsets, ls);
VG_(sprintf)(buf, "%c #SS=%d #LS=%d ",
is_w ? 'W' : 'R', n_segments, n_locks);
@@ -1348,7 +1348,7 @@
}
S = SS_get_element(ss, i);
VG_(sprintf)(buf + VG_(strlen)(buf), "S%d/T%d ",
- (int)S, SEG_get(S)->thr->errmsg_index);
+ (Int)S, SEG_get(S)->thr->errmsg_index);
}
} else {
VG_(sprintf)(buf, "Invalid-shadow-word(%u)", sv);
@@ -3142,7 +3142,9 @@
if (oldLS != newLS) {
// if the lockset changed, remember when it happened
- record_last_lock_lossage(a, oldLS, newLS);
+ if (0) // FIXME. Do we want this functionality? If so,
+ // it can be very slow.
+ record_last_lock_lossage(a, oldLS, newLS);
}
goto done;
}
|
|
From: <sv...@va...> - 2008-03-04 19:11:37
|
Author: bart
Date: 2008-03-04 19:11:38 +0000 (Tue, 04 Mar 2008)
New Revision: 7562
Log:
More suppression pattern generalization.
Modified:
trunk/glibc-2.X-drd.supp
Modified: trunk/glibc-2.X-drd.supp
===================================================================
--- trunk/glibc-2.X-drd.supp 2008-03-04 19:03:29 UTC (rev 7561)
+++ trunk/glibc-2.X-drd.supp 2008-03-04 19:11:38 UTC (rev 7562)
@@ -142,7 +142,6 @@
pthread
exp-drd:ConflictingAccess
fun:clone
- fun:pthread_create@@GLIBC_*
fun:pthread_create*
}
{
|
|
From: <sv...@va...> - 2008-03-04 19:03:27
|
Author: bart
Date: 2008-03-04 19:03:29 +0000 (Tue, 04 Mar 2008)
New Revision: 7561
Log:
Generalized a suppression pattern.
Modified:
trunk/glibc-2.X-drd.supp
Modified: trunk/glibc-2.X-drd.supp
===================================================================
--- trunk/glibc-2.X-drd.supp 2008-03-04 19:03:06 UTC (rev 7560)
+++ trunk/glibc-2.X-drd.supp 2008-03-04 19:03:29 UTC (rev 7561)
@@ -137,7 +137,6 @@
exp-drd:ConflictingAccess
fun:__pthread_mutex_cond_lock
fun:pthread_cond_wait@@GLIBC_*
- fun:pthread_cond_wait*
}
{
pthread
|
|
From: <sv...@va...> - 2008-03-04 19:03:03
|
Author: bart Date: 2008-03-04 19:03:06 +0000 (Tue, 04 Mar 2008) New Revision: 7560 Log: Reverted -- no races should be reported on tc21_pthonce. Modified: trunk/exp-drd/tests/tc21_pthonce.stderr.exp Modified: trunk/exp-drd/tests/tc21_pthonce.stderr.exp =================================================================== --- trunk/exp-drd/tests/tc21_pthonce.stderr.exp 2008-03-04 18:37:20 UTC (rev 7559) +++ trunk/exp-drd/tests/tc21_pthonce.stderr.exp 2008-03-04 19:03:06 UTC (rev 7560) @@ -1,45 +1,3 @@ -Thread 2: -Conflicting load by thread 2 at 0x........ size 4 - at 0x........: vfprintf (in /...libc...) - by 0x........: printf (in /...libc...) - by 0x........: child (tc21_pthonce.c:73) - by 0x........: vg_thread_wrapper (drd_intercepts.c:?) - by 0x........: start_thread (in libpthread-?.?.so) - by 0x........: clone (in /...libc...) -Allocation context: unknown -Other segment start (thread 1) - at 0x........: clone (in /...libc...) - by 0x........: do_clone (in libpthread-?.?.so) - by 0x........: pthread_create@@GLIBC_2.2.5 (in libpthread-?.?.so) - by 0x........: pthread_create* (drd_intercepts.c:?) - by 0x........: main (tc21_pthonce.c:86) -Other segment end (thread 1) - at 0x........: clone (in /...libc...) - by 0x........: do_clone (in libpthread-?.?.so) - by 0x........: pthread_create@@GLIBC_2.2.5 (in libpthread-?.?.so) - by 0x........: pthread_create* (drd_intercepts.c:?) - by 0x........: main (tc21_pthonce.c:86) -Conflicting load by thread 2 at 0x........ size 4 - at 0x........: vfprintf (in /...libc...) - by 0x........: printf (in /...libc...) - by 0x........: child (tc21_pthonce.c:73) - by 0x........: vg_thread_wrapper (drd_intercepts.c:?) - by 0x........: start_thread (in libpthread-?.?.so) - by 0x........: clone (in /...libc...) -Allocation context: unknown -Other segment start (thread 1) - at 0x........: clone (in /...libc...) - by 0x........: do_clone (in libpthread-?.?.so) - by 0x........: pthread_create@@GLIBC_2.2.5 (in libpthread-?.?.so) - by 0x........: pthread_create* (drd_intercepts.c:?) - by 0x........: main (tc21_pthonce.c:86) -Other segment end (thread 1) - at 0x........: clone (in /...libc...) - by 0x........: do_clone (in libpthread-?.?.so) - by 0x........: pthread_create@@GLIBC_2.2.5 (in libpthread-?.?.so) - by 0x........: pthread_create* (drd_intercepts.c:?) - by 0x........: main (tc21_pthonce.c:86) - -ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 0 from 0) +ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) |
|
From: <sv...@va...> - 2008-03-04 18:37:27
|
Author: bart Date: 2008-03-04 18:37:20 +0000 (Tue, 04 Mar 2008) New Revision: 7559 Log: Added stdout.exp and stderr.exp files for LinuxThreads. Added: trunk/exp-drd/tests/fp_race.stderr.exp-linuxthreads trunk/exp-drd/tests/fp_race2.stderr.exp-linuxthreads trunk/exp-drd/tests/hg01_all_ok.stderr.exp-linuxthreads trunk/exp-drd/tests/hg02_deadlock.stderr.exp-linuxthreads trunk/exp-drd/tests/hg03_inherit.stderr.exp-linuxthreads trunk/exp-drd/tests/hg04_race.stderr.exp-linuxthreads trunk/exp-drd/tests/hg05_race2.stderr.exp-linuxthreads trunk/exp-drd/tests/hg06_readshared.stderr.exp-linuxthreads trunk/exp-drd/tests/matinv.stderr.exp-linuxthreads trunk/exp-drd/tests/matinv.stdout.exp-linuxthreads trunk/exp-drd/tests/pth_barrier.stderr.exp-linuxthreads trunk/exp-drd/tests/pth_barrier2.stderr.exp-linuxthreads trunk/exp-drd/tests/pth_barrier3.stderr.exp-linuxthreads trunk/exp-drd/tests/pth_broadcast.stderr.exp-linuxthreads trunk/exp-drd/tests/pth_cond_race.stderr.exp-linuxthreads trunk/exp-drd/tests/pth_cond_race2.stderr.exp-linuxthreads trunk/exp-drd/tests/pth_create_chain.stderr.exp-linuxthreads trunk/exp-drd/tests/pth_detached.stderr.exp-linuxthreads trunk/exp-drd/tests/pth_detached.stdout.exp-linuxthreads trunk/exp-drd/tests/pth_detached2.stderr.exp-linuxthreads trunk/exp-drd/tests/pth_detached2.stdout.exp-linuxthreads trunk/exp-drd/tests/rwlock_race.stderr.exp-linuxthreads trunk/exp-drd/tests/sem_as_mutex.stderr.exp-linuxthreads trunk/exp-drd/tests/sem_as_mutex2.stderr.exp-linuxthreads trunk/exp-drd/tests/sigalrm.stderr.exp-linuxthreads trunk/exp-drd/tests/tc01_simple_race.stderr.exp-linuxthreads trunk/exp-drd/tests/tc02_simple_tls.stderr.exp-linuxthreads trunk/exp-drd/tests/tc03_re_excl.stderr.exp-linuxthreads trunk/exp-drd/tests/tc04_free_lock.stderr.exp-linuxthreads trunk/exp-drd/tests/tc05_simple_race.stderr.exp-linuxthreads trunk/exp-drd/tests/tc06_two_races.stderr.exp-linuxthreads trunk/exp-drd/tests/tc09_bad_unlock.stderr.exp-linuxthreads trunk/exp-drd/tests/tc10_rec_lock.stderr.exp-linuxthreads trunk/exp-drd/tests/tc11_XCHG.stderr.exp-linuxthreads trunk/exp-drd/tests/tc11_XCHG.stdout.exp-linuxthreads trunk/exp-drd/tests/tc12_rwl_trivial.stderr.exp-linuxthreads trunk/exp-drd/tests/tc16_byterace.stderr.exp-linuxthreads trunk/exp-drd/tests/tc17_sembar.stderr.exp-linuxthreads trunk/exp-drd/tests/tc18_semabuse.stderr.exp-linuxthreads trunk/exp-drd/tests/tc20_verifywrap.stderr.exp-linuxthreads trunk/exp-drd/tests/tc20_verifywrap2.stderr.exp-linuxthreads trunk/exp-drd/tests/tc21_pthonce.stderr.exp-linuxthreads trunk/exp-drd/tests/tc21_pthonce.stdout.exp-linuxthreads trunk/exp-drd/tests/tc22_exit_w_lock.stderr.exp-linuxthreads trunk/exp-drd/tests/tc23_bogus_condwait.stderr.exp-linuxthreads trunk/exp-drd/tests/trylock.stderr.exp-linuxthreads Modified: trunk/exp-drd/tests/Makefile.am Modified: trunk/exp-drd/tests/Makefile.am =================================================================== --- trunk/exp-drd/tests/Makefile.am 2008-03-04 18:36:23 UTC (rev 7558) +++ trunk/exp-drd/tests/Makefile.am 2008-03-04 18:37:20 UTC (rev 7559) @@ -13,90 +13,161 @@ filter_none_discards \ filter_stderr -EXTRA_DIST = $(noinst_SCRIPTS) \ - fp_race.vgtest \ - fp_race.stdout.exp fp_race.stderr.exp \ - fp_race2.vgtest \ - fp_race2.stdout.exp fp_race2.stderr.exp \ - hg01_all_ok.vgtest \ - hg01_all_ok.stderr.exp \ - hg02_deadlock.vgtest \ - hg02_deadlock.stderr.exp \ - hg03_inherit.vgtest \ - hg03_inherit.stderr.exp \ - hg04_race.vgtest \ - hg04_race.stderr.exp \ - hg05_race2.vgtest \ - hg05_race2.stderr.exp \ - hg06_readshared.vgtest \ - hg06_readshared.stderr.exp \ - matinv.vgtest \ - matinv.stdout.exp matinv.stderr.exp \ - pth_barrier.vgtest pth_barrier.stderr.exp \ - pth_barrier2.vgtest pth_barrier2.stderr.exp \ - pth_barrier3.vgtest pth_barrier3.stderr.exp \ - pth_broadcast.vgtest \ - pth_broadcast.stdout.exp pth_broadcast.stderr.exp \ - pth_cond_race.vgtest \ - pth_cond_race.stdout.exp pth_cond_race.stderr.exp \ - pth_cond_race2.vgtest \ - pth_cond_race2.stdout.exp pth_cond_race2.stderr.exp \ - pth_create_chain.vgtest \ - pth_create_chain.stdout.exp pth_create_chain.stderr.exp \ - pth_detached.vgtest \ - pth_detached.stdout.exp pth_detached.stderr.exp \ - pth_detached2.vgtest \ - pth_detached2.stdout.exp pth_detached2.stderr.exp \ - recursive_mutex.vgtest recursive_mutex.stderr.exp \ - rwlock_race.vgtest rwlock_race.stderr.exp \ - sem_as_mutex.vgtest sem_as_mutex.stderr.exp \ - sem_as_mutex2.vgtest sem_as_mutex2.stderr.exp \ - sigalrm.vgtest \ - sigalrm.stdout.exp sigalrm.stderr.exp \ - tc01_simple_race.vgtest \ - tc01_simple_race.stderr.exp \ - tc02_simple_tls.vgtest \ - tc02_simple_tls.stderr.exp \ - tc03_re_excl.vgtest \ - tc03_re_excl.stderr.exp \ - tc04_free_lock.vgtest \ - tc04_free_lock.stderr.exp \ - tc05_simple_race.vgtest \ - tc05_simple_race.stderr.exp \ - tc06_two_races.vgtest \ - tc06_two_races.stderr.exp \ - tc09_bad_unlock.vgtest \ - tc09_bad_unlock.stderr.exp \ - tc10_rec_lock.vgtest \ - tc10_rec_lock.stderr.exp \ - tc11_XCHG.vgtest \ - tc11_XCHG.stderr.exp tc11_XCHG.stdout.exp \ - tc12_rwl_trivial.vgtest \ - tc12_rwl_trivial.stderr.exp \ - tc13_laog1.vgtest \ - tc13_laog1.stderr.exp \ - tc15_laog_lockdel.vgtest \ - tc15_laog_lockdel.stderr.exp \ - tc16_byterace.vgtest \ - tc16_byterace.stderr.exp \ - tc17_sembar.vgtest \ - tc17_sembar.stderr.exp \ - tc18_semabuse.vgtest \ - tc18_semabuse.stderr.exp \ - tc19_shadowmem.vgtest \ - tc19_shadowmem.stderr.exp \ - tc20_verifywrap.vgtest tc20_verifywrap.stderr.exp \ - tc20_verifywrap2.vgtest tc20_verifywrap2.stderr.exp \ - tc21_pthonce.vgtest \ - tc21_pthonce.stderr.exp tc21_pthonce.stdout.exp \ - tc22_exit_w_lock.vgtest \ - tc22_exit_w_lock.stderr.exp-32bit \ - tc22_exit_w_lock.stderr.exp-64bit \ - tc23_bogus_condwait.vgtest \ - tc23_bogus_condwait.stderr.exp \ - tc24_nonzero_sem.vgtest \ - tc24_nonzero_sem.stderr.exp \ - trylock.c trylock.stderr.exp +EXTRA_DIST = \ + $(noinst_SCRIPTS) \ + fp_race.stderr.exp \ + fp_race.stderr.exp-linuxthreads \ + fp_race.stdout.exp \ + fp_race.vgtest \ + fp_race2.stderr.exp \ + fp_race2.stderr.exp-linuxthreads \ + fp_race2.stdout.exp \ + fp_race2.vgtest \ + hg01_all_ok.stderr.exp \ + hg01_all_ok.stderr.exp-linuxthreads \ + hg01_all_ok.vgtest \ + hg02_deadlock.stderr.exp \ + hg02_deadlock.stderr.exp-linuxthreads \ + hg02_deadlock.vgtest \ + hg03_inherit.stderr.exp \ + hg03_inherit.stderr.exp-linuxthreads \ + hg03_inherit.vgtest \ + hg04_race.stderr.exp \ + hg04_race.stderr.exp-linuxthreads \ + hg04_race.vgtest \ + hg05_race2.stderr.exp \ + hg05_race2.stderr.exp-linuxthreads \ + hg05_race2.vgtest \ + hg06_readshared.stderr.exp \ + hg06_readshared.stderr.exp-linuxthreads \ + hg06_readshared.vgtest \ + matinv.stderr.exp \ + matinv.stderr.exp-linuxthreads \ + matinv.stdout.exp \ + matinv.stdout.exp-linuxthreads \ + matinv.stdout.exp-linuxthreads \ + matinv.vgtest \ + pth_barrier.stderr.exp \ + pth_barrier.stderr.exp-linuxthreads \ + pth_barrier.vgtest \ + pth_barrier2.stderr.exp \ + pth_barrier2.stderr.exp-linuxthreads \ + pth_barrier2.vgtest \ + pth_barrier3.stderr.exp \ + pth_barrier3.stderr.exp-linuxthreads \ + pth_barrier3.vgtest \ + pth_broadcast.stderr.exp \ + pth_broadcast.stderr.exp-linuxthreads \ + pth_broadcast.stdout.exp \ + pth_broadcast.vgtest \ + pth_cond_race.stderr.exp \ + pth_cond_race.stderr.exp-linuxthreads \ + pth_cond_race.stdout.exp \ + pth_cond_race.vgtest \ + pth_cond_race2.stderr.exp \ + pth_cond_race2.stderr.exp-linuxthreads \ + pth_cond_race2.stdout.exp \ + pth_cond_race2.vgtest \ + pth_create_chain.stderr.exp \ + pth_create_chain.stderr.exp-linuxthreads \ + pth_create_chain.stdout.exp \ + pth_create_chain.vgtest \ + pth_detached.stderr.exp \ + pth_detached.stderr.exp-linuxthreads \ + pth_detached.stdout.exp \ + pth_detached.stdout.exp-linuxthreads \ + pth_detached.stdout.exp-linuxthreads \ + pth_detached.vgtest \ + pth_detached2.stderr.exp \ + pth_detached2.stderr.exp-linuxthreads \ + pth_detached2.stdout.exp \ + pth_detached2.stdout.exp-linuxthreads \ + pth_detached2.stdout.exp-linuxthreads \ + pth_detached2.vgtest \ + recursive_mutex.stderr.exp \ + recursive_mutex.vgtest \ + rwlock_race.stderr.exp \ + rwlock_race.stderr.exp-linuxthreads \ + rwlock_race.vgtest \ + sem_as_mutex.stderr.exp \ + sem_as_mutex.stderr.exp-linuxthreads \ + sem_as_mutex.vgtest \ + sem_as_mutex2.stderr.exp \ + sem_as_mutex2.stderr.exp-linuxthreads \ + sem_as_mutex2.vgtest \ + sigalrm.stderr.exp-linuxthreads \ + sigalrm.stdout.exp sigalrm.stderr.exp \ + sigalrm.vgtest \ + tc01_simple_race.stderr.exp \ + tc01_simple_race.stderr.exp-linuxthreads \ + tc01_simple_race.vgtest \ + tc02_simple_tls.stderr.exp \ + tc02_simple_tls.stderr.exp-linuxthreads \ + tc02_simple_tls.vgtest \ + tc03_re_excl.stderr.exp \ + tc03_re_excl.stderr.exp-linuxthreads \ + tc03_re_excl.vgtest \ + tc04_free_lock.stderr.exp \ + tc04_free_lock.stderr.exp-linuxthreads \ + tc04_free_lock.vgtest \ + tc05_simple_race.stderr.exp \ + tc05_simple_race.stderr.exp-linuxthreads \ + tc05_simple_race.vgtest \ + tc06_two_races.stderr.exp \ + tc06_two_races.stderr.exp-linuxthreads \ + tc06_two_races.vgtest \ + tc09_bad_unlock.stderr.exp \ + tc09_bad_unlock.stderr.exp-linuxthreads \ + tc09_bad_unlock.vgtest \ + tc10_rec_lock.stderr.exp \ + tc10_rec_lock.stderr.exp-linuxthreads \ + tc10_rec_lock.vgtest \ + tc11_XCHG.stderr.exp tc11_XCHG.stdout.exp \ + tc11_XCHG.stderr.exp-linuxthreads \ + tc11_XCHG.stdout.exp-linuxthreads \ + tc11_XCHG.stdout.exp-linuxthreads \ + tc11_XCHG.vgtest \ + tc12_rwl_trivial.stderr.exp \ + tc12_rwl_trivial.stderr.exp-linuxthreads \ + tc12_rwl_trivial.vgtest \ + tc13_laog1.stderr.exp \ + tc13_laog1.vgtest \ + tc15_laog_lockdel.stderr.exp \ + tc15_laog_lockdel.vgtest \ + tc16_byterace.stderr.exp \ + tc16_byterace.stderr.exp-linuxthreads \ + tc16_byterace.vgtest \ + tc17_sembar.stderr.exp \ + tc17_sembar.stderr.exp-linuxthreads \ + tc17_sembar.vgtest \ + tc18_semabuse.stderr.exp \ + tc18_semabuse.stderr.exp-linuxthreads \ + tc18_semabuse.vgtest \ + tc19_shadowmem.stderr.exp \ + tc19_shadowmem.vgtest \ + tc20_verifywrap.stderr.exp \ + tc20_verifywrap.stderr.exp-linuxthreads \ + tc20_verifywrap.vgtest \ + tc20_verifywrap2.stderr.exp \ + tc20_verifywrap2.stderr.exp-linuxthreads \ + tc20_verifywrap2.vgtest \ + tc21_pthonce.stderr.exp \ + tc21_pthonce.stderr.exp-linuxthreads \ + tc21_pthonce.stdout.exp \ + tc21_pthonce.stdout.exp-linuxthreads \ + tc21_pthonce.stdout.exp-linuxthreads \ + tc21_pthonce.vgtest \ + tc22_exit_w_lock.stderr.exp-32bit \ + tc22_exit_w_lock.stderr.exp-64bit \ + tc22_exit_w_lock.stderr.exp-linuxthreads \ + tc22_exit_w_lock.vgtest \ + tc23_bogus_condwait.stderr.exp \ + tc23_bogus_condwait.stderr.exp-linuxthreads \ + tc23_bogus_condwait.vgtest \ + tc24_nonzero_sem.stderr.exp \ + tc24_nonzero_sem.vgtest \ + trylock.c trylock.stderr.exp \ + trylock.stderr.exp-linuxthreads # tc07_hbl1.vgtest # tc07_hbl1.stderr.exp tc07_hbl1.stdout.exp Added: trunk/exp-drd/tests/fp_race.stderr.exp-linuxthreads =================================================================== --- trunk/exp-drd/tests/fp_race.stderr.exp-linuxthreads (rev 0) +++ trunk/exp-drd/tests/fp_race.stderr.exp-linuxthreads 2008-03-04 18:37:20 UTC (rev 7559) @@ -0,0 +1,7 @@ + +Detected the LinuxThreads threading library. Sorry, but DRD only supports +the newer NPTL (Native POSIX Threads Library). Please try to rerun DRD +after having upgraded to a newer version of your Linux distribution. +Giving up. + +ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) Added: trunk/exp-drd/tests/fp_race2.stderr.exp-linuxthreads =================================================================== --- trunk/exp-drd/tests/fp_race2.stderr.exp-linuxthreads (rev 0) +++ trunk/exp-drd/tests/fp_race2.stderr.exp-linuxthreads 2008-03-04 18:37:20 UTC (rev 7559) @@ -0,0 +1,7 @@ + +Detected the LinuxThreads threading library. Sorry, but DRD only supports +the newer NPTL (Native POSIX Threads Library). Please try to rerun DRD +after having upgraded to a newer version of your Linux distribution. +Giving up. + +ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) Added: trunk/exp-drd/tests/hg01_all_ok.stderr.exp-linuxthreads =================================================================== --- trunk/exp-drd/tests/hg01_all_ok.stderr.exp-linuxthreads (rev 0) +++ trunk/exp-drd/tests/hg01_all_ok.stderr.exp-linuxthreads 2008-03-04 18:37:20 UTC (rev 7559) @@ -0,0 +1,7 @@ + +Detected the LinuxThreads threading library. Sorry, but DRD only supports +the newer NPTL (Native POSIX Threads Library). Please try to rerun DRD +after having upgraded to a newer version of your Linux distribution. +Giving up. + +ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) Added: trunk/exp-drd/tests/hg02_deadlock.stderr.exp-linuxthreads =================================================================== --- trunk/exp-drd/tests/hg02_deadlock.stderr.exp-linuxthreads (rev 0) +++ trunk/exp-drd/tests/hg02_deadlock.stderr.exp-linuxthreads 2008-03-04 18:37:20 UTC (rev 7559) @@ -0,0 +1,7 @@ + +Detected the LinuxThreads threading library. Sorry, but DRD only supports +the newer NPTL (Native POSIX Threads Library). Please try to rerun DRD +after having upgraded to a newer version of your Linux distribution. +Giving up. + +ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) Added: trunk/exp-drd/tests/hg03_inherit.stderr.exp-linuxthreads =================================================================== --- trunk/exp-drd/tests/hg03_inherit.stderr.exp-linuxthreads (rev 0) +++ trunk/exp-drd/tests/hg03_inherit.stderr.exp-linuxthreads 2008-03-04 18:37:20 UTC (rev 7559) @@ -0,0 +1,7 @@ + +Detected the LinuxThreads threading library. Sorry, but DRD only supports +the newer NPTL (Native POSIX Threads Library). Please try to rerun DRD +after having upgraded to a newer version of your Linux distribution. +Giving up. + +ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) Added: trunk/exp-drd/tests/hg04_race.stderr.exp-linuxthreads =================================================================== --- trunk/exp-drd/tests/hg04_race.stderr.exp-linuxthreads (rev 0) +++ trunk/exp-drd/tests/hg04_race.stderr.exp-linuxthreads 2008-03-04 18:37:20 UTC (rev 7559) @@ -0,0 +1,7 @@ + +Detected the LinuxThreads threading library. Sorry, but DRD only supports +the newer NPTL (Native POSIX Threads Library). Please try to rerun DRD +after having upgraded to a newer version of your Linux distribution. +Giving up. + +ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) Added: trunk/exp-drd/tests/hg05_race2.stderr.exp-linuxthreads =================================================================== --- trunk/exp-drd/tests/hg05_race2.stderr.exp-linuxthreads (rev 0) +++ trunk/exp-drd/tests/hg05_race2.stderr.exp-linuxthreads 2008-03-04 18:37:20 UTC (rev 7559) @@ -0,0 +1,7 @@ + +Detected the LinuxThreads threading library. Sorry, but DRD only supports +the newer NPTL (Native POSIX Threads Library). Please try to rerun DRD +after having upgraded to a newer version of your Linux distribution. +Giving up. + +ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) Added: trunk/exp-drd/tests/hg06_readshared.stderr.exp-linuxthreads =================================================================== --- trunk/exp-drd/tests/hg06_readshared.stderr.exp-linuxthreads (rev 0) +++ trunk/exp-drd/tests/hg06_readshared.stderr.exp-linuxthreads 2008-03-04 18:37:20 UTC (rev 7559) @@ -0,0 +1,7 @@ + +Detected the LinuxThreads threading library. Sorry, but DRD only supports +the newer NPTL (Native POSIX Threads Library). Please try to rerun DRD +after having upgraded to a newer version of your Linux distribution. +Giving up. + +ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) Added: trunk/exp-drd/tests/matinv.stderr.exp-linuxthreads =================================================================== --- trunk/exp-drd/tests/matinv.stderr.exp-linuxthreads (rev 0) +++ trunk/exp-drd/tests/matinv.stderr.exp-linuxthreads 2008-03-04 18:37:20 UTC (rev 7559) @@ -0,0 +1,7 @@ + +Detected the LinuxThreads threading library. Sorry, but DRD only supports +the newer NPTL (Native POSIX Threads Library). Please try to rerun DRD +after having upgraded to a newer version of your Linux distribution. +Giving up. + +ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) Added: trunk/exp-drd/tests/matinv.stdout.exp-linuxthreads =================================================================== Added: trunk/exp-drd/tests/pth_barrier.stderr.exp-linuxthreads =================================================================== --- trunk/exp-drd/tests/pth_barrier.stderr.exp-linuxthreads (rev 0) +++ trunk/exp-drd/tests/pth_barrier.stderr.exp-linuxthreads 2008-03-04 18:37:20 UTC (rev 7559) @@ -0,0 +1 @@ +ERROR SUMMARY: 0 errors from 0 contexts Added: trunk/exp-drd/tests/pth_barrier2.stderr.exp-linuxthreads =================================================================== --- trunk/exp-drd/tests/pth_barrier2.stderr.exp-linuxthreads (rev 0) +++ trunk/exp-drd/tests/pth_barrier2.stderr.exp-linuxthreads 2008-03-04 18:37:20 UTC (rev 7559) @@ -0,0 +1 @@ +ERROR SUMMARY: 0 errors from 0 contexts Added: trunk/exp-drd/tests/pth_barrier3.stderr.exp-linuxthreads =================================================================== --- trunk/exp-drd/tests/pth_barrier3.stderr.exp-linuxthreads (rev 0) +++ trunk/exp-drd/tests/pth_barrier3.stderr.exp-linuxthreads 2008-03-04 18:37:20 UTC (rev 7559) @@ -0,0 +1 @@ +ERROR SUMMARY: 0 errors from 0 contexts Added: trunk/exp-drd/tests/pth_broadcast.stderr.exp-linuxthreads =================================================================== --- trunk/exp-drd/tests/pth_broadcast.stderr.exp-linuxthreads (rev 0) +++ trunk/exp-drd/tests/pth_broadcast.stderr.exp-linuxthreads 2008-03-04 18:37:20 UTC (rev 7559) @@ -0,0 +1,7 @@ + +Detected the LinuxThreads threading library. Sorry, but DRD only supports +the newer NPTL (Native POSIX Threads Library). Please try to rerun DRD +after having upgraded to a newer version of your Linux distribution. +Giving up. + +ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) Added: trunk/exp-drd/tests/pth_cond_race.stderr.exp-linuxthreads =================================================================== --- trunk/exp-drd/tests/pth_cond_race.stderr.exp-linuxthreads (rev 0) +++ trunk/exp-drd/tests/pth_cond_race.stderr.exp-linuxthreads 2008-03-04 18:37:20 UTC (rev 7559) @@ -0,0 +1,7 @@ + +Detected the LinuxThreads threading library. Sorry, but DRD only supports +the newer NPTL (Native POSIX Threads Library). Please try to rerun DRD +after having upgraded to a newer version of your Linux distribution. +Giving up. + +ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) Added: trunk/exp-drd/tests/pth_cond_race2.stderr.exp-linuxthreads =================================================================== --- trunk/exp-drd/tests/pth_cond_race2.stderr.exp-linuxthreads (rev 0) +++ trunk/exp-drd/tests/pth_cond_race2.stderr.exp-linuxthreads 2008-03-04 18:37:20 UTC (rev 7559) @@ -0,0 +1,7 @@ + +Detected the LinuxThreads threading library. Sorry, but DRD only supports +the newer NPTL (Native POSIX Threads Library). Please try to rerun DRD +after having upgraded to a newer version of your Linux distribution. +Giving up. + +ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) Added: trunk/exp-drd/tests/pth_create_chain.stderr.exp-linuxthreads =================================================================== --- trunk/exp-drd/tests/pth_create_chain.stderr.exp-linuxthreads (rev 0) +++ trunk/exp-drd/tests/pth_create_chain.stderr.exp-linuxthreads 2008-03-04 18:37:20 UTC (rev 7559) @@ -0,0 +1,7 @@ + +Detected the LinuxThreads threading library. Sorry, but DRD only supports +the newer NPTL (Native POSIX Threads Library). Please try to rerun DRD +after having upgraded to a newer version of your Linux distribution. +Giving up. + +ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) Added: trunk/exp-drd/tests/pth_detached.stderr.exp-linuxthreads =================================================================== --- trunk/exp-drd/tests/pth_detached.stderr.exp-linuxthreads (rev 0) +++ trunk/exp-drd/tests/pth_detached.stderr.exp-linuxthreads 2008-03-04 18:37:20 UTC (rev 7559) @@ -0,0 +1,7 @@ + +Detected the LinuxThreads threading library. Sorry, but DRD only supports +the newer NPTL (Native POSIX Threads Library). Please try to rerun DRD +after having upgraded to a newer version of your Linux distribution. +Giving up. + +ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) Added: trunk/exp-drd/tests/pth_detached.stdout.exp-linuxthreads =================================================================== Added: trunk/exp-drd/tests/pth_detached2.stderr.exp-linuxthreads =================================================================== --- trunk/exp-drd/tests/pth_detached2.stderr.exp-linuxthreads (rev 0) +++ trunk/exp-drd/tests/pth_detached2.stderr.exp-linuxthreads 2008-03-04 18:37:20 UTC (rev 7559) @@ -0,0 +1,7 @@ + +Detected the LinuxThreads threading library. Sorry, but DRD only supports +the newer NPTL (Native POSIX Threads Library). Please try to rerun DRD +after having upgraded to a newer version of your Linux distribution. +Giving up. + +ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) Added: trunk/exp-drd/tests/pth_detached2.stdout.exp-linuxthreads =================================================================== Added: trunk/exp-drd/tests/rwlock_race.stderr.exp-linuxthreads =================================================================== --- trunk/exp-drd/tests/rwlock_race.stderr.exp-linuxthreads (rev 0) +++ trunk/exp-drd/tests/rwlock_race.stderr.exp-linuxthreads 2008-03-04 18:37:20 UTC (rev 7559) @@ -0,0 +1,7 @@ + +Detected the LinuxThreads threading library. Sorry, but DRD only supports +the newer NPTL (Native POSIX Threads Library). Please try to rerun DRD +after having upgraded to a newer version of your Linux distribution. +Giving up. + +ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) Added: trunk/exp-drd/tests/sem_as_mutex.stderr.exp-linuxthreads =================================================================== --- trunk/exp-drd/tests/sem_as_mutex.stderr.exp-linuxthreads (rev 0) +++ trunk/exp-drd/tests/sem_as_mutex.stderr.exp-linuxthreads 2008-03-04 18:37:20 UTC (rev 7559) @@ -0,0 +1,7 @@ + +Detected the LinuxThreads threading library. Sorry, but DRD only supports +the newer NPTL (Native POSIX Threads Library). Please try to rerun DRD +after having upgraded to a newer version of your Linux distribution. +Giving up. + +ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) Added: trunk/exp-drd/tests/sem_as_mutex2.stderr.exp-linuxthreads =================================================================== --- trunk/exp-drd/tests/sem_as_mutex2.stderr.exp-linuxthreads (rev 0) +++ trunk/exp-drd/tests/sem_as_mutex2.stderr.exp-linuxthreads 2008-03-04 18:37:20 UTC (rev 7559) @@ -0,0 +1,7 @@ + +Detected the LinuxThreads threading library. Sorry, but DRD only supports +the newer NPTL (Native POSIX Threads Library). Please try to rerun DRD +after having upgraded to a newer version of your Linux distribution. +Giving up. + +ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) Added: trunk/exp-drd/tests/sigalrm.stderr.exp-linuxthreads =================================================================== --- trunk/exp-drd/tests/sigalrm.stderr.exp-linuxthreads (rev 0) +++ trunk/exp-drd/tests/sigalrm.stderr.exp-linuxthreads 2008-03-04 18:37:20 UTC (rev 7559) @@ -0,0 +1,7 @@ + +Detected the LinuxThreads threading library. Sorry, but DRD only supports +the newer NPTL (Native POSIX Threads Library). Please try to rerun DRD +after having upgraded to a newer version of your Linux distribution. +Giving up. + +ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) Added: trunk/exp-drd/tests/tc01_simple_race.stderr.exp-linuxthreads =================================================================== --- trunk/exp-drd/tests/tc01_simple_race.stderr.exp-linuxthreads (rev 0) +++ trunk/exp-drd/tests/tc01_simple_race.stderr.exp-linuxthreads 2008-03-04 18:37:20 UTC (rev 7559) @@ -0,0 +1,7 @@ + +Detected the LinuxThreads threading library. Sorry, but DRD only supports +the newer NPTL (Native POSIX Threads Library). Please try to rerun DRD +after having upgraded to a newer version of your Linux distribution. +Giving up. + +ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) Added: trunk/exp-drd/tests/tc02_simple_tls.stderr.exp-linuxthreads =================================================================== --- trunk/exp-drd/tests/tc02_simple_tls.stderr.exp-linuxthreads (rev 0) +++ trunk/exp-drd/tests/tc02_simple_tls.stderr.exp-linuxthreads 2008-03-04 18:37:20 UTC (rev 7559) @@ -0,0 +1,7 @@ + +Detected the LinuxThreads threading library. Sorry, but DRD only supports +the newer NPTL (Native POSIX Threads Library). Please try to rerun DRD +after having upgraded to a newer version of your Linux distribution. +Giving up. + +ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) Added: trunk/exp-drd/tests/tc03_re_excl.stderr.exp-linuxthreads =================================================================== --- trunk/exp-drd/tests/tc03_re_excl.stderr.exp-linuxthreads (rev 0) +++ trunk/exp-drd/tests/tc03_re_excl.stderr.exp-linuxthreads 2008-03-04 18:37:20 UTC (rev 7559) @@ -0,0 +1,7 @@ + +Detected the LinuxThreads threading library. Sorry, but DRD only supports +the newer NPTL (Native POSIX Threads Library). Please try to rerun DRD +after having upgraded to a newer version of your Linux distribution. +Giving up. + +ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) Added: trunk/exp-drd/tests/tc04_free_lock.stderr.exp-linuxthreads =================================================================== --- trunk/exp-drd/tests/tc04_free_lock.stderr.exp-linuxthreads (rev 0) +++ trunk/exp-drd/tests/tc04_free_lock.stderr.exp-linuxthreads 2008-03-04 18:37:20 UTC (rev 7559) @@ -0,0 +1,18 @@ + +Destroying locked mutex: mutex 0x........, recursion count 1, owner 1. + at 0x........: free (vg_replace_malloc.c:...) + by 0x........: main (../../helgrind/tests/tc04_free_lock.c:24) + +Destroying locked mutex: mutex 0x........, recursion count 1, owner 1. + at 0x........: bar (../../helgrind/tests/tc04_free_lock.c:40) + by 0x........: main (../../helgrind/tests/tc04_free_lock.c:26) + +Destroying locked mutex: mutex 0x........, recursion count 1, owner 1. + at 0x........: foo (../../helgrind/tests/tc04_free_lock.c:49) + by 0x........: main (../../helgrind/tests/tc04_free_lock.c:27) + +Destroying locked mutex: mutex 0x........, recursion count 1, owner 1. + at 0x........: bar (../../helgrind/tests/tc04_free_lock.c:40) + by 0x........: main (../../helgrind/tests/tc04_free_lock.c:28) + +ERROR SUMMARY: 4 errors from 4 contexts (suppressed: 0 from 0) Added: trunk/exp-drd/tests/tc05_simple_race.stderr.exp-linuxthreads =================================================================== --- trunk/exp-drd/tests/tc05_simple_race.stderr.exp-linuxthreads (rev 0) +++ trunk/exp-drd/tests/tc05_simple_race.stderr.exp-linuxthreads 2008-03-04 18:37:20 UTC (rev 7559) @@ -0,0 +1 @@ +ERROR SUMMARY: 0 errors from 0 contexts Added: trunk/exp-drd/tests/tc06_two_races.stderr.exp-linuxthreads =================================================================== --- trunk/exp-drd/tests/tc06_two_races.stderr.exp-linuxthreads (rev 0) +++ trunk/exp-drd/tests/tc06_two_races.stderr.exp-linuxthreads 2008-03-04 18:37:20 UTC (rev 7559) @@ -0,0 +1 @@ +ERROR SUMMARY: 0 errors from 0 contexts Added: trunk/exp-drd/tests/tc09_bad_unlock.stderr.exp-linuxthreads =================================================================== --- trunk/exp-drd/tests/tc09_bad_unlock.stderr.exp-linuxthreads (rev 0) +++ trunk/exp-drd/tests/tc09_bad_unlock.stderr.exp-linuxthreads 2008-03-04 18:37:20 UTC (rev 7559) @@ -0,0 +1,11 @@ + +Mutex not locked by calling thread: mutex 0x........, recursion count 0, owner 1. + at 0x........: pthread_mutex_unlock (drd_intercepts.c:?) + by 0x........: nearly_main (../../helgrind/tests/tc09_bad_unlock.c:27) + by 0x........: main (../../helgrind/tests/tc09_bad_unlock.c:49) +Detected the LinuxThreads threading library. Sorry, but DRD only supports +the newer NPTL (Native POSIX Threads Library). Please try to rerun DRD +after having upgraded to a newer version of your Linux distribution. +Giving up. + +ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) Added: trunk/exp-drd/tests/tc10_rec_lock.stderr.exp-linuxthreads =================================================================== --- trunk/exp-drd/tests/tc10_rec_lock.stderr.exp-linuxthreads (rev 0) +++ trunk/exp-drd/tests/tc10_rec_lock.stderr.exp-linuxthreads 2008-03-04 18:37:20 UTC (rev 7559) @@ -0,0 +1,14 @@ + +before lock #1 +before lock #2 +before lock #3 +before unlock #1 +before unlock #2 +before unlock #3 +before unlock #4 +Mutex not locked by calling thread: mutex 0x........, recursion count 0, owner 1. + at 0x........: pthread_mutex_unlock (drd_intercepts.c:?) + by 0x........: nearly_main (../../helgrind/tests/tc10_rec_lock.c:42) + by 0x........: main (../../helgrind/tests/tc10_rec_lock.c:47) + +ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) Added: trunk/exp-drd/tests/tc11_XCHG.stderr.exp-linuxthreads =================================================================== --- trunk/exp-drd/tests/tc11_XCHG.stderr.exp-linuxthreads (rev 0) +++ trunk/exp-drd/tests/tc11_XCHG.stderr.exp-linuxthreads 2008-03-04 18:37:20 UTC (rev 7559) @@ -0,0 +1,7 @@ + +Detected the LinuxThreads threading library. Sorry, but DRD only supports +the newer NPTL (Native POSIX Threads Library). Please try to rerun DRD +after having upgraded to a newer version of your Linux distribution. +Giving up. + +ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) Added: trunk/exp-drd/tests/tc11_XCHG.stdout.exp-linuxthreads =================================================================== Added: trunk/exp-drd/tests/tc12_rwl_trivial.stderr.exp-linuxthreads =================================================================== --- trunk/exp-drd/tests/tc12_rwl_trivial.stderr.exp-linuxthreads (rev 0) +++ trunk/exp-drd/tests/tc12_rwl_trivial.stderr.exp-linuxthreads 2008-03-04 18:37:20 UTC (rev 7559) @@ -0,0 +1,7 @@ + +Reader-writer lock not locked by calling thread: rwlock 0x......... + at 0x........: pthread_rwlock_unlock* (drd_intercepts.c:?) + by 0x........: main (../../helgrind/tests/tc12_rwl_trivial.c:29) +tc12_rwl_trivial: ../../helgrind/tests/tc12_rwl_trivial.c:29: main: Assertion `r == 0' failed. + +ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0) Added: trunk/exp-drd/tests/tc16_byterace.stderr.exp-linuxthreads =================================================================== --- trunk/exp-drd/tests/tc16_byterace.stderr.exp-linuxthreads (rev 0) +++ trunk/exp-drd/tests/tc16_byterace.stderr.exp-linuxthreads 2008-03-04 18:37:20 UTC (rev 7559) @@ -0,0 +1,7 @@ + +Detected the LinuxThreads threading library. Sorry, but DRD only supports +the newer NPTL (Native POSIX Threads Library). Please try to rerun DRD +after having upgraded to a newer version of your Linux distribution. +Giving up. + +ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) Added: trunk/exp-drd/tests/tc17_sembar.stderr.exp-linuxthreads =================================================================== --- trunk/exp-drd/tests/tc17_sembar.stderr.exp-linuxthreads (rev 0) +++ trunk/exp-drd/tests/tc17_sembar.stderr.exp-linuxthreads 2008-03-04 18:37:20 UTC (rev 7559) @@ -0,0 +1,8 @@ + +starting +Detected the LinuxThreads threading library. Sorry, but DRD only supports +the newer NPTL (Native POSIX Threads Library). Please try to rerun DRD +after having upgraded to a newer version of your Linux distribution. +Giving up. + +ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) Added: trunk/exp-drd/tests/tc18_semabuse.stderr.exp-linuxthreads =================================================================== --- trunk/exp-drd/tests/tc18_semabuse.stderr.exp-linuxthreads (rev 0) +++ trunk/exp-drd/tests/tc18_semabuse.stderr.exp-linuxthreads 2008-03-04 18:37:20 UTC (rev 7559) @@ -0,0 +1,7 @@ + +Detected the LinuxThreads threading library. Sorry, but DRD only supports +the newer NPTL (Native POSIX Threads Library). Please try to rerun DRD +after having upgraded to a newer version of your Linux distribution. +Giving up. + +ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) Added: trunk/exp-drd/tests/tc20_verifywrap.stderr.exp-linuxthreads =================================================================== --- trunk/exp-drd/tests/tc20_verifywrap.stderr.exp-linuxthreads (rev 0) +++ trunk/exp-drd/tests/tc20_verifywrap.stderr.exp-linuxthreads 2008-03-04 18:37:20 UTC (rev 7559) @@ -0,0 +1,13 @@ + + + +------ This is output for < glibc 2.4 ------ + +---------------- pthread_create/join ---------------- + +Detected the LinuxThreads threading library. Sorry, but DRD only supports +the newer NPTL (Native POSIX Threads Library). Please try to rerun DRD +after having upgraded to a newer version of your Linux distribution. +Giving up. + +ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) Added: trunk/exp-drd/tests/tc20_verifywrap2.stderr.exp-linuxthreads =================================================================== --- trunk/exp-drd/tests/tc20_verifywrap2.stderr.exp-linuxthreads (rev 0) +++ trunk/exp-drd/tests/tc20_verifywrap2.stderr.exp-linuxthreads 2008-03-04 18:37:20 UTC (rev 7559) @@ -0,0 +1,41 @@ + +[1/1] pre_mutex_lock (?) 0x........ rc 0 owner 0 +[1/1] mutex_init mutex 0x........ +[1/1] post_mutex_lock mutex 0x........ rc 0 owner 0 +[1/1] mutex_unlock mutex 0x........ rc 1 +[1/1] pre_mutex_lock (?) 0x........ rc 0 owner 0 +[1/1] mutex_init mutex 0x........ +[1/1] post_mutex_lock mutex 0x........ rc 0 owner 0 +[1/1] mutex_unlock mutex 0x........ rc 1 +[1/1] pre_mutex_lock mutex 0x........ rc 0 owner 1 +[1/1] post_mutex_lock mutex 0x........ rc 0 owner 1 +[1/1] mutex_unlock mutex 0x........ rc 1 +[1/1] pre_mutex_lock mutex 0x........ rc 0 owner 1 +[1/1] post_mutex_lock mutex 0x........ rc 0 owner 1 +[1/1] mutex_unlock mutex 0x........ rc 1 +[1/1] pre_mutex_lock (?) 0x........ rc 0 owner 0 +[1/1] mutex_init recursive mutex 0x........ +[1/1] post_mutex_lock recursive mutex 0x........ rc 0 owner 0 + + +------ This is output for < glibc 2.4 ------ +[1/1] mutex_unlock recursive mutex 0x........ rc 1 +[1/1] pre_mutex_lock recursive mutex 0x........ rc 0 owner 1 +[1/1] post_mutex_lock recursive mutex 0x........ rc 0 owner 1 + +---------------- pthread_create/join ---------------- + +[1/1] mutex_unlock recursive mutex 0x........ rc 1 +[1/1] pre_mutex_lock recursive mutex 0x........ rc 0 owner 1 +[1/1] post_mutex_lock recursive mutex 0x........ rc 0 owner 1 +Detected the LinuxThreads threading library. Sorry, but DRD only supports +the newer NPTL (Native POSIX Threads Library). Please try to rerun DRD +after having upgraded to a newer version of your Linux distribution. +Giving up. +[1/1] mutex_unlock recursive mutex 0x........ rc 1 +[1/1] pre_mutex_lock (?) 0x........ rc 0 owner 0 +[1/1] mutex_init recursive mutex 0x........ +[1/1] post_mutex_lock recursive mutex 0x........ rc 0 owner 0 +[1/1] mutex_unlock recursive mutex 0x........ rc 1 + +ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) Added: trunk/exp-drd/tests/tc21_pthonce.stderr.exp-linuxthreads =================================================================== --- trunk/exp-drd/tests/tc21_pthonce.stderr.exp-linuxthreads (rev 0) +++ trunk/exp-drd/tests/tc21_pthonce.stderr.exp-linuxthreads 2008-03-04 18:37:20 UTC (rev 7559) @@ -0,0 +1,7 @@ + +Detected the LinuxThreads threading library. Sorry, but DRD only supports +the newer NPTL (Native POSIX Threads Library). Please try to rerun DRD +after having upgraded to a newer version of your Linux distribution. +Giving up. + +ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) Added: trunk/exp-drd/tests/tc21_pthonce.stdout.exp-linuxthreads =================================================================== Added: trunk/exp-drd/tests/tc22_exit_w_lock.stderr.exp-linuxthreads =================================================================== --- trunk/exp-drd/tests/tc22_exit_w_lock.stderr.exp-linuxthreads (rev 0) +++ trunk/exp-drd/tests/tc22_exit_w_lock.stderr.exp-linuxthreads 2008-03-04 18:37:20 UTC (rev 7559) @@ -0,0 +1,7 @@ + +Detected the LinuxThreads threading library. Sorry, but DRD only supports +the newer NPTL (Native POSIX Threads Library). Please try to rerun DRD +after having upgraded to a newer version of your Linux distribution. +Giving up. + +ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) Added: trunk/exp-drd/tests/tc23_bogus_condwait.stderr.exp-linuxthreads =================================================================== --- trunk/exp-drd/tests/tc23_bogus_condwait.stderr.exp-linuxthreads (rev 0) +++ trunk/exp-drd/tests/tc23_bogus_condwait.stderr.exp-linuxthreads 2008-03-04 18:37:20 UTC (rev 7559) @@ -0,0 +1,7 @@ + +Detected the LinuxThreads threading library. Sorry, but DRD only supports +the newer NPTL (Native POSIX Threads Library). Please try to rerun DRD +after having upgraded to a newer version of your Linux distribution. +Giving up. + +ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) Added: trunk/exp-drd/tests/trylock.stderr.exp-linuxthreads =================================================================== --- trunk/exp-drd/tests/trylock.stderr.exp-linuxthreads (rev 0) +++ trunk/exp-drd/tests/trylock.stderr.exp-linuxthreads 2008-03-04 18:37:20 UTC (rev 7559) @@ -0,0 +1,7 @@ + +Locking rwlock via pthread_rwlock_wrlock(). +Locking rwlock via pthread_rwlock_trywrlock(). +Locking rwlock via pthread_rwlock_timedwrlock(). +trylock: trylock.c:36: main: Assertion `r == 0' failed. + +ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0) |
|
From: <sv...@va...> - 2008-03-04 18:36:23
|
Author: bart
Date: 2008-03-04 18:36:23 +0000 (Tue, 04 Mar 2008)
New Revision: 7558
Log:
Replaced non-deterministic LinuxThreads test by a deterministic one (the time at which getpid() was called in the created thread did depend on how the Valgrind core scheduled threads).
Modified:
trunk/exp-drd/drd_intercepts.c
Modified: trunk/exp-drd/drd_intercepts.c
===================================================================
--- trunk/exp-drd/drd_intercepts.c 2008-03-04 11:52:39 UTC (rev 7557)
+++ trunk/exp-drd/drd_intercepts.c 2008-03-04 18:36:23 UTC (rev 7558)
@@ -47,12 +47,12 @@
#endif
#include <assert.h>
-#include <inttypes.h> // uintptr_t
+#include <inttypes.h> // uintptr_t
#include <pthread.h>
#include <semaphore.h>
#include <stdio.h>
#include <stdlib.h>
-#include <unistd.h>
+#include <unistd.h> // confstr()
#include "drd_clientreq.h"
#include "pub_tool_redir.h"
@@ -83,7 +83,6 @@
// Local variables.
static int vg_main_thread_state_is_set = 0;
-static pid_t vg_main_thread_pid;
// Function definitions.
@@ -141,28 +140,6 @@
{
int res;
- if (getpid() != vg_main_thread_pid)
- {
- if (getenv("LD_ASSUME_KERNEL"))
- {
- fprintf(stderr,
-"Detected the LinuxThreads threading library. Sorry, but DRD only supports\n"
-"the newer NPTL (Native POSIX Threads Library). Please try to rerun DRD\n"
-"after having unset the environment variable LD_ASSUME_KERNEL. Giving up.\n"
- );
- }
- else
- {
- fprintf(stderr,
-"Detected the LinuxThreads threading library. Sorry, but DRD only supports\n"
-"the newer NPTL (Native POSIX Threads Library). Please try to rerun DRD\n"
-"after having upgraded to a newer version of your Linux distribution.\n"
-"Giving up.\n"
- );
- }
- abort();
- }
-
VALGRIND_DO_CLIENT_REQUEST(res, 0, VG_USERREQ__DRD_SUPPRESS_CURRENT_STACK,
0, 0, 0, 0, 0);
@@ -188,11 +165,51 @@
}
}
+static int detected_linuxthreads(void)
+{
+#if defined(linux)
+#if defined(_CS_GNU_LIBPTHREAD_VERSION)
+ /* Linux with a recent glibc. */
+ char buffer[256];
+ int len;
+ len = confstr(_CS_GNU_LIBPTHREAD_VERSION, buffer, sizeof(buffer));
+ assert(len <= sizeof(buffer));
+ return len > 0 && buffer[0] == 'l';
+#else
+ /* Linux without _CS_GNU_LIBPTHREAD_VERSION: most likely LinuxThreads. */
+ return 1;
+#endif
+#else
+ /* Another OS than Linux, hence no LinuxThreads. */
+ return 0;
+#endif
+}
+
static void vg_set_main_thread_state(void)
{
int res;
- vg_main_thread_pid = getpid();
+ if (detected_linuxthreads())
+ {
+ if (getenv("LD_ASSUME_KERNEL"))
+ {
+ fprintf(stderr,
+"Detected the LinuxThreads threading library. Sorry, but DRD only supports\n"
+"the newer NPTL (Native POSIX Threads Library). Please try to rerun DRD\n"
+"after having unset the environment variable LD_ASSUME_KERNEL. Giving up.\n"
+ );
+ }
+ else
+ {
+ fprintf(stderr,
+"Detected the LinuxThreads threading library. Sorry, but DRD only supports\n"
+"the newer NPTL (Native POSIX Threads Library). Please try to rerun DRD\n"
+"after having upgraded to a newer version of your Linux distribution.\n"
+"Giving up.\n"
+ );
+ }
+ abort();
+ }
VALGRIND_DO_CLIENT_REQUEST(res, -1, VG_USERREQ__DRD_SUPPRESS_CURRENT_STACK,
0, 0, 0, 0, 0);
|
|
From: Ali J. <a.j...@gm...> - 2008-03-04 18:19:00
|
Hi Julian, Which modifications do we need to use Helgrind on OpenMP. Is there any patch to use? Actually I am interested to compare MSMunika and MSMhelgrind on some benchmarks and student projects which have used OpenMP. By the way I am checking MSMunika on few applications and benchmarks. Compare to MSMHelgrind it is more accurate and find real bugs without giving many false positives. I Will send u the results when it is ready. It would be nice if you could introduce me some real Applications (as MSMunika uses 64-bit for Sval) or if you are interested I will send you the implemented patch to test or review. Thank you Ali |
|
From: Tom H. <th...@cy...> - 2008-03-04 14:25:00
|
Nightly build on dellow ( x86_64, Fedora 8 ) started at 2008-03-04 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 == 409 tests, 79 stderr failures, 3 stdout failures, 0 post failures == memcheck/tests/pointer-trace (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/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/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/tc04_free_lock (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/tc10_rec_lock (stderr) helgrind/tests/tc11_XCHG (stderr) helgrind/tests/tc12_rwl_trivial (stderr) helgrind/tests/tc13_laog1 (stderr) helgrind/tests/tc14_laog_dinphils (stderr) helgrind/tests/tc15_laog_lockdel (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/fp_race (stderr) exp-drd/tests/fp_race2 (stderr) exp-drd/tests/hg01_all_ok (stderr) exp-drd/tests/hg02_deadlock (stderr) exp-drd/tests/hg03_inherit (stderr) exp-drd/tests/hg04_race (stderr) exp-drd/tests/hg05_race2 (stderr) exp-drd/tests/hg06_readshared (stderr) exp-drd/tests/matinv (stderr) exp-drd/tests/pth_broadcast (stderr) exp-drd/tests/pth_cond_race (stderr) exp-drd/tests/pth_cond_race2 (stderr) exp-drd/tests/pth_create_chain (stderr) exp-drd/tests/pth_detached (stderr) exp-drd/tests/pth_detached2 (stderr) exp-drd/tests/recursive_mutex (stderr) exp-drd/tests/rwlock_race (stderr) exp-drd/tests/sem_as_mutex (stderr) exp-drd/tests/sem_as_mutex2 (stderr) exp-drd/tests/sigalrm (stderr) exp-drd/tests/tc01_simple_race (stderr) exp-drd/tests/tc02_simple_tls (stderr) exp-drd/tests/tc03_re_excl (stderr) exp-drd/tests/tc04_free_lock (stderr) exp-drd/tests/tc09_bad_unlock (stderr) exp-drd/tests/tc10_rec_lock (stderr) exp-drd/tests/tc11_XCHG (stderr) exp-drd/tests/tc12_rwl_trivial (stderr) exp-drd/tests/tc13_laog1 (stderr) exp-drd/tests/tc15_laog_lockdel (stderr) exp-drd/tests/tc16_byterace (stderr) exp-drd/tests/tc17_sembar (stderr) exp-drd/tests/tc18_semabuse (stderr) exp-drd/tests/tc20_verifywrap (stderr) exp-drd/tests/tc20_verifywrap2 (stderr) exp-drd/tests/tc21_pthonce (stderr) exp-drd/tests/tc22_exit_w_lock (stderr) exp-drd/tests/tc23_bogus_condwait (stderr) exp-drd/tests/trylock (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 == 408 tests, 78 stderr failures, 2 stdout failures, 0 post failures == memcheck/tests/pointer-trace (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/vcpu_fnfns (stdout) memcheck/tests/x86/scalar (stderr) none/tests/faultstatus (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) 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/tc04_free_lock (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/tc10_rec_lock (stderr) helgrind/tests/tc11_XCHG (stderr) helgrind/tests/tc12_rwl_trivial (stderr) helgrind/tests/tc13_laog1 (stderr) helgrind/tests/tc14_laog_dinphils (stderr) helgrind/tests/tc15_laog_lockdel (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/fp_race (stderr) exp-drd/tests/fp_race2 (stderr) exp-drd/tests/hg01_all_ok (stderr) exp-drd/tests/hg02_deadlock (stderr) exp-drd/tests/hg03_inherit (stderr) exp-drd/tests/hg04_race (stderr) exp-drd/tests/hg05_race2 (stderr) exp-drd/tests/hg06_readshared (stderr) exp-drd/tests/matinv (stderr) exp-drd/tests/pth_broadcast (stderr) exp-drd/tests/pth_cond_race (stderr) exp-drd/tests/pth_cond_race2 (stderr) exp-drd/tests/pth_create_chain (stderr) exp-drd/tests/pth_detached (stderr) exp-drd/tests/pth_detached2 (stderr) exp-drd/tests/recursive_mutex (stderr) exp-drd/tests/sem_as_mutex (stderr) exp-drd/tests/sem_as_mutex2 (stderr) exp-drd/tests/sigalrm (stderr) exp-drd/tests/tc01_simple_race (stderr) exp-drd/tests/tc02_simple_tls (stderr) exp-drd/tests/tc03_re_excl (stderr) exp-drd/tests/tc04_free_lock (stderr) exp-drd/tests/tc09_bad_unlock (stderr) exp-drd/tests/tc10_rec_lock (stderr) exp-drd/tests/tc11_XCHG (stderr) exp-drd/tests/tc12_rwl_trivial (stderr) exp-drd/tests/tc13_laog1 (stderr) exp-drd/tests/tc15_laog_lockdel (stderr) exp-drd/tests/tc16_byterace (stderr) exp-drd/tests/tc17_sembar (stderr) exp-drd/tests/tc18_semabuse (stderr) exp-drd/tests/tc20_verifywrap (stderr) exp-drd/tests/tc20_verifywrap2 (stderr) exp-drd/tests/tc21_pthonce (stderr) exp-drd/tests/tc22_exit_w_lock (stderr) exp-drd/tests/tc23_bogus_condwait (stderr) exp-drd/tests/trylock (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Tue Mar 4 14:08:55 2008 --- new.short Tue Mar 4 14:24:59 2008 *************** *** 8,10 **** ! == 408 tests, 78 stderr failures, 2 stdout failures, 0 post failures == memcheck/tests/pointer-trace (stderr) --- 8,10 ---- ! == 409 tests, 79 stderr failures, 3 stdout failures, 0 post failures == memcheck/tests/pointer-trace (stderr) *************** *** 21,22 **** --- 21,23 ---- none/tests/mremap2 (stdout) + none/tests/pth_cvsimple (stdout) helgrind/tests/hg01_all_ok (stderr) *************** *** 67,68 **** --- 68,70 ---- exp-drd/tests/recursive_mutex (stderr) + exp-drd/tests/rwlock_race (stderr) exp-drd/tests/sem_as_mutex (stderr) |
|
From: Josef W. <Jos...@gm...> - 2008-03-04 14:01:16
|
On Monday 03 March 2008, Julian Seward wrote: > I intend to merge the DATASYMS branch to trunk shortly. Hi Julian, some time ago there was the wish for a call tree trace similar to strace/ltrace via valgrind. Can your machinary help to add parameter name/type information the such a call tree trace? I assume one has to check the number of parameters, their type, and extract the values from the stack when entering functions. Is it easy to get at this information now? Josef |
|
From: <sv...@va...> - 2008-03-04 11:52:35
|
Author: sewardj
Date: 2008-03-04 11:52:39 +0000 (Tue, 04 Mar 2008)
New Revision: 7557
Log:
A bit of tidying of SVal and Segment{ID,Set} primitives.
Modified:
branches/HGDEV/helgrind/hg_main.c
Modified: branches/HGDEV/helgrind/hg_main.c
===================================================================
--- branches/HGDEV/helgrind/hg_main.c 2008-03-04 11:26:51 UTC (rev 7556)
+++ branches/HGDEV/helgrind/hg_main.c 2008-03-04 11:52:39 UTC (rev 7557)
@@ -1018,51 +1018,46 @@
//------------- segment set, lock set --------------
-const int SEGMENT_SET_BITS = 26;
-const int LOCK_SET_BITS = 24;
+#define SEGMENT_SET_BITS 26
+#define LOCK_SET_BITS 24
-const SVal SHVAL_New = ((SVal)(2<<8));
-const SVal SHVAL_NoAccess = ((SVal)(1<<8));
-const SVal SHVAL_Invalid = ((SVal)(0));
-const SVal SHVAL_Race = ((SVal)(1ULL << 62));
+#define SHVAL_New ((SVal)(2<<8))
+#define SHVAL_NoAccess ((SVal)(1<<8))
+#define SHVAL_Invalid ((SVal)(0))
+#define SHVAL_Race ((SVal)(1ULL << 62))
-typedef ULong SegmentSet;
-typedef WordSetID LockSet;
+typedef ULong SegmentSet;
+typedef WordSetID LockSet;
static inline Bool SS_valid (SegmentSet ss) {
- return ss < (1ULL << SEGMENT_SET_BITS);
+ return ss < (1ULL << SEGMENT_SET_BITS);
}
-static inline Bool SS_is_singleton (SegmentSet ss)
-{
+static inline Bool SS_is_singleton (SegmentSet ss) {
return (ss & (1ULL << (SEGMENT_SET_BITS-1))) != 0;
}
-static inline UWord SS_get_size (SegmentSet ss)
-{
+static inline UWord SS_get_size (SegmentSet ss) {
if (SS_is_singleton(ss)) return 1;
tl_assert(HG_(cardinalityWSU)(univ_ssets) > ss);
return HG_(cardinalityWS)(univ_ssets, ss);
}
-static inline SegmentSet SS_mk_singleton (SegmentID ss)
-{
+static inline SegmentSet SS_mk_singleton (SegmentID ss) {
tl_assert(SEG_id_is_sane(ss));
ss |= (1ULL << (SEGMENT_SET_BITS-1));
tl_assert(SS_is_singleton(ss));
return ss;
}
-static inline SegmentID SS_get_singleton (SegmentSet ss)
-{
+static inline SegmentID SS_get_singleton (SegmentSet ss) {
tl_assert(SS_is_singleton(ss));
ss &= ~(1ULL << (SEGMENT_SET_BITS-1));
tl_assert(SEG_id_is_sane(ss));
return ss;
}
-static inline SegmentID SS_get_element (SegmentSet ss, UWord i)
-{
+static inline SegmentID SS_get_element (SegmentSet ss, UWord i) {
UWord nWords, *words;
if (SS_is_singleton(ss))
return SS_get_singleton(ss);
@@ -1071,12 +1066,10 @@
return words[i];
}
-
static inline Bool LS_valid (LockSet ls) {
- return ls < (1ULL << LOCK_SET_BITS);
+ return ls < (1ULL << LOCK_SET_BITS);
}
-
static inline SVal mk_SHVAL_RW (Bool is_w, SegmentSet ss, LockSet ls) {
SVal res;
tl_assert(SS_valid(ss));
@@ -1089,19 +1082,19 @@
return res;
}
static inline SVal mk_SHVAL_R (SegmentSet ss, LockSet ls) {
- return mk_SHVAL_RW(False, ss, ls);
+ return mk_SHVAL_RW(False, ss, ls);
}
static inline SVal mk_SHVAL_W (SegmentSet ss, LockSet ls) {
- return mk_SHVAL_RW(True, ss, ls);
+ return mk_SHVAL_RW(True, ss, ls);
}
static inline SegmentSet get_SHVAL_SS (SVal sv) {
- SegmentSet ss;
- int shift = 62 - SEGMENT_SET_BITS;
- int mask = (1 << SEGMENT_SET_BITS) - 1;
- ss = (sv >> shift) & mask;
- tl_assert(SS_valid(ss));
- return ss;
+ SegmentSet ss;
+ Int shift = 62 - SEGMENT_SET_BITS;
+ ULong mask = (1 << SEGMENT_SET_BITS) - 1;
+ ss = (sv >> shift) & mask;
+ tl_assert(SS_valid(ss));
+ return ss;
}
static inline LockSet get_SHVAL_LS (SVal sv) {
LockSet ls;
@@ -1131,8 +1124,8 @@
static inline Bool is_SHVAL_Race (SVal sv) {return sv == SHVAL_Race;}
static inline Bool is_SHVAL_valid ( SVal sv) {
- return is_SHVAL_RW(sv) || sv == SHVAL_Race
- || sv == SHVAL_New || sv == SHVAL_NoAccess;
+ return is_SHVAL_RW(sv) || is_SHVAL_Race(sv)
+ || is_SHVAL_New(sv) || is_SHVAL_NoAccess(sv);
}
@@ -3065,7 +3058,7 @@
LockSet currLS = is_w ? thr->locksetW
: thr->locksetA;
- if (UNLIKELY(sv_old == SHVAL_Race)) {
+ if (UNLIKELY(is_SHVAL_Race(sv_old))) {
// we already reported a race, don't bother again.
sv_new = sv_old;
goto done;
|
|
From: <sv...@va...> - 2008-03-04 11:26:49
|
Author: sewardj
Date: 2008-03-04 11:26:51 +0000 (Tue, 04 Mar 2008)
New Revision: 7556
Log:
memory_state_machine(): move unlikely cases to the end of the decision
tree, and add branch hints.
Modified:
branches/HGDEV/helgrind/hg_main.c
Modified: branches/HGDEV/helgrind/hg_main.c
===================================================================
--- branches/HGDEV/helgrind/hg_main.c 2008-03-04 01:58:47 UTC (rev 7555)
+++ branches/HGDEV/helgrind/hg_main.c 2008-03-04 11:26:51 UTC (rev 7556)
@@ -3046,21 +3046,18 @@
static
SVal memory_state_machine(Bool is_w, Thread* thr, Addr a, SVal sv_old, Int sz)
{
- Bool hb_all = False;
- UWord oldSS_size = 0;
- Bool was_w, now_w;
+ UWord i;
+ Bool was_w, now_w;
SegmentSet oldSS;
LockSet oldLS;
- Bool is_race = False;
- SVal sv_new = SHVAL_Invalid;
- Bool do_trace = clo_trace_level > 0
- && a >= clo_trace_addr
- && a < (clo_trace_addr+sz);
-
+ Bool hb_all = False;
+ UWord oldSS_size = 0;
+ Bool is_race = False;
+ SVal sv_new = SHVAL_Invalid;
+ Bool do_trace = clo_trace_level > 0
+ && a >= clo_trace_addr
+ && a < (clo_trace_addr+sz);
SegmentID currS = thr->csegid;
-
-
- UWord i;
SegmentSet newSS = 0;
LockSet newLS = 0;
@@ -3068,14 +3065,13 @@
LockSet currLS = is_w ? thr->locksetW
: thr->locksetA;
- if (sv_old == SHVAL_Race) {
+ if (UNLIKELY(sv_old == SHVAL_Race)) {
// we already reported a race, don't bother again.
sv_new = sv_old;
goto done;
}
-
- if (__bus_lock_Lock->heldBy
+ if (UNLIKELY(__bus_lock_Lock->heldBy)
&& (is_SHVAL_New(sv_old) || is_SHVAL_R(sv_old))) {
// BHL is held and we are in 'Read' or 'New' state.
// User is doing something very smart with LOCK prefix.
@@ -3097,18 +3093,67 @@
// - Any other write is a race.
}
+ tl_assert(is_sane_Thread(thr));
+ // Read or Write
+ if (LIKELY(is_SHVAL_RW(sv_old))) {
+ was_w = is_SHVAL_W(sv_old);
+ oldSS = get_SHVAL_SS(sv_old);
+ oldLS = get_SHVAL_LS(sv_old);
- tl_assert(is_sane_Thread(thr));
+ oldSS_size = SS_get_size(oldSS);
+ // update the segment set and compute hb_all
+ hb_all = True;
+ newSS = SS_mk_singleton(currS);
+ for (i = 0; i < oldSS_size; i++) {
+ SegmentID S = SS_get_element(oldSS, i);
+ Bool hb = False;
+ if (S == currS // Same segment.
+ || SEG_get(S)->thr == thr // Same thread.
+ || happens_before(S, currS)) {
+ // different thread, but happens-before
+ hb = True;
+ }
+ if (do_trace) {
+ VG_(printf)("HB(S%d/T%d,cur)=%d\n",
+ S, SEG_get(S)->thr->errmsg_index, hb);
+ }
- // NoAccess
- if (is_SHVAL_NoAccess(sv_old)) {
- // TODO: complain
- sv_new = sv_old;
+ if (!hb) {
+ hb_all = False;
+ // Not happened-before. Leave this segment in SS.
+ if (SS_is_singleton(newSS)) {
+ tl_assert(currS != S);
+ newSS = HG_(doubletonWS)(univ_ssets, currS, S);
+ } else {
+ newSS = HG_(addToWS)(univ_ssets, newSS, S);
+ }
+ }
+ }
+
+ // update lock set.
+ if (hb_all) {
+ newLS = currLS;
+ } else {
+ newLS = HG_(intersectWS)(univ_lsets, oldLS, currLS);
+ }
+
+ // update the state
+ now_w = is_w || (was_w && !hb_all);
+
+ // generate new SVal
+ sv_new = mk_SHVAL_RW(now_w, newSS, newLS);
+
+ is_race = now_w && !SS_is_singleton(newSS)
+ && HG_(isEmptyWS)(univ_lsets, newLS);
+
+ if (oldLS != newLS) {
+ // if the lockset changed, remember when it happened
+ record_last_lock_lossage(a, oldLS, newLS);
+ }
goto done;
}
-
// New
if (is_SHVAL_New(sv_old)) {
newSS = SS_mk_singleton(currS);
@@ -3116,69 +3161,20 @@
goto done;
}
-
- // Read or Write
- tl_assert(is_SHVAL_RW(sv_old));
- was_w = is_SHVAL_W(sv_old);
- oldSS = get_SHVAL_SS(sv_old);
- oldLS = get_SHVAL_LS(sv_old);
-
-
- oldSS_size = SS_get_size(oldSS);
- // update the segment set and compute hb_all
- hb_all = True;
- newSS = SS_mk_singleton(currS);
- for (i = 0; i < oldSS_size; i++) {
- SegmentID S = SS_get_element(oldSS, i);
- Bool hb = False;
- if (S == currS // Same segment.
- || SEG_get(S)->thr == thr // Same thread.
- || happens_before(S, currS)) { // different thread, but happens-before
- hb = True;
- }
- if (do_trace) {
- VG_(printf)("HB(S%d/T%d,cur)=%d\n",
- S, SEG_get(S)->thr->errmsg_index, hb);
- }
-
- if(!hb) {
- hb_all = False;
- // Not happened-before. Leave this segment in SS.
- if (SS_is_singleton(newSS)) {
- tl_assert(currS != S);
- newSS = HG_(doubletonWS)(univ_ssets, currS, S);
- } else {
- newSS = HG_(addToWS)(univ_ssets, newSS, S);
- }
- }
- }
-
- // update lock set.
- if (hb_all) {
- newLS = currLS;
- } else {
- newLS = HG_(intersectWS)(univ_lsets, oldLS, currLS);
+ // NoAccess
+ if (is_SHVAL_NoAccess(sv_old)) {
+ // TODO: complain
+ sv_new = sv_old;
+ goto done;
}
- // update the state
- now_w = is_w || (was_w && !hb_all);
+ /*NOTREACHED*/
+ tl_assert(0);
- // generate new SVal
- sv_new = mk_SHVAL_RW(now_w, newSS, newLS);
-
- is_race = now_w
- && !SS_is_singleton(newSS)
- && HG_(isEmptyWS)(univ_lsets, newLS);
-
- if (oldLS != newLS) {
- // if the lockset changed, remember when it happened
- record_last_lock_lossage(a, oldLS, newLS);
- }
-
done:
if (do_trace) {
- char buf[200];
+ HChar buf[200];
VG_(printf)("RW-Locks held: ");
show_lockset(thr->locksetA);
|
|
From: Tom H. <th...@cy...> - 2008-03-04 05:26:04
|
Nightly build on alvis ( i686, Red Hat 7.3 ) started at 2008-03-04 03:15:11 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 == 375 tests, 115 stderr failures, 6 stdout failures, 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/fp_race (stderr) exp-drd/tests/fp_race2 (stderr) exp-drd/tests/hg01_all_ok (stderr) exp-drd/tests/hg02_deadlock (stderr) exp-drd/tests/hg03_inherit (stderr) exp-drd/tests/hg04_race (stderr) exp-drd/tests/hg05_race2 (stderr) exp-drd/tests/hg06_readshared (stderr) exp-drd/tests/matinv (stdout) exp-drd/tests/matinv (stderr) exp-drd/tests/pth_barrier (stderr) exp-drd/tests/pth_barrier2 (stderr) exp-drd/tests/pth_barrier3 (stderr) exp-drd/tests/pth_broadcast (stderr) exp-drd/tests/pth_cond_race (stderr) exp-drd/tests/pth_cond_race2 (stderr) exp-drd/tests/pth_create_chain (stderr) exp-drd/tests/pth_detached (stdout) exp-drd/tests/pth_detached (stderr) exp-drd/tests/pth_detached2 (stdout) exp-drd/tests/pth_detached2 (stderr) exp-drd/tests/rwlock_race (stderr) exp-drd/tests/sem_as_mutex (stderr) exp-drd/tests/sem_as_mutex2 (stderr) exp-drd/tests/sigalrm (stderr) exp-drd/tests/tc01_simple_race (stderr) exp-drd/tests/tc02_simple_tls (stderr) exp-drd/tests/tc03_re_excl (stderr) exp-drd/tests/tc05_simple_race (stderr) exp-drd/tests/tc06_two_races (stderr) exp-drd/tests/tc09_bad_unlock (stderr) exp-drd/tests/tc11_XCHG (stdout) exp-drd/tests/tc11_XCHG (stderr) exp-drd/tests/tc12_rwl_trivial (stderr) exp-drd/tests/tc16_byterace (stderr) exp-drd/tests/tc17_sembar (stderr) exp-drd/tests/tc18_semabuse (stderr) exp-drd/tests/tc20_verifywrap (stderr) exp-drd/tests/tc20_verifywrap2 (stderr) exp-drd/tests/tc21_pthonce (stdout) exp-drd/tests/tc21_pthonce (stderr) exp-drd/tests/tc22_exit_w_lock (stderr) exp-drd/tests/tc23_bogus_condwait (stderr) exp-drd/tests/trylock (stderr) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Last 20 lines of verbose log follow echo trylock.c:17: warning: implicit declaration of function `pthread_rwlock_wrlock' trylock.c:18: warning: implicit declaration of function `pthread_rwlock_unlock' trylock.c:20: warning: implicit declaration of function `pthread_rwlock_trywrlock' trylock.c:23: warning: implicit declaration of function `pthread_rwlock_timedwrlock' trylock.c:26: warning: implicit declaration of function `pthread_rwlock_rdlock' trylock.c:33: warning: implicit declaration of function `pthread_rwlock_tryrdlock' trylock.c:36: warning: implicit declaration of function `pthread_rwlock_timedrdlock' trylock.c:38: warning: implicit declaration of function `pthread_rwlock_destroy' trylock.c:48: warning: implicit declaration of function `pthread_mutex_timedlock' make[5]: *** [trylock.o] Error 1 make[5]: Leaving directory `/tmp/vgtest/2008-03-04/valgrind/exp-drd/tests' make[4]: *** [check-am] Error 2 make[4]: Leaving directory `/tmp/vgtest/2008-03-04/valgrind/exp-drd/tests' make[3]: *** [check-recursive] Error 1 make[3]: Leaving directory `/tmp/vgtest/2008-03-04/valgrind/exp-drd/tests' make[2]: *** [check-recursive] Error 1 make[2]: Leaving directory `/tmp/vgtest/2008-03-04/valgrind/exp-drd' make[1]: *** [check-recursive] Error 1 make[1]: Leaving directory `/tmp/vgtest/2008-03-04/valgrind' make: *** [check] Error 2 ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Tue Mar 4 03:39:44 2008 --- new.short Tue Mar 4 05:26:09 2008 *************** *** 6,27 **** ! Last 20 lines of verbose log follow echo ! trylock.c:17: warning: implicit declaration of function `pthread_rwlock_wrlock' ! trylock.c:18: warning: implicit declaration of function `pthread_rwlock_unlock' ! trylock.c:20: warning: implicit declaration of function `pthread_rwlock_trywrlock' ! trylock.c:23: warning: implicit declaration of function `pthread_rwlock_timedwrlock' ! trylock.c:26: warning: implicit declaration of function `pthread_rwlock_rdlock' ! trylock.c:33: warning: implicit declaration of function `pthread_rwlock_tryrdlock' ! trylock.c:36: warning: implicit declaration of function `pthread_rwlock_timedrdlock' ! trylock.c:38: warning: implicit declaration of function `pthread_rwlock_destroy' ! trylock.c:48: warning: implicit declaration of function `pthread_mutex_timedlock' ! make[5]: *** [trylock.o] Error 1 ! make[5]: Leaving directory `/tmp/vgtest/2008-03-04/valgrind/exp-drd/tests' ! make[4]: *** [check-am] Error 2 ! make[4]: Leaving directory `/tmp/vgtest/2008-03-04/valgrind/exp-drd/tests' ! make[3]: *** [check-recursive] Error 1 ! make[3]: Leaving directory `/tmp/vgtest/2008-03-04/valgrind/exp-drd/tests' ! make[2]: *** [check-recursive] Error 1 ! make[2]: Leaving directory `/tmp/vgtest/2008-03-04/valgrind/exp-drd' ! make[1]: *** [check-recursive] Error 1 ! make[1]: Leaving directory `/tmp/vgtest/2008-03-04/valgrind' ! make: *** [check] Error 2 --- 6,160 ---- ! Regression test results follow ! ! == 375 tests, 115 stderr failures, 6 stdout failures, 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/fp_race (stderr) ! exp-drd/tests/fp_race2 (stderr) ! exp-drd/tests/hg01_all_ok (stderr) ! exp-drd/tests/hg02_deadlock (stderr) ! exp-drd/tests/hg03_inherit (stderr) ! exp-drd/tests/hg04_race (stderr) ! exp-drd/tests/hg05_race2 (stderr) ! exp-drd/tests/hg06_readshared (stderr) ! exp-drd/tests/matinv (stdout) ! exp-drd/tests/matinv (stderr) ! exp-drd/tests/pth_barrier (stderr) ! exp-drd/tests/pth_barrier2 (stderr) ! exp-drd/tests/pth_barrier3 (stderr) ! exp-drd/tests/pth_broadcast (stderr) ! exp-drd/tests/pth_cond_race (stderr) ! exp-drd/tests/pth_cond_race2 (stderr) ! exp-drd/tests/pth_create_chain (stderr) ! exp-drd/tests/pth_detached (stdout) ! exp-drd/tests/pth_detached (stderr) ! exp-drd/tests/pth_detached2 (stdout) ! exp-drd/tests/pth_detached2 (stderr) ! exp-drd/tests/rwlock_race (stderr) ! exp-drd/tests/sem_as_mutex (stderr) ! exp-drd/tests/sem_as_mutex2 (stderr) ! exp-drd/tests/sigalrm (stderr) ! exp-drd/tests/tc01_simple_race (stderr) ! exp-drd/tests/tc02_simple_tls (stderr) ! exp-drd/tests/tc03_re_excl (stderr) ! exp-drd/tests/tc05_simple_race (stderr) ! exp-drd/tests/tc06_two_races (stderr) ! exp-drd/tests/tc09_bad_unlock (stderr) ! exp-drd/tests/tc11_XCHG (stdout) ! exp-drd/tests/tc11_XCHG (stderr) ! exp-drd/tests/tc12_rwl_trivial (stderr) ! exp-drd/tests/tc16_byterace (stderr) ! exp-drd/tests/tc17_sembar (stderr) ! exp-drd/tests/tc18_semabuse (stderr) ! exp-drd/tests/tc20_verifywrap (stderr) ! exp-drd/tests/tc20_verifywrap2 (stderr) ! exp-drd/tests/tc21_pthonce (stdout) ! exp-drd/tests/tc21_pthonce (stderr) ! exp-drd/tests/tc22_exit_w_lock (stderr) ! exp-drd/tests/tc23_bogus_condwait (stderr) ! exp-drd/tests/trylock (stderr) ! |
|
From: Tom H. <th...@cy...> - 2008-03-04 04:45:29
|
Nightly build on lloyd ( x86_64, Fedora 7 ) started at 2008-03-04 03:05: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 == 409 tests, 79 stderr failures, 2 stdout failures, 0 post failures == memcheck/tests/pointer-trace (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/vcpu_fnfns (stdout) memcheck/tests/x86/scalar (stderr) none/tests/faultstatus (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) 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/tc04_free_lock (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/tc10_rec_lock (stderr) helgrind/tests/tc11_XCHG (stderr) helgrind/tests/tc12_rwl_trivial (stderr) helgrind/tests/tc13_laog1 (stderr) helgrind/tests/tc14_laog_dinphils (stderr) helgrind/tests/tc15_laog_lockdel (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/fp_race (stderr) exp-drd/tests/fp_race2 (stderr) exp-drd/tests/hg01_all_ok (stderr) exp-drd/tests/hg02_deadlock (stderr) exp-drd/tests/hg03_inherit (stderr) exp-drd/tests/hg04_race (stderr) exp-drd/tests/hg05_race2 (stderr) exp-drd/tests/hg06_readshared (stderr) exp-drd/tests/matinv (stderr) exp-drd/tests/pth_broadcast (stderr) exp-drd/tests/pth_cond_race (stderr) exp-drd/tests/pth_cond_race2 (stderr) exp-drd/tests/pth_create_chain (stderr) exp-drd/tests/pth_detached (stderr) exp-drd/tests/pth_detached2 (stderr) exp-drd/tests/recursive_mutex (stderr) exp-drd/tests/rwlock_race (stderr) exp-drd/tests/sem_as_mutex (stderr) exp-drd/tests/sem_as_mutex2 (stderr) exp-drd/tests/sigalrm (stderr) exp-drd/tests/tc01_simple_race (stderr) exp-drd/tests/tc02_simple_tls (stderr) exp-drd/tests/tc03_re_excl (stderr) exp-drd/tests/tc04_free_lock (stderr) exp-drd/tests/tc09_bad_unlock (stderr) exp-drd/tests/tc10_rec_lock (stderr) exp-drd/tests/tc11_XCHG (stderr) exp-drd/tests/tc12_rwl_trivial (stderr) exp-drd/tests/tc13_laog1 (stderr) exp-drd/tests/tc15_laog_lockdel (stderr) exp-drd/tests/tc16_byterace (stderr) exp-drd/tests/tc17_sembar (stderr) exp-drd/tests/tc18_semabuse (stderr) exp-drd/tests/tc20_verifywrap (stderr) exp-drd/tests/tc20_verifywrap2 (stderr) exp-drd/tests/tc21_pthonce (stderr) exp-drd/tests/tc22_exit_w_lock (stderr) exp-drd/tests/tc23_bogus_condwait (stderr) exp-drd/tests/trylock (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 == 408 tests, 78 stderr failures, 2 stdout failures, 0 post failures == memcheck/tests/pointer-trace (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/vcpu_fnfns (stdout) memcheck/tests/x86/scalar (stderr) none/tests/faultstatus (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) 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/tc04_free_lock (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/tc10_rec_lock (stderr) helgrind/tests/tc11_XCHG (stderr) helgrind/tests/tc12_rwl_trivial (stderr) helgrind/tests/tc13_laog1 (stderr) helgrind/tests/tc14_laog_dinphils (stderr) helgrind/tests/tc15_laog_lockdel (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/fp_race (stderr) exp-drd/tests/fp_race2 (stderr) exp-drd/tests/hg01_all_ok (stderr) exp-drd/tests/hg02_deadlock (stderr) exp-drd/tests/hg03_inherit (stderr) exp-drd/tests/hg04_race (stderr) exp-drd/tests/hg05_race2 (stderr) exp-drd/tests/hg06_readshared (stderr) exp-drd/tests/matinv (stderr) exp-drd/tests/pth_broadcast (stderr) exp-drd/tests/pth_cond_race (stderr) exp-drd/tests/pth_cond_race2 (stderr) exp-drd/tests/pth_create_chain (stderr) exp-drd/tests/pth_detached (stderr) exp-drd/tests/pth_detached2 (stderr) exp-drd/tests/recursive_mutex (stderr) exp-drd/tests/sem_as_mutex (stderr) exp-drd/tests/sem_as_mutex2 (stderr) exp-drd/tests/sigalrm (stderr) exp-drd/tests/tc01_simple_race (stderr) exp-drd/tests/tc02_simple_tls (stderr) exp-drd/tests/tc03_re_excl (stderr) exp-drd/tests/tc04_free_lock (stderr) exp-drd/tests/tc09_bad_unlock (stderr) exp-drd/tests/tc10_rec_lock (stderr) exp-drd/tests/tc11_XCHG (stderr) exp-drd/tests/tc12_rwl_trivial (stderr) exp-drd/tests/tc13_laog1 (stderr) exp-drd/tests/tc15_laog_lockdel (stderr) exp-drd/tests/tc16_byterace (stderr) exp-drd/tests/tc17_sembar (stderr) exp-drd/tests/tc18_semabuse (stderr) exp-drd/tests/tc20_verifywrap (stderr) exp-drd/tests/tc20_verifywrap2 (stderr) exp-drd/tests/tc21_pthonce (stderr) exp-drd/tests/tc22_exit_w_lock (stderr) exp-drd/tests/tc23_bogus_condwait (stderr) exp-drd/tests/trylock (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Tue Mar 4 03:54:26 2008 --- new.short Tue Mar 4 04:45:29 2008 *************** *** 8,10 **** ! == 408 tests, 78 stderr failures, 2 stdout failures, 0 post failures == memcheck/tests/pointer-trace (stderr) --- 8,10 ---- ! == 409 tests, 79 stderr failures, 2 stdout failures, 0 post failures == memcheck/tests/pointer-trace (stderr) *************** *** 67,68 **** --- 67,69 ---- exp-drd/tests/recursive_mutex (stderr) + exp-drd/tests/rwlock_race (stderr) exp-drd/tests/sem_as_mutex (stderr) |
|
From: Tom H. <th...@cy...> - 2008-03-04 04:01:33
|
Nightly build on aston ( x86_64, Fedora Core 5 ) started at 2008-03-04 03:20:07 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, 81 stderr failures, 1 stdout failure, 0 post failures == memcheck/tests/malloc_free_fill (stderr) memcheck/tests/pointer-trace (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/scalar (stderr) none/tests/blockfault (stderr) none/tests/faultstatus (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) 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/tc04_free_lock (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/tc10_rec_lock (stderr) helgrind/tests/tc11_XCHG (stderr) helgrind/tests/tc12_rwl_trivial (stderr) helgrind/tests/tc13_laog1 (stderr) helgrind/tests/tc14_laog_dinphils (stderr) helgrind/tests/tc15_laog_lockdel (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/fp_race (stderr) exp-drd/tests/fp_race2 (stderr) exp-drd/tests/hg01_all_ok (stderr) exp-drd/tests/hg02_deadlock (stderr) exp-drd/tests/hg03_inherit (stderr) exp-drd/tests/hg04_race (stderr) exp-drd/tests/hg05_race2 (stderr) exp-drd/tests/hg06_readshared (stderr) exp-drd/tests/matinv (stderr) exp-drd/tests/pth_broadcast (stderr) exp-drd/tests/pth_cond_race (stderr) exp-drd/tests/pth_cond_race2 (stderr) exp-drd/tests/pth_create_chain (stderr) exp-drd/tests/pth_detached (stderr) exp-drd/tests/pth_detached2 (stderr) exp-drd/tests/recursive_mutex (stderr) exp-drd/tests/rwlock_race (stderr) exp-drd/tests/sem_as_mutex (stderr) exp-drd/tests/sem_as_mutex2 (stderr) exp-drd/tests/sigalrm (stderr) exp-drd/tests/tc01_simple_race (stderr) exp-drd/tests/tc02_simple_tls (stderr) exp-drd/tests/tc03_re_excl (stderr) exp-drd/tests/tc04_free_lock (stderr) exp-drd/tests/tc09_bad_unlock (stderr) exp-drd/tests/tc10_rec_lock (stderr) exp-drd/tests/tc11_XCHG (stderr) exp-drd/tests/tc12_rwl_trivial (stderr) exp-drd/tests/tc13_laog1 (stderr) exp-drd/tests/tc15_laog_lockdel (stderr) exp-drd/tests/tc16_byterace (stderr) exp-drd/tests/tc17_sembar (stderr) exp-drd/tests/tc18_semabuse (stderr) exp-drd/tests/tc20_verifywrap (stderr) exp-drd/tests/tc20_verifywrap2 (stderr) exp-drd/tests/tc21_pthonce (stderr) exp-drd/tests/tc22_exit_w_lock (stderr) exp-drd/tests/tc23_bogus_condwait (stderr) exp-drd/tests/trylock (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 == 414 tests, 81 stderr failures, 1 stdout failure, 0 post failures == memcheck/tests/malloc_free_fill (stderr) memcheck/tests/pointer-trace (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/scalar (stderr) none/tests/blockfault (stderr) none/tests/faultstatus (stderr) none/tests/mremap (stderr) none/tests/mremap2 (stdout) 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/tc04_free_lock (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/tc10_rec_lock (stderr) helgrind/tests/tc11_XCHG (stderr) helgrind/tests/tc12_rwl_trivial (stderr) helgrind/tests/tc13_laog1 (stderr) helgrind/tests/tc14_laog_dinphils (stderr) helgrind/tests/tc15_laog_lockdel (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/fp_race (stderr) exp-drd/tests/fp_race2 (stderr) exp-drd/tests/hg01_all_ok (stderr) exp-drd/tests/hg02_deadlock (stderr) exp-drd/tests/hg03_inherit (stderr) exp-drd/tests/hg04_race (stderr) exp-drd/tests/hg05_race2 (stderr) exp-drd/tests/hg06_readshared (stderr) exp-drd/tests/matinv (stderr) exp-drd/tests/pth_broadcast (stderr) exp-drd/tests/pth_cond_race (stderr) exp-drd/tests/pth_cond_race2 (stderr) exp-drd/tests/pth_create_chain (stderr) exp-drd/tests/pth_detached (stderr) exp-drd/tests/pth_detached2 (stderr) exp-drd/tests/recursive_mutex (stderr) exp-drd/tests/sem_as_mutex (stderr) exp-drd/tests/sem_as_mutex2 (stderr) exp-drd/tests/sigalrm (stderr) exp-drd/tests/tc01_simple_race (stderr) exp-drd/tests/tc02_simple_tls (stderr) exp-drd/tests/tc03_re_excl (stderr) exp-drd/tests/tc04_free_lock (stderr) exp-drd/tests/tc05_simple_race (stderr) exp-drd/tests/tc09_bad_unlock (stderr) exp-drd/tests/tc10_rec_lock (stderr) exp-drd/tests/tc11_XCHG (stderr) exp-drd/tests/tc12_rwl_trivial (stderr) exp-drd/tests/tc13_laog1 (stderr) exp-drd/tests/tc15_laog_lockdel (stderr) exp-drd/tests/tc16_byterace (stderr) exp-drd/tests/tc17_sembar (stderr) exp-drd/tests/tc18_semabuse (stderr) exp-drd/tests/tc20_verifywrap (stderr) exp-drd/tests/tc20_verifywrap2 (stderr) exp-drd/tests/tc21_pthonce (stderr) exp-drd/tests/tc22_exit_w_lock (stderr) exp-drd/tests/tc23_bogus_condwait (stderr) exp-drd/tests/trylock (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Tue Mar 4 03:40:41 2008 --- new.short Tue Mar 4 04:01:33 2008 *************** *** 8,10 **** ! == 414 tests, 81 stderr failures, 1 stdout failure, 0 post failures == memcheck/tests/malloc_free_fill (stderr) --- 8,10 ---- ! == 415 tests, 81 stderr failures, 1 stdout failure, 0 post failures == memcheck/tests/malloc_free_fill (stderr) *************** *** 68,69 **** --- 68,70 ---- exp-drd/tests/recursive_mutex (stderr) + exp-drd/tests/rwlock_race (stderr) exp-drd/tests/sem_as_mutex (stderr) *************** *** 75,77 **** exp-drd/tests/tc04_free_lock (stderr) - exp-drd/tests/tc05_simple_race (stderr) exp-drd/tests/tc09_bad_unlock (stderr) --- 76,77 ---- |
|
From: Tom H. <th...@cy...> - 2008-03-04 03:49:04
|
Nightly build on trojan ( x86_64, Fedora Core 6 ) started at 2008-03-04 03:25:20 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 == 413 tests, 10 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/matinv (stderr) exp-drd/tests/tc21_pthonce (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 == 412 tests, 9 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/tc06_two_races (stderr) ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Tue Mar 4 03:37:04 2008 --- new.short Tue Mar 4 03:49:05 2008 *************** *** 8,10 **** ! == 412 tests, 9 stderr failures, 5 stdout failures, 0 post failures == memcheck/tests/pointer-trace (stderr) --- 8,10 ---- ! == 413 tests, 10 stderr failures, 5 stdout failures, 0 post failures == memcheck/tests/pointer-trace (stderr) *************** *** 22,24 **** helgrind/tests/tc22_exit_w_lock (stderr) ! exp-drd/tests/tc06_two_races (stderr) --- 22,25 ---- helgrind/tests/tc22_exit_w_lock (stderr) ! exp-drd/tests/matinv (stderr) ! exp-drd/tests/tc21_pthonce (stderr) |
|
From: Tom H. <th...@cy...> - 2008-03-04 03:12:38
|
Nightly build on gill ( x86_64, Fedora Core 2 ) started at 2008-03-04 03:00:03 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, 39 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/hg03_inherit (stderr) exp-drd/tests/pth_create_chain (stderr) exp-drd/tests/pth_detached (stderr) exp-drd/tests/pth_detached2 (stderr) exp-drd/tests/tc20_verifywrap (stderr) exp-drd/tests/tc20_verifywrap2 (stderr) exp-drd/tests/tc21_pthonce (stderr) exp-drd/tests/tc22_exit_w_lock (stderr) ================================================= == Results from 24 hours ago == ================================================= Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Last 20 lines of verbose log follow echo trylock.c:17: warning: implicit declaration of function `pthread_rwlock_wrlock' trylock.c:18: warning: implicit declaration of function `pthread_rwlock_unlock' trylock.c:20: warning: implicit declaration of function `pthread_rwlock_trywrlock' trylock.c:23: warning: implicit declaration of function `pthread_rwlock_timedwrlock' trylock.c:26: warning: implicit declaration of function `pthread_rwlock_rdlock' trylock.c:33: warning: implicit declaration of function `pthread_rwlock_tryrdlock' trylock.c:36: warning: implicit declaration of function `pthread_rwlock_timedrdlock' trylock.c:38: warning: implicit declaration of function `pthread_rwlock_destroy' trylock.c:48: warning: implicit declaration of function `pthread_mutex_timedlock' make[5]: *** [trylock.o] Error 1 make[5]: Leaving directory `/tmp/vgtest/2008-03-04/valgrind/exp-drd/tests' make[4]: *** [check-am] Error 2 make[4]: Leaving directory `/tmp/vgtest/2008-03-04/valgrind/exp-drd/tests' make[3]: *** [check-recursive] Error 1 make[3]: Leaving directory `/tmp/vgtest/2008-03-04/valgrind/exp-drd/tests' make[2]: *** [check-recursive] Error 1 make[2]: Leaving directory `/tmp/vgtest/2008-03-04/valgrind/exp-drd' make[1]: *** [check-recursive] Error 1 make[1]: Leaving directory `/tmp/vgtest/2008-03-04/valgrind' make: *** [check] Error 2 ================================================= == Difference between 24 hours ago and now == ================================================= *** old.short Tue Mar 4 03:03:55 2008 --- new.short Tue Mar 4 03:12:32 2008 *************** *** 6,27 **** ! Last 20 lines of verbose log follow echo ! trylock.c:17: warning: implicit declaration of function `pthread_rwlock_wrlock' ! trylock.c:18: warning: implicit declaration of function `pthread_rwlock_unlock' ! trylock.c:20: warning: implicit declaration of function `pthread_rwlock_trywrlock' ! trylock.c:23: warning: implicit declaration of function `pthread_rwlock_timedwrlock' ! trylock.c:26: warning: implicit declaration of function `pthread_rwlock_rdlock' ! trylock.c:33: warning: implicit declaration of function `pthread_rwlock_tryrdlock' ! trylock.c:36: warning: implicit declaration of function `pthread_rwlock_timedrdlock' ! trylock.c:38: warning: implicit declaration of function `pthread_rwlock_destroy' ! trylock.c:48: warning: implicit declaration of function `pthread_mutex_timedlock' ! make[5]: *** [trylock.o] Error 1 ! make[5]: Leaving directory `/tmp/vgtest/2008-03-04/valgrind/exp-drd/tests' ! make[4]: *** [check-am] Error 2 ! make[4]: Leaving directory `/tmp/vgtest/2008-03-04/valgrind/exp-drd/tests' ! make[3]: *** [check-recursive] Error 1 ! make[3]: Leaving directory `/tmp/vgtest/2008-03-04/valgrind/exp-drd/tests' ! make[2]: *** [check-recursive] Error 1 ! make[2]: Leaving directory `/tmp/vgtest/2008-03-04/valgrind/exp-drd' ! make[1]: *** [check-recursive] Error 1 ! make[1]: Leaving directory `/tmp/vgtest/2008-03-04/valgrind' ! make: *** [check] Error 2 --- 6,52 ---- ! Regression test results follow ! ! == 415 tests, 39 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/hg03_inherit (stderr) ! exp-drd/tests/pth_create_chain (stderr) ! exp-drd/tests/pth_detached (stderr) ! exp-drd/tests/pth_detached2 (stderr) ! exp-drd/tests/tc20_verifywrap (stderr) ! exp-drd/tests/tc20_verifywrap2 (stderr) ! exp-drd/tests/tc21_pthonce (stderr) ! exp-drd/tests/tc22_exit_w_lock (stderr) ! |
|
From: <sv...@va...> - 2008-03-04 01:58:43
|
Author: sewardj Date: 2008-03-04 01:58:47 +0000 (Tue, 04 Mar 2008) New Revision: 7555 Log: Fine-tune the compressed SVal machinery a bit to work better with 64-bit SVals. This reduces the maximum process image size for an OO.o start/exit from 535MB to 510MB. Modified: branches/HGDEV/helgrind/hg_main.c Modified: branches/HGDEV/helgrind/hg_main.c =================================================================== --- branches/HGDEV/helgrind/hg_main.c 2008-03-04 01:53:35 UTC (rev 7554) +++ branches/HGDEV/helgrind/hg_main.c 2008-03-04 01:58:47 UTC (rev 7555) @@ -365,7 +365,7 @@ /* ------ CacheLine ------ */ -#define N_LINE_BITS 5 /* must be >= 3 */ +#define N_LINE_BITS 6 /* must be >= 3 */ #define N_LINE_ARANGE (1 << N_LINE_BITS) #define N_LINE_TREES (N_LINE_ARANGE >> 3) |
|
From: <sv...@va...> - 2008-03-04 01:53:31
|
Author: sewardj
Date: 2008-03-04 01:53:35 +0000 (Tue, 04 Mar 2008)
New Revision: 7554
Log:
Ignore race errors in PLT sections (Konstantin Serebryany)
Modified:
branches/HGDEV/helgrind/hg_main.c
Modified: branches/HGDEV/helgrind/hg_main.c
===================================================================
--- branches/HGDEV/helgrind/hg_main.c 2008-03-04 00:41:29 UTC (rev 7553)
+++ branches/HGDEV/helgrind/hg_main.c 2008-03-04 01:53:35 UTC (rev 7554)
@@ -7685,6 +7685,21 @@
tl_assert(isWrite == False || isWrite == True);
tl_assert(szB == 8 || szB == 4 || szB == 2 || szB == 1);
+ /* If the PC is in something that looks like a PLT section, ignore
+ any reported races. It appears that ld.so does intentionally
+ racey things in PLTs and it's simplest just to ignore it. */
+ if (1) {
+ ThreadId tid = map_threads_maybe_reverse_lookup_SLOW(thr);
+ if (tid != VG_INVALID_THREADID) {
+ Addr ip_at_error = VG_(get_IP)( tid );
+ if (VG_(seginfo_sect_kind)(NULL, 0, ip_at_error) == Vg_SectPLT) {
+ /* ignore this race. */
+ return;
+ }
+ }
+ }
+
+ /* 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)(
|
|
From: <sv...@va...> - 2008-03-04 00:41:26
|
Author: sewardj
Date: 2008-03-04 00:41:29 +0000 (Tue, 04 Mar 2008)
New Revision: 7553
Log:
Replace Helgrind's state machine ("MSMHelgrind") and with one from
Konstantin Serebryany ("MSMProp1"). This is simpler than MSMHelgrind
yet offers better accuracy -- a significantly lower false positive
rate and in some cases a lower false negative rate too.
As part of this, the basic shadow value size is increased from 32 to
64 bits, so as to support huge programs.
In detail:
* The new state machine, see prop1_memory_state_machine.
- Changed SVal layout
- Different handling of BHL
- No more actions at thread join and at memory deletion
- Updates in some reporting functions
* Segment storage is a resizable array. See SEG_add. Essential for
MSMProp1 performance.
Modified:
branches/HGDEV/glibc-2.34567-NPTL-helgrind.supp
branches/HGDEV/helgrind/Makefile.am
branches/HGDEV/helgrind/hg_main.c
branches/HGDEV/helgrind/hg_wordset.c
Modified: branches/HGDEV/glibc-2.34567-NPTL-helgrind.supp
===================================================================
--- branches/HGDEV/glibc-2.34567-NPTL-helgrind.supp 2008-03-04 00:35:05 UTC (rev 7552)
+++ branches/HGDEV/glibc-2.34567-NPTL-helgrind.supp 2008-03-04 00:41:29 UTC (rev 7553)
@@ -433,3 +433,11 @@
fun:_ZN6QMutex4lockEv
fun:_ZN6QMutex4lockEv
}
+
+#####------- intentional races in hg_intercepts.c. ------######
+# KCC: suppress intentional race on line 218 of hg_intercepts.c
+{
+ helgrind-hg_intercepts-001
+ Helgrind:Race
+ fun:pthread_create*
+}
Modified: branches/HGDEV/helgrind/Makefile.am
===================================================================
--- branches/HGDEV/helgrind/Makefile.am 2008-03-04 00:35:05 UTC (rev 7552)
+++ branches/HGDEV/helgrind/Makefile.am 2008-03-04 00:41:29 UTC (rev 7553)
@@ -74,42 +74,42 @@
helgrind_x86_linux_SOURCES = $(HELGRIND_SOURCES_COMMON)
helgrind_x86_linux_CPPFLAGS = $(AM_CPPFLAGS_X86_LINUX)
-helgrind_x86_linux_CFLAGS = $(AM_CFLAGS_X86_LINUX) -O2
+helgrind_x86_linux_CFLAGS = $(AM_CFLAGS_X86_LINUX) -O2 -Wsign-compare
helgrind_x86_linux_DEPENDENCIES = $(COREGRIND_LIBS_X86_LINUX)
helgrind_x86_linux_LDADD = $(TOOL_LDADD_X86_LINUX)
helgrind_x86_linux_LDFLAGS = $(TOOL_LDFLAGS_X86_LINUX)
helgrind_amd64_linux_SOURCES = $(HELGRIND_SOURCES_COMMON)
helgrind_amd64_linux_CPPFLAGS = $(AM_CPPFLAGS_AMD64_LINUX)
-helgrind_amd64_linux_CFLAGS = $(AM_CFLAGS_AMD64_LINUX) -O2
+helgrind_amd64_linux_CFLAGS = $(AM_CFLAGS_AMD64_LINUX) -O2 -Wsign-compare
helgrind_amd64_linux_DEPENDENCIES = $(COREGRIND_LIBS_AMD64_LINUX)
helgrind_amd64_linux_LDADD = $(TOOL_LDADD_AMD64_LINUX)
helgrind_amd64_linux_LDFLAGS = $(TOOL_LDFLAGS_AMD64_LINUX)
helgrind_ppc32_linux_SOURCES = $(HELGRIND_SOURCES_COMMON)
helgrind_ppc32_linux_CPPFLAGS = $(AM_CPPFLAGS_PPC32_LINUX)
-helgrind_ppc32_linux_CFLAGS = $(AM_CFLAGS_PPC32_LINUX) -O2
+helgrind_ppc32_linux_CFLAGS = $(AM_CFLAGS_PPC32_LINUX) -O2 -Wsign-compare
helgrind_ppc32_linux_DEPENDENCIES = $(COREGRIND_LIBS_PPC32_LINUX)
helgrind_ppc32_linux_LDADD = $(TOOL_LDADD_PPC32_LINUX)
helgrind_ppc32_linux_LDFLAGS = $(TOOL_LDFLAGS_PPC32_LINUX)
helgrind_ppc64_linux_SOURCES = $(HELGRIND_SOURCES_COMMON)
helgrind_ppc64_linux_CPPFLAGS = $(AM_CPPFLAGS_PPC64_LINUX)
-helgrind_ppc64_linux_CFLAGS = $(AM_CFLAGS_PPC64_LINUX) -O2
+helgrind_ppc64_linux_CFLAGS = $(AM_CFLAGS_PPC64_LINUX) -O2 -Wsign-compare
helgrind_ppc64_linux_DEPENDENCIES = $(COREGRIND_LIBS_PPC64_LINUX)
helgrind_ppc64_linux_LDADD = $(TOOL_LDADD_PPC64_LINUX)
helgrind_ppc64_linux_LDFLAGS = $(TOOL_LDFLAGS_PPC64_LINUX)
helgrind_ppc32_aix5_SOURCES = $(HELGRIND_SOURCES_COMMON)
helgrind_ppc32_aix5_CPPFLAGS = $(AM_CPPFLAGS_PPC32_AIX5)
-helgrind_ppc32_aix5_CFLAGS = $(AM_CFLAGS_PPC32_AIX5) -O2
+helgrind_ppc32_aix5_CFLAGS = $(AM_CFLAGS_PPC32_AIX5) -O2 -Wsign-compare
helgrind_ppc32_aix5_DEPENDENCIES = $(COREGRIND_LIBS_PPC32_AIX5)
helgrind_ppc32_aix5_LDADD = $(TOOL_LDADD_PPC32_AIX5)
helgrind_ppc32_aix5_LDFLAGS = $(TOOL_LDFLAGS_PPC32_AIX5)
helgrind_ppc64_aix5_SOURCES = $(HELGRIND_SOURCES_COMMON)
helgrind_ppc64_aix5_CPPFLAGS = $(AM_CPPFLAGS_PPC64_AIX5)
-helgrind_ppc64_aix5_CFLAGS = $(AM_CFLAGS_PPC64_AIX5) -O2
+helgrind_ppc64_aix5_CFLAGS = $(AM_CFLAGS_PPC64_AIX5) -O2 -Wsign-compare
helgrind_ppc64_aix5_DEPENDENCIES = $(COREGRIND_LIBS_PPC64_AIX5)
helgrind_ppc64_aix5_LDADD = $(TOOL_LDADD_PPC64_AIX5)
helgrind_ppc64_aix5_LDFLAGS = $(TOOL_LDFLAGS_PPC64_AIX5)
Modified: branches/HGDEV/helgrind/hg_main.c
===================================================================
--- branches/HGDEV/helgrind/hg_main.c 2008-03-04 00:35:05 UTC (rev 7552)
+++ branches/HGDEV/helgrind/hg_main.c 2008-03-04 00:41:29 UTC (rev 7553)
@@ -34,6 +34,15 @@
without prior written permission.
*/
+/* JRS: TODO 2008 Mar 03:
+ - get rid of HG_(elementOfWS) since it breaks representational
+ abstraction on WordSets
+
+ - Check 64-bit SVal compression parameters are optimal
+
+ - Consider what to do about BHL all over again
+*/
+
#include "pub_tool_basics.h"
#include "pub_tool_aspacemgr.h"
#include "pub_tool_libcassert.h"
@@ -240,7 +249,7 @@
/*----------------------------------------------------------------*/
/* Shadow values. */
-typedef UInt SVal;
+typedef ULong SVal;
/* These are handles for thread segments. CONSTRAINTS: Must be small
@@ -339,8 +348,6 @@
from some other thread. Segments are never freed (!) */
typedef
struct _Segment {
- /* ADMIN */
- struct _Segment* admin;
UInt magic;
/* USEFUL */
UInt dfsver; /* Version # for depth-first searches */
@@ -435,7 +442,7 @@
Bool mbHasShared; /* hint: any ShM/ShR states in range? safe: True */
CacheLineZ linesZ[N_SECMAP_ZLINES];
CacheLineF* linesF;
- Int linesF_size;
+ UInt linesF_size;
}
SecMap;
@@ -532,8 +539,6 @@
/* Admin linked list of Locks */
static Lock* admin_locks = NULL;
-/* Admin linked list of Segments */
-static Segment* admin_segments = NULL;
/* Shadow memory primary map */
static WordFM* map_shmem = NULL; /* WordFM Addr SecMap* */
@@ -542,14 +547,11 @@
/* Mapping table for core ThreadIds to Thread* */
static Thread** map_threads = NULL; /* Array[VG_N_THREADS] of Thread* */
-/* Mapping table for thread segments IDs to Segment* */
-static WordFM* map_segments = NULL; /* WordFM SegmentID Segment* */
-
/* Mapping table for lock guest addresses to Lock* */
static WordFM* map_locks = NULL; /* WordFM LockAddr Lock* */
/* The word-set universes for thread sets and lock sets. */
-static WordSetU* univ_tsets = NULL; /* sets of Thread* */
+static WordSetU* univ_ssets = NULL; /* sets of SegmentsID */
static WordSetU* univ_lsets = NULL; /* sets of Lock* */
static WordSetU* univ_laog = NULL; /* sets of Lock*, for LAOG */
@@ -560,6 +562,7 @@
static Lock* __bus_lock_Lock = NULL;
+
/*----------------------------------------------------------------*/
/*--- Simple helpers for the data structures ---*/
/*----------------------------------------------------------------*/
@@ -577,6 +580,78 @@
static UWord stats__mk_Segment = 0;
+/* --------------- Segment vector --------------- */
+// Segments are organized into N1 chunks, each chunk contains N2 Segments.
+// SegmentID is an index in this array of chunks:
+// chunk_index = SegmentID / N1
+// index_in_chunk = SegmentID % N1
+// New chunks are allocated as needed.
+//
+// SegmentID=0 is not allowed (used for sanity checking).
+// So, SegmentID > 0 && SegmentID < N1*N2.
+//
+// TODO: when we reach limit of N1*N2 segments we need to start
+// recycling old segments instead of exiting.
+
+enum {
+ SEGMENT_ID_MAX = 1 << 24, // N1*N2
+ SEGMENT_ID_CHUNK_SIZE = 1 << 14, // N2
+ SEGMENT_ID_N_CHUNKS = SEGMENT_ID_MAX / SEGMENT_ID_CHUNK_SIZE // N1
+};
+
+static struct {
+ UInt size;
+ Segment *chunks[SEGMENT_ID_N_CHUNKS];
+} SegmentArray ={1, {0}};
+
+
+// Add a new segment, return its number
+static SegmentID SEG_add(void)
+{
+ UInt index, chunk_index, elem_index;
+ // increment size
+ SegmentArray.size = (SegmentArray.size + 1) % SEGMENT_ID_MAX;
+ if (SegmentArray.size == 0) {
+ VG_(printf)("Helgrind: Fatal internal error -- cannot continue.\n");
+ VG_(printf)("SegmentArray: wrapped around\n");
+ tl_assert(0);
+ SegmentArray.size = 2;
+ }
+
+ index = SegmentArray.size - 1;
+ chunk_index = index / SEGMENT_ID_CHUNK_SIZE;
+ elem_index = index % SEGMENT_ID_CHUNK_SIZE;
+ if (SegmentArray.chunks[chunk_index] == NULL) {
+ // VG_(printf)("SegmentArray: new chunk %d\n", (int)chunk_index);
+ SegmentArray.chunks[chunk_index]
+ = hg_zalloc(sizeof(Segment) * SEGMENT_ID_CHUNK_SIZE);
+ }
+ VG_(memset)(&SegmentArray.chunks[chunk_index][elem_index],
+ 0, sizeof(Segment));
+ // VG_(printf)("SegmentArray: new segment %d\n", (int)index);
+ return index;
+}
+
+static inline Bool SEG_id_is_sane(SegmentID n)
+{
+ return (n > 0)
+ && (n < SEGMENT_ID_MAX)
+ && (SegmentArray.chunks[n / SEGMENT_ID_CHUNK_SIZE] != NULL);
+}
+
+static inline Segment *SEG_get(SegmentID n)
+{
+ tl_assert(SEG_id_is_sane(n));
+ return &SegmentArray.chunks[n / SEGMENT_ID_CHUNK_SIZE]
+ [n % SEGMENT_ID_CHUNK_SIZE];
+}
+
+static inline Segment *SEG_maybe_get(SegmentID n)
+{
+ if (!SEG_id_is_sane(n)) return NULL;
+ return &SegmentArray.chunks[n / SEGMENT_ID_CHUNK_SIZE]
+ [n % SEGMENT_ID_CHUNK_SIZE];
+}
/* --------- Constructors --------- */
static inline Bool is_sane_LockN ( Lock* lock ); /* fwds */
@@ -612,8 +687,9 @@
admin_locks = lock;
return lock;
}
-static Segment* mk_Segment ( Thread* thr, Segment* prev, Segment* other ) {
- Segment* seg = hg_zalloc( sizeof(Segment) );
+static SegmentID mk_Segment ( Thread* thr, Segment* prev, Segment* other ) {
+ SegmentID id = SEG_add();
+ Segment* seg = SEG_get(id);
seg->dfsver = 0;
seg->thr = thr;
seg->prev = prev;
@@ -621,10 +697,8 @@
seg->vts = NULL;
seg->other_hint = ' ';
seg->magic = Segment_MAGIC;
- seg->admin = admin_segments;
- admin_segments = seg;
stats__mk_Segment++;
- return seg;
+ return id;
}
static inline Bool is_sane_Segment ( Segment* seg ) {
@@ -853,23 +927,10 @@
/* --------- xxxID functions --------- */
-/* Proposal (for debugging sanity):
- SegmentIDs from 0x1000000 .. 0x1FFFFFF (16777216)
-
- All other xxxID handles are invalid.
-*/
-static inline Bool is_sane_SegmentID ( SegmentID tseg ) {
- return tseg >= 0x1000000 && tseg <= 0x1FFFFFF;
-}
static inline Bool is_sane_ThreadId ( ThreadId coretid ) {
return coretid >= 0 && coretid < VG_N_THREADS;
}
-static SegmentID alloc_SegmentID ( void ) {
- static SegmentID next = 0x1000000;
- tl_assert(is_sane_SegmentID(next));
- return next++;
-}
/* --------- Shadow memory --------- */
@@ -927,83 +988,152 @@
tl_assert(0);
}
-static inline SVal mk_SHVAL_ShM ( WordSetID tset, WordSetID lset ) {
- if (LIKELY(is_sane_WordSetID_TSet(tset)
- && is_sane_WordSetID_LSet(lset))) {
- return (SVal)( (3<<30) | (tset << N_TSID_SHIFT)
- | (lset << N_LSID_SHIFT));
- } else {
- mk_SHVAL_fail(tset, lset, "mk_SHVAL_ShM");
- }
+
+
+//
+// SVal:
+// 10SSSSSSSSSSSSSSSSSSSSSSSSSSrrrrrrrrrrrrLLLLLLLLLLLLLLLLLLLLLLLL Read
+// 11SSSSSSSSSSSSSSSSSSSSSSSSSSrrrrrrrrrrrrLLLLLLLLLLLLLLLLLLLLLLLL Write
+// \_______ 26 _____________/ \________ 24 __________/
+//
+// 0100000000000000000000000000000000000000000000000000000000000000 Race
+// 0000000000000000000000000000000000000000000000000000001000000000 New
+// 0000000000000000000000000000000000000000000000000000000100000000 NoAccess
+// 0000000000000000000000000000000000000000000000000000000000000000 Invalid
+// \______________________________64______________________________/
+//
+// r - reserved bits
+// S - segment set bits
+// L - lock set bits
+//
+// It's crucial that no valid SVal has a value of zero, since zero
+// has a special meaning for the LineZ/LineF mechanism (see
+// "lineZ->dict[0] == 0" in get_ZF_by_index).
+//
+//
+// S:
+// 1SSSSSSSSSSSSSSSSSSSSSSS Just one segment.
+// 0SSSSSSSSSSSSSSSSSSSSSSS A real segment set.
+//
+
+//------------- segment set, lock set --------------
+
+const int SEGMENT_SET_BITS = 26;
+const int LOCK_SET_BITS = 24;
+
+const SVal SHVAL_New = ((SVal)(2<<8));
+const SVal SHVAL_NoAccess = ((SVal)(1<<8));
+const SVal SHVAL_Invalid = ((SVal)(0));
+const SVal SHVAL_Race = ((SVal)(1ULL << 62));
+
+typedef ULong SegmentSet;
+typedef WordSetID LockSet;
+
+static inline Bool SS_valid (SegmentSet ss) {
+ return ss < (1ULL << SEGMENT_SET_BITS);
}
-static inline SVal mk_SHVAL_ShR ( WordSetID tset, WordSetID lset ) {
- if (LIKELY(is_sane_WordSetID_TSet(tset)
- && is_sane_WordSetID_LSet(lset))) {
- return (SVal)( (2<<30) | (tset << N_TSID_SHIFT)
- | (lset << N_LSID_SHIFT) );
- } else {
- mk_SHVAL_fail(tset, lset, "mk_SHVAL_ShR");
- }
+
+static inline Bool SS_is_singleton (SegmentSet ss)
+{
+ return (ss & (1ULL << (SEGMENT_SET_BITS-1))) != 0;
}
-static inline SVal mk_SHVAL_Excl ( SegmentID tseg ) {
- tl_assert(is_sane_SegmentID(tseg));
- return (SVal)( (1<<30) | tseg );
+
+static inline UWord SS_get_size (SegmentSet ss)
+{
+ if (SS_is_singleton(ss)) return 1;
+ tl_assert(HG_(cardinalityWSU)(univ_ssets) > ss);
+ return HG_(cardinalityWS)(univ_ssets, ss);
}
-#define SHVAL_New ((SVal)(2<<8))
-#define SHVAL_NoAccess ((SVal)(1<<8))
-#define SHVAL_Invalid ((SVal)(0<<8))
-static inline Bool is_SHVAL_ShM ( SVal w32 ) {
- return (w32 >> 30) == 3;
+static inline SegmentSet SS_mk_singleton (SegmentID ss)
+{
+ tl_assert(SEG_id_is_sane(ss));
+ ss |= (1ULL << (SEGMENT_SET_BITS-1));
+ tl_assert(SS_is_singleton(ss));
+ return ss;
}
-static inline Bool is_SHVAL_ShR ( SVal w32 ) {
- return (w32 >> 30) == 2;
+
+static inline SegmentID SS_get_singleton (SegmentSet ss)
+{
+ tl_assert(SS_is_singleton(ss));
+ ss &= ~(1ULL << (SEGMENT_SET_BITS-1));
+ tl_assert(SEG_id_is_sane(ss));
+ return ss;
}
-static inline Bool is_SHVAL_Sh ( SVal w32 ) {
- return (w32 >> 31) == 1;
+
+static inline SegmentID SS_get_element (SegmentSet ss, UWord i)
+{
+ UWord nWords, *words;
+ if (SS_is_singleton(ss))
+ return SS_get_singleton(ss);
+ HG_(getPayloadWS)( &words, &nWords, univ_ssets, ss );
+ tl_assert(i < nWords);
+ return words[i];
}
-static inline Bool is_SHVAL_Excl ( SVal w32 ) {
- return (w32 >> 30) == 1;
+
+
+static inline Bool LS_valid (LockSet ls) {
+ return ls < (1ULL << LOCK_SET_BITS);
}
-static inline Bool is_SHVAL_New ( SVal w32 ) {
- return w32 == SHVAL_New;
+
+
+static inline SVal mk_SHVAL_RW (Bool is_w, SegmentSet ss, LockSet ls) {
+ SVal res;
+ tl_assert(SS_valid(ss));
+ tl_assert(LS_valid(ls));
+ res = (1ULL << 63)
+ | ((SVal)is_w << 62)
+ | ((SVal)ss << (62-SEGMENT_SET_BITS))
+ | ((SVal)ls);
+ // VG_(printf)("XX %llx\n", res);
+ return res;
}
-static inline Bool is_SHVAL_NoAccess ( SVal w32 ) {
- return w32 == SHVAL_NoAccess;
+static inline SVal mk_SHVAL_R (SegmentSet ss, LockSet ls) {
+ return mk_SHVAL_RW(False, ss, ls);
}
-static inline Bool is_SHVAL_valid ( SVal w32 ) {
- return is_SHVAL_Excl(w32) || is_SHVAL_NoAccess(w32)
- || is_SHVAL_Sh(w32) || is_SHVAL_New(w32);
+static inline SVal mk_SHVAL_W (SegmentSet ss, LockSet ls) {
+ return mk_SHVAL_RW(True, ss, ls);
}
-static inline SegmentID un_SHVAL_Excl ( SVal w32 ) {
- tl_assert(is_SHVAL_Excl(w32));
- return w32 & ~(3<<30);
+static inline SegmentSet get_SHVAL_SS (SVal sv) {
+ SegmentSet ss;
+ int shift = 62 - SEGMENT_SET_BITS;
+ int mask = (1 << SEGMENT_SET_BITS) - 1;
+ ss = (sv >> shift) & mask;
+ tl_assert(SS_valid(ss));
+ return ss;
}
-static inline WordSetID un_SHVAL_ShR_tset ( SVal w32 ) {
- tl_assert(is_SHVAL_ShR(w32));
- return (w32 >> N_TSID_SHIFT) & N_TSID_MASK;
+static inline LockSet get_SHVAL_LS (SVal sv) {
+ LockSet ls;
+ ls = sv & ((1ULL << LOCK_SET_BITS) - 1);
+ tl_assert(LS_valid(ls));
+ return ls;
}
-static inline WordSetID un_SHVAL_ShR_lset ( SVal w32 ) {
- tl_assert(is_SHVAL_ShR(w32));
- return (w32 >> N_LSID_SHIFT) & N_LSID_MASK;
+
+static inline Bool is_SHVAL_RW (SVal sv) {
+ return (sv >> 63) != 0;
+}
+static inline Bool is_SHVAL_R (SVal sv) {
+ tl_assert(is_SHVAL_RW(sv));
+ return ((sv >> 62) & 1) == 0;
}
-static inline WordSetID un_SHVAL_ShM_tset ( SVal w32 ) {
- tl_assert(is_SHVAL_ShM(w32));
- return (w32 >> N_TSID_SHIFT) & N_TSID_MASK;
+static inline Bool is_SHVAL_W (SVal sv) {
+ tl_assert(is_SHVAL_RW(sv));
+ return ((sv >> 62) & 1) == 1;
}
-static inline WordSetID un_SHVAL_ShM_lset ( SVal w32 ) {
- tl_assert(is_SHVAL_ShM(w32));
- return (w32 >> N_LSID_SHIFT) & N_LSID_MASK;
+
+static inline Bool is_SHVAL_Shared (SVal sv) {
+ return is_SHVAL_RW(sv) && !SS_is_singleton(get_SHVAL_SS(sv));
}
-static inline WordSetID un_SHVAL_Sh_tset ( SVal w32 ) {
- tl_assert(is_SHVAL_Sh(w32));
- return (w32 >> N_TSID_SHIFT) & N_TSID_MASK;
+
+static inline Bool is_SHVAL_New (SVal sv) {return sv == SHVAL_New;}
+static inline Bool is_SHVAL_NoAccess(SVal sv) {return sv == SHVAL_NoAccess;}
+static inline Bool is_SHVAL_Race (SVal sv) {return sv == SHVAL_Race;}
+
+static inline Bool is_SHVAL_valid ( SVal sv) {
+ return is_SHVAL_RW(sv) || sv == SHVAL_Race
+ || sv == SHVAL_New || sv == SHVAL_NoAccess;
}
-static inline WordSetID un_SHVAL_Sh_lset ( SVal w32 ) {
- tl_assert(is_SHVAL_Sh(w32));
- return (w32 >> N_LSID_SHIFT) & N_LSID_MASK;
-}
/*----------------------------------------------------------------*/
@@ -1013,9 +1143,7 @@
static WordSetID del_BHL ( WordSetID lockset ); /* fwds */
static
void get_ZF_by_index ( /*OUT*/CacheLineZ** zp, /*OUT*/CacheLineF** fp,
- SecMap* sm, Int zix ); /* fwds */
-static
-Segment* map_segments_maybe_lookup ( SegmentID segid ); /* fwds */
+ SecMap* sm, UInt zix ); /* fwds */
#define PP_THREADS (1<<1)
#define PP_LOCKS (1<<2)
@@ -1163,7 +1291,6 @@
{
space(d+0); VG_(printf)("Segment %p {\n", s);
if (sHOW_ADMIN) {
- space(d+3); VG_(printf)("admin %p\n", s->admin);
space(d+3); VG_(printf)("magic 0x%x\n", (UInt)s->magic);
}
space(d+3); VG_(printf)("dfsver %u\n", s->dfsver);
@@ -1173,111 +1300,66 @@
space(d+0); VG_(printf)("}\n");
}
-static void pp_admin_segments ( Int d )
+static void pp_all_segments ( Int d )
{
- Int i, n;
- Segment* s;
- for (n = 0, s = admin_segments; s; n++, s = s->admin) {
- /* nothing */
- }
- space(d); VG_(printf)("admin_segments (%d records) {\n", n);
- for (i = 0, s = admin_segments; s; i++, s = s->admin) {
- if (0) {
- space(n);
- VG_(printf)("admin_segments record %d of %d:\n", i, n);
- }
- pp_Segment(d+3, s);
- }
- space(d); VG_(printf)("}\n", n);
-}
-
-static void pp_map_segments ( Int d )
-{
- SegmentID segid;
- Segment* seg;
+ ULong i;
space(d); VG_(printf)("map_segments (%d entries) {\n",
- (Int)HG_(sizeFM)( map_segments ));
- HG_(initIterFM)( map_segments );
- while (HG_(nextIterFM)( map_segments, (Word*)&segid,
- (Word*)&seg )) {
+ (Int)SegmentArray.size);
+ for (i = 1; i < SegmentArray.size; i++) {
space(d+3);
- VG_(printf)("segid 0x%x -> Segment %p\n", (UInt)segid, seg);
+ // VG_(printf)("segid 0x%x -> Segment %p\n", (UInt)i, SEG_get(i));
+ pp_Segment(d+3, SEG_get(i));
}
- HG_(doneIterFM)( map_segments );
space(d); VG_(printf)("}\n");
}
-static void show_shadow_w32 ( /*OUT*/Char* buf, Int nBuf, SVal w32 )
+// Just print all locks in the lockset 'ls'.
+static void show_lockset(LockSet ls)
{
- tl_assert(nBuf-1 >= 99);
- VG_(memset)(buf, 0, nBuf);
- if (is_SHVAL_ShM(w32)) {
- VG_(sprintf)(buf, "ShM(%u,%u)",
- un_SHVAL_ShM_tset(w32), un_SHVAL_ShM_lset(w32));
+ UWord* word;
+ UWord nWords, i;
+ HG_(getPayloadWS)( &word, &nWords, univ_lsets, ls );
+ for (i = 0; i < nWords; i++) {
+ Lock* lk = (Lock*)word[i];
+ VG_(printf)("L:%p/%p ", lk, lk->guestaddr);
}
- else
- if (is_SHVAL_ShR(w32)) {
- VG_(sprintf)(buf, "ShR(%u,%u)",
- un_SHVAL_ShR_tset(w32), un_SHVAL_ShR_lset(w32));
- }
- else
- if (is_SHVAL_Excl(w32)) {
- VG_(sprintf)(buf, "Excl(%u)", un_SHVAL_Excl(w32));
- }
- else
- if (is_SHVAL_New(w32)) {
- VG_(sprintf)(buf, "%s", "New");
- }
- else
- if (is_SHVAL_NoAccess(w32)) {
- VG_(sprintf)(buf, "%s", "NoAccess");
- }
- else {
- VG_(sprintf)(buf, "Invalid-shadow-word(%u)", w32);
- }
}
-static
-void show_shadow_w32_for_user ( /*OUT*/Char* buf, Int nBuf, SVal w32 )
+// KCC: do we need two separate print functions (for user and not for user)?
+// Print the SVal in human readable form.
+static void show_sval ( /*OUT*/Char* buf, Int nBuf, SVal sv )
{
tl_assert(nBuf-1 >= 99);
VG_(memset)(buf, 0, nBuf);
- if (is_SHVAL_ShM(w32)) {
- WordSetID tset = un_SHVAL_ShM_tset(w32);
- WordSetID lset = del_BHL( un_SHVAL_ShM_lset(w32) );
- VG_(sprintf)(buf, "ShMod(#Tset=%d,#Lset=%d)",
- HG_(cardinalityWS)(univ_tsets, tset),
- HG_(cardinalityWS)(univ_lsets, lset));
- }
- else
- if (is_SHVAL_ShR(w32)) {
- WordSetID tset = un_SHVAL_ShR_tset(w32);
- WordSetID lset = del_BHL( un_SHVAL_ShR_lset(w32) );
- VG_(sprintf)(buf, "ShRO(#Tset=%d,#Lset=%d)",
- HG_(cardinalityWS)(univ_tsets, tset),
- HG_(cardinalityWS)(univ_lsets, lset));
- }
- else
- if (is_SHVAL_Excl(w32)) {
- SegmentID segid = un_SHVAL_Excl(w32);
- Segment* mb_seg = map_segments_maybe_lookup(segid);
- if (mb_seg && mb_seg->thr && is_sane_Thread(mb_seg->thr)) {
- VG_(sprintf)(buf, "Exclusive(thr#%d)", mb_seg->thr->errmsg_index);
- } else {
- VG_(sprintf)(buf, "Exclusive(segid=%u)", un_SHVAL_Excl(w32));
- }
- }
- else
- if (is_SHVAL_New(w32)) {
+ if (is_SHVAL_New(sv)) {
VG_(sprintf)(buf, "%s", "New");
- }
- else
- if (is_SHVAL_NoAccess(w32)) {
+ } else if (is_SHVAL_NoAccess(sv)) {
VG_(sprintf)(buf, "%s", "NoAccess");
+ } else if (is_SHVAL_Race(sv)) {
+ VG_(sprintf)(buf, "%s", "Race");
+ } else if (is_SHVAL_RW(sv)) {
+ UWord i;
+ Bool is_w = is_SHVAL_W(sv);
+ SegmentSet ss = get_SHVAL_SS(sv);
+ LockSet ls = get_SHVAL_LS(sv);
+ UWord n_segments = SS_get_size(ss);
+ int n_locks = HG_(cardinalityWS)(univ_lsets, ls);
+ VG_(sprintf)(buf, "%c #SS=%d #LS=%d ",
+ is_w ? 'W' : 'R', n_segments, n_locks);
+
+ for (i = 0; i < n_segments; i++) {
+ SegmentID S;
+ if (VG_(strlen(buf)) > nBuf - 20) {
+ VG_(sprintf)(buf + VG_(strlen)(buf), "...");
+ break;
+ }
+ S = SS_get_element(ss, i);
+ VG_(sprintf)(buf + VG_(strlen)(buf), "S%d/T%d ",
+ (int)S, SEG_get(S)->thr->errmsg_index);
+ }
+ } else {
+ VG_(sprintf)(buf, "Invalid-shadow-word(%u)", sv);
}
- else {
- VG_(sprintf)(buf, "Invalid-shadow-word(%u)", w32);
- }
}
static void pp_SecMap_shared ( Int d, SecMap* sm, Addr ga )
@@ -1304,7 +1386,7 @@
if (! (is_SHVAL_ShM(w32) || is_SHVAL_ShR(w32)))
continue;
space(d+3); VG_(printf)("%p -> 0x%08x ", (void*)a, w32);
- show_shadow_w32(buf, sizeof(buf), w32);
+ show_sval(buf, sizeof(buf), w32);
VG_(printf)("%s\n", buf);
}
#endif
@@ -1345,9 +1427,7 @@
}
if (flags & PP_SEGMENTS) {
VG_(printf)("\n");
- pp_admin_segments(d+3);
- VG_(printf)("\n");
- pp_map_segments(d+3);
+ pp_all_segments(d+3);
}
if (flags & PP_SHMEM_SHARED) {
VG_(printf)("\n");
@@ -1367,7 +1447,6 @@
/*----------------------------------------------------------------*/
/* fwds */
-static void map_segments_add ( SegmentID segid, Segment* seg );
static void shmem__invalidate_scache ( void );
static void hbefore__invalidate_cache ( void );
static void shmem__set_mbHasLocks ( Addr a, Bool b );
@@ -1384,7 +1463,6 @@
/* Get everything initialised and zeroed. */
tl_assert(admin_threads == NULL);
tl_assert(admin_locks == NULL);
- tl_assert(admin_segments == NULL);
tl_assert(sizeof(Addr) == sizeof(Word));
tl_assert(map_shmem == NULL);
@@ -1399,9 +1477,6 @@
/* re <=: < on 64-bit platforms, == on 32-bit ones */
tl_assert(sizeof(SegmentID) <= sizeof(Word));
tl_assert(sizeof(Segment*) == sizeof(Word));
- tl_assert(map_segments == NULL);
- map_segments = HG_(newFM)( hg_zalloc, hg_free, NULL/*unboxed Word cmp*/);
- tl_assert(map_segments != NULL);
hbefore__invalidate_cache();
tl_assert(sizeof(Addr) == sizeof(Word));
@@ -1413,9 +1488,9 @@
tl_assert(is_sane_LockN(__bus_lock_Lock));
HG_(addToFM)( map_locks, (Word)&__bus_lock, (Word)__bus_lock_Lock );
- tl_assert(univ_tsets == NULL);
- univ_tsets = HG_(newWordSetU)( hg_zalloc, hg_free, 8/*cacheSize*/ );
- tl_assert(univ_tsets != NULL);
+ tl_assert(univ_ssets == NULL);
+ univ_ssets = HG_(newWordSetU)( hg_zalloc, hg_free, 8/*cacheSize*/ );
+ tl_assert(univ_ssets != NULL);
tl_assert(univ_lsets == NULL);
univ_lsets = HG_(newWordSetU)( hg_zalloc, hg_free, 8/*cacheSize*/ );
@@ -1430,9 +1505,8 @@
/* a segment for the new thread ... */
// FIXME: code duplication in ev__post_thread_create
- segid = alloc_SegmentID();
- seg = mk_Segment( NULL, NULL, NULL );
- map_segments_add( segid, seg );
+ segid = mk_Segment( NULL, NULL, NULL );
+ seg = SEG_get(segid);
/* a Thread for the new thread ... */
thr = mk_Thread( segid );
@@ -1451,7 +1525,7 @@
complaining) */
tl_assert( sizeof(__bus_lock) == 4 );
shadow_mem_set8( NULL/*unused*/, __bus_lock_Lock->guestaddr,
- mk_SHVAL_Excl(segid) );
+ SHVAL_New );
shmem__set_mbHasLocks( __bus_lock_Lock->guestaddr, True );
all__sanity_check("initialise_data_structures");
@@ -1585,38 +1659,6 @@
static void segments__generate_vcg ( void ); /* fwds */
-/*--------------- SegmentID to Segment* maps ---------------*/
-
-static Segment* map_segments_lookup ( SegmentID segid )
-{
- Bool found;
- Segment* seg = NULL;
- tl_assert( is_sane_SegmentID(segid) );
- found = HG_(lookupFM)( map_segments,
- NULL, (Word*)&seg, (Word)segid );
- tl_assert(found);
- tl_assert(seg != NULL);
- return seg;
-}
-
-static Segment* map_segments_maybe_lookup ( SegmentID segid )
-{
- Bool found;
- Segment* seg = NULL;
- tl_assert( is_sane_SegmentID(segid) );
- found = HG_(lookupFM)( map_segments,
- NULL, (Word*)&seg, (Word)segid );
- if (!found) tl_assert(seg == NULL);
- return seg;
-}
-
-static void map_segments_add ( SegmentID segid, Segment* seg )
-{
- /* This is a bit inefficient. Oh well. */
- tl_assert( !HG_(lookupFM)( map_segments, NULL, NULL, segid ));
- HG_(addToFM)( map_segments, (Word)segid, (Word)seg );
-}
-
/*--------------- to do with Vector Timestamps ---------------*/
/* Scalar Timestamp */
@@ -2101,7 +2143,7 @@
{
Int i;
SegmentID bogus = 0;
- tl_assert(!is_sane_SegmentID(bogus));
+ tl_assert(!SEG_id_is_sane(bogus));
stats__hbefore_invals++;
for (i = 0; i < HBEFORE__N_CACHE; i++) {
hbefore__cache[i].segid1 = bogus;
@@ -2115,8 +2157,8 @@
Bool hbG, hbV;
Int i, j, iNSERT_POINT;
Segment *seg1, *seg2;
- tl_assert(is_sane_SegmentID(segid1));
- tl_assert(is_sane_SegmentID(segid2));
+ tl_assert(SEG_id_is_sane(segid1));
+ tl_assert(SEG_id_is_sane(segid2));
tl_assert(segid1 != segid2);
stats__hbefore_queries++;
stats__hbefore_probes++;
@@ -2140,8 +2182,8 @@
/* Not found. Search the graph and add an entry to the cache. */
stats__hbefore_gsearches++;
- seg1 = map_segments_lookup(segid1);
- seg2 = map_segments_lookup(segid2);
+ seg1 = SEG_get(segid1);
+ seg2 = SEG_get(segid2);
tl_assert(is_sane_Segment(seg1));
tl_assert(is_sane_Segment(seg2));
tl_assert(seg1 != seg2);
@@ -2194,7 +2236,7 @@
Yellow -- signal edge
Pink -- semaphore-up edge
*/
- Segment* seg;
+ UInt i;
HChar vtsstr[128];
VG_(printf)(PFX "graph: { title: \"Segments\"\n");
VG_(printf)(PFX "orientation: top_to_bottom\n");
@@ -2203,7 +2245,8 @@
VG_(printf)(PFX "x: 20\n");
VG_(printf)(PFX "y: 20\n");
VG_(printf)(PFX "color: lightgrey\n");
- for (seg = admin_segments; seg; seg=seg->admin) {
+ for (i = 1; i < SegmentArray.size; i++) {
+ Segment* seg = SEG_get(i);
VG_(printf)(PFX "node: { title: \"%p\" color: lightcyan "
"textcolor: darkgreen label: \"Seg %p\\n",
@@ -2491,7 +2534,7 @@
if any shadow word is ShR or ShM then .mbHasShared == True
for each Excl(segid) state
- map_segments_lookup maps to a sane Segment(seg)
+ SEG_get maps to a sane Segment(seg)
for each ShM/ShR(tsetid,lsetid) state
each lk in lset is a valid Lock
each thr in tset is a valid thread, which is non-dead
@@ -2536,9 +2579,9 @@
// thread
if (!thread_is_a_holder_of_Lock(thr,lk)) BAD("3");
// Thread.csegid is a valid SegmentID
- if (!is_sane_SegmentID(thr->csegid)) BAD("4");
+ if (!SEG_id_is_sane(thr->csegid)) BAD("4");
// and the associated Segment has .thr == t
- seg = map_segments_maybe_lookup(thr->csegid);
+ seg = SEG_maybe_get(thr->csegid);
if (!is_sane_Segment(seg)) BAD("5");
if (seg->thr != thr) BAD("6");
}
@@ -2559,7 +2602,7 @@
Char* how = "no error";
Addr gla;
Lock* lk;
- Int i;
+ UWord i;
// # entries in admin_locks == # entries in map_locks
for (i = 0, lk = admin_locks; lk; i++, lk = lk->admin)
;
@@ -2630,18 +2673,15 @@
{
#define BAD(_str) do { how = (_str); goto bad; } while (0)
Char* how = "no error";
- Int i;
+ UInt i;
Segment* seg;
// FIXME
// the Segment graph is a dag (no cycles)
// all of the Segment graph must be reachable from the segids
// mentioned in the Threads
- // # entries in admin_segments == # entries in map_segments
- for (i = 0, seg = admin_segments; seg; i++, seg = seg->admin)
- ;
- if (i != HG_(sizeFM)(map_segments)) BAD("1");
// for seg in Segments {
- for (seg = admin_segments; seg; seg = seg->admin) {
+ for (i = 1; i < SegmentArray.size; i++) {
+ seg = SEG_get(i);
if (!is_sane_Segment(seg)) BAD("2");
if (!is_sane_Thread(seg->thr)) BAD("3");
if (!seg->vts) BAD("4");
@@ -2674,17 +2714,15 @@
{
#define BAD(_str) do { how = (_str); goto bad; } while (0)
Char* how = "no error";
- Word smga;
SecMap* sm;
- Word i, j, ws_size, n_valid_tags;
+ UWord smga, j, i, n_valid_tags, ws_size;
UWord* ws_words;
Addr* valid_tags;
HG_(initIterFM)( map_shmem );
// for sm in SecMaps {
- while (HG_(nextIterFM)( map_shmem,
- (Word*)&smga, (Word*)&sm )) {
+ while (HG_(nextIterFM)( map_shmem, &smga, (Word*)&sm )) {
SecMapIter itr;
- SVal* w32p = NULL;
+ SVal* sv_p = NULL;
Bool mbHasShared = False;
Bool allNoAccess = True;
if (!is_sane_SecMap(sm)) BAD("1");
@@ -2692,45 +2730,39 @@
if (smga != shmem__round_to_SecMap_base(smga)) BAD("2");
// if any shadow word is ShR or ShM then .mbHasShared == True
initSecMapIter( &itr );
- while (stepSecMapIter( &w32p, &itr, sm )) {
- SVal w32 = *w32p;
- if (is_SHVAL_Sh(w32))
+ while (stepSecMapIter( &sv_p, &itr, sm )) {
+ SVal sv = *sv_p;
+ if (is_SHVAL_Shared(sv))
mbHasShared = True;
- if (!is_SHVAL_NoAccess(w32))
+ if (!is_SHVAL_NoAccess(sv))
allNoAccess = False;
- if (is_SHVAL_Excl(w32)) {
- // for each Excl(segid) state
- // map_segments_lookup maps to a sane Segment(seg)
- Segment* seg;
- SegmentID segid = un_SHVAL_Excl(w32);
- if (!is_sane_SegmentID(segid)) BAD("3");
- seg = map_segments_maybe_lookup(segid);
- if (!is_sane_Segment(seg)) BAD("4");
- }
- else if (is_SHVAL_Sh(w32)) {
- WordSetID tset = un_SHVAL_Sh_tset(w32);
- WordSetID lset = un_SHVAL_Sh_lset(w32);
- if (!HG_(plausibleWS)( univ_tsets, tset )) BAD("5");
- if (!HG_(saneWS_SLOW)( univ_tsets, tset )) BAD("6");
- if (HG_(cardinalityWS)( univ_tsets, tset ) < 2) BAD("7");
- if (!HG_(plausibleWS)( univ_lsets, lset )) BAD("8");
- if (!HG_(saneWS_SLOW)( univ_lsets, lset )) BAD("9");
- HG_(getPayloadWS)( &ws_words, &ws_size, univ_lsets, lset );
+
+ if (is_SHVAL_RW(sv)) {
+ LockSet LS = get_SHVAL_LS(sv);
+ SegmentSet SS = get_SHVAL_SS(sv);
+ // check segment set
+ for (j = 0; j < SS_get_size(SS); j++) {
+ SegmentID id = SS_get_element(SS, j);
+ if (!SEG_id_is_sane(id)) BAD("3");
+ if (!is_sane_Segment(SEG_get(id))) BAD("4");
+ }
+ if (!SS_is_singleton(SS)) {
+ if (!HG_(plausibleWS)( univ_ssets, SS )) BAD("5");
+ if (!HG_(saneWS_SLOW)( univ_ssets, SS )) BAD("6");
+ if (HG_(cardinalityWS)( univ_ssets, SS ) < 2) BAD("7");
+ }
+ // check lock set
+ if (!HG_(plausibleWS)( univ_lsets, LS )) BAD("8");
+ if (!HG_(saneWS_SLOW)( univ_lsets, LS )) BAD("9");
+ HG_(getPayloadWS)( &ws_words, &ws_size, univ_lsets, LS );
for (j = 0; j < ws_size; j++) {
Lock* lk = (Lock*)ws_words[j];
// for each ShM/ShR(tsetid,lsetid) state
- // each lk in lset is a valid Lock
+ // each lk in LS is a valid Lock
if (!is_sane_LockN(lk)) BAD("10");
}
- HG_(getPayloadWS)( &ws_words, &ws_size, univ_tsets, tset );
- for (j = 0; j < ws_size; j++) {
- Thread* thr = (Thread*)ws_words[j];
- //for each ShM/ShR(tsetid,lsetid) state
- // each thr in tset is a valid thread, which is non-dead
- if (!is_sane_Thread(thr)) BAD("11");
- }
}
- else if (is_SHVAL_NoAccess(w32) || is_SHVAL_New(w32)) {
+ else if (is_SHVAL_NoAccess(sv) || is_SHVAL_New(sv) || is_SHVAL_Race(sv)) {
/* nothing to check */
}
else {
@@ -2836,9 +2868,12 @@
static void record_error_Misc ( Thread*, HChar* );
static void announce_one_thread ( Thread* thr ); /* fwds */
-static WordSetID add_BHL ( WordSetID lockset ) {
- return HG_(addToWS)( univ_lsets, lockset, (Word)__bus_lock_Lock );
-}
+// KCC: If you agree with the new scheme of handling BHL,
+// KCC: add_BHL/del_BHL could be deleted completely.
+
+//static WordSetID add_BHL ( WordSetID lockset ) {
+// return HG_(addToWS)( univ_lsets, lockset, (Word)__bus_lock_Lock );
+//}
static WordSetID del_BHL ( WordSetID lockset ) {
return HG_(delFromWS)( univ_lsets, lockset, (Word)__bus_lock_Lock );
}
@@ -2977,8 +3012,8 @@
case 'p': how = "pa"; break;
default: tl_assert(0);
}
- show_shadow_w32_for_user(txt_old, sizeof(txt_old), sv_old);
- show_shadow_w32_for_user(txt_new, sizeof(txt_new), sv_new);
+ show_sval(txt_old, sizeof(txt_old), sv_old);
+ show_sval(txt_new, sizeof(txt_new), sv_new);
txt_old[sizeof(txt_old)-1] = 0;
txt_new[sizeof(txt_new)-1] = 0;
if (clo_trace_level == 2) {
@@ -3000,320 +3035,197 @@
}
}
+//
+//
+// See http://code.google.com/p/data-race-test/wiki/MSMProp1
+// for description.
+//
+// This routine is not (yet) fully optimized for performance.
+// TODO: handle state with one segment in segment set separately
+// for better performance.
+static
+SVal memory_state_machine(Bool is_w, Thread* thr, Addr a, SVal sv_old, Int sz)
+{
+ Bool hb_all = False;
+ UWord oldSS_size = 0;
+ Bool was_w, now_w;
+ SegmentSet oldSS;
+ LockSet oldLS;
+ Bool is_race = False;
+ SVal sv_new = SHVAL_Invalid;
+ Bool do_trace = clo_trace_level > 0
+ && a >= clo_trace_addr
+ && a < (clo_trace_addr+sz);
-/* Here are some MSM stats from startup/shutdown of OpenOffice.
+ SegmentID currS = thr->csegid;
- msm: 489,734,723 80,278,862 rd/wr_Excl_nochange
- msm: 3,171,542 93,738 rd/wr_Excl_transfer
- msm: 45,036 167 rd/wr_Excl_to_ShR/ShM
- msm: 13,352,594 285 rd/wr_ShR_to_ShR/ShM
- msm: 1,125,879 815,779 rd/wr_ShM_to_ShM
- msm: 7,561,842 250,629,935 rd/wr_New_to_Excl
- msm: 17,778 0 rd/wr_NoAccess
- This says how the clauses should be ordered for greatest speed:
+ UWord i;
+ SegmentSet newSS = 0;
+ LockSet newLS = 0;
- * the vast majority of memory reads (490 million out of a total of
- 515 million) are of memory in an exclusive state, and the state
- is unchanged. All other read accesses are insignificant by
- comparison.
+ // current locks.
+ LockSet currLS = is_w ? thr->locksetW
+ : thr->locksetA;
- * 75% (251 million out of a total of 332 million) writes are 'first
- time' writes, which take New memory into exclusive ownership.
- Almost all the rest (80 million) are accesses to exclusive state,
- which remains unchanged. All other write accesses are
- insignificant. */
+ if (sv_old == SHVAL_Race) {
+ // we already reported a race, don't bother again.
+ sv_new = sv_old;
+ goto done;
+ }
-/* The core MSM. If 'wold' is the old 32-bit shadow word for a
- location, return the new shadow word that would result for a read
- of the location, and report any errors necessary on the way. This
- does not update shadow memory - it merely produces new shadow words
- from old. 'thr_acc' and 'a' are supplied only so it can produce
- coherent error messages if necessary. */
-static
-SVal msm__handle_read ( Thread* thr_acc, Addr a, SVal wold, Int szB )
-{
- SVal wnew = SHVAL_Invalid;
- tl_assert(is_sane_Thread(thr_acc));
+ if (__bus_lock_Lock->heldBy
+ && (is_SHVAL_New(sv_old) || is_SHVAL_R(sv_old))) {
+ // BHL is held and we are in 'Read' or 'New' state.
+ // User is doing something very smart with LOCK prefix.
+ // Just ignore this memory location.
+ sv_new = SHVAL_Race;
- if (0) VG_(printf)("read thr=%p %p\n", thr_acc, a);
+ // VG_(printf)("Ignoring memory %p accessed with LOCK prefix at\n", a);
+ // VG_(get_and_pp_StackTrace)(map_threads_reverse_lookup_SLOW(thr), 5);
- /* Exclusive */
- if (LIKELY(is_SHVAL_Excl(wold))) {
- /* read Excl(segid)
- | segid_old == segid-of-thread
- -> no change
- | segid_old `happens_before` segid-of-this-thread
- -> Excl(segid-of-this-thread)
- | otherwise
- -> ShR
- */
- SegmentID segid_old = un_SHVAL_Excl(wold);
- tl_assert(is_sane_SegmentID(segid_old));
- if (LIKELY(segid_old == thr_acc->csegid)) {
- /* no change */
- stats__msm_read_Excl_nochange++;
- /*NOCHANGE*/return wold;
- }
- if (happens_before(segid_old, thr_acc->csegid)) {
- /* -> Excl(segid-of-this-thread) */
- wnew = mk_SHVAL_Excl(thr_acc->csegid);
- stats__msm_read_Excl_transfer++;
- goto changed;
- }
- /* else */ {
- /* Enter the shared-readonly (ShR) state. */
- WordSetID tset, lset;
- /* This location has been accessed by precisely two threads.
- Make an appropriate tset. */
- // FIXME: performance: duplicate map_segments_lookup(segid_old)
- // since must also be done in happens_before()
- Segment* seg_old = map_segments_lookup( segid_old );
- Thread* thr_old = seg_old->thr;
- tset = HG_(doubletonWS)( univ_tsets, (Word)thr_old, (Word)thr_acc );
- lset = add_BHL( thr_acc->locksetA ); /* read ==> use all locks */
- wnew = mk_SHVAL_ShR( tset, lset );
- stats__msm_read_Excl_to_ShR++;
- goto changed;
- }
- /*NOTREACHED*/
- }
-
- /* Shared-Readonly */
- if (is_SHVAL_ShR(wold)) {
- /* read Shared-Readonly(threadset, lockset)
- We remain in ShR state, but add this thread to the
- threadset and refine the lockset accordingly. Do not
- complain if the lockset becomes empty -- that's ok. */
- WordSetID tset_old = un_SHVAL_ShR_tset(wold);
- WordSetID lset_old = un_SHVAL_ShR_lset(wold);
- WordSetID tset_new = HG_(addToWS)( univ_tsets,
- tset_old, (Word)thr_acc );
- WordSetID lset_new = HG_(intersectWS)( univ_lsets,
- lset_old,
- add_BHL(thr_acc->locksetA)
- /* read ==> use all locks */ );
- /*SVal*/ wnew = mk_SHVAL_ShR( tset_new, lset_new );
- if (lset_old != lset_new)
- record_last_lock_lossage(a,lset_old,lset_new);
- stats__msm_read_ShR_to_ShR++;
- goto changed;
+ goto done;
+ // TODO: a better scheme might be:
+ // When we see a first write with BHL held we do:
+ // - If we are in state 'Read' or 'New', change the state to 'BHL'.
+ // - If we are in state 'Write', report a race.
+ //
+ // When we are in state BHL:
+ // - Any read keeps us in state 'BHL'.
+ // - Any write with BHL held keeps us in state 'BHL'.
+ // - Any other write is a race.
}
- /* Shared-Modified */
- if (is_SHVAL_ShM(wold)) {
- /* read Shared-Modified(threadset, lockset)
- We remain in ShM state, but add this thread to the
- threadset and refine the lockset accordingly.
- If the lockset becomes empty, complain. */
- WordSetID tset_old = un_SHVAL_ShM_tset(wold);
- WordSetID lset_old = un_SHVAL_ShM_lset(wold);
- WordSetID tset_new = HG_(addToWS)( univ_tsets,
- tset_old, (Word)thr_acc );
- WordSetID lset_new = HG_(intersectWS)( univ_lsets,
- lset_old,
- add_BHL(thr_acc->locksetA)
- /* read ==> use all locks */ );
- /*SVal*/ wnew = mk_SHVAL_ShM( tset_new, lset_new );
- if (lset_old != lset_new)
- record_last_lock_lossage(a,lset_old,lset_new);
- if (HG_(isEmptyWS)(univ_lsets, lset_new)
- && !HG_(isEmptyWS)(univ_lsets, lset_old)) {
- record_error_Race( thr_acc, a,
- False/*isWrite*/, szB, wold, wnew,
- maybe_get_lastlock_initpoint(a) );
- }
- stats__msm_read_ShM_to_ShM++;
- goto changed;
- }
-
- /* New */
- if (is_SHVAL_New(wold)) {
- /* read New -> Excl(segid) */
- wnew = mk_SHVAL_Excl( thr_acc->csegid );
- stats__msm_read_New_to_Excl++;
- goto changed;
- }
- /* NoAccess */
- if (is_SHVAL_NoAccess(wold)) {
- // FIXME: complain if accessing here
- // FIXME: transition to Excl?
- if (0)
- VG_(printf)(
- "msm__handle_read_aligned_32(thr=%p, addr=%p): NoAccess\n",
- thr_acc, (void*)a );
- stats__msm_read_NoAccess++;
- /*NOCHANGE*/return wold; /* no change */
- }
- /* hmm, bogus state */
- tl_assert(0);
+ tl_assert(is_sane_Thread(thr));
- changed:
- if (UNLIKELY(clo_trace_level > 0)) {
- if (a <= clo_trace_addr && clo_trace_addr < a+szB
- && wold != wnew) {
- msm__show_state_change( thr_acc, a, szB, 'r', wold, wnew );
- }
+ // NoAccess
+ if (is_SHVAL_NoAccess(sv_old)) {
+ // TODO: complain
+ sv_new = sv_old;
+ goto done;
}
- return wnew;
-}
-/* Similar to msm__handle_read, compute a new 32-bit shadow word
- resulting from a write to a location, and report any errors
- necessary on the way. */
-static
-SVal msm__handle_write ( Thread* thr_acc, Addr a, SVal wold, Int szB )
-{
- SVal wnew = SHVAL_Invalid;
- tl_assert(is_sane_Thread(thr_acc));
+ // New
+ if (is_SHVAL_New(sv_old)) {
+ newSS = SS_mk_singleton(currS);
+ sv_new = mk_SHVAL_RW(is_w, newSS, currLS);
+ goto done;
+ }
- if (0) VG_(printf)("write32 thr=%p %p\n", thr_acc, a);
- /* New */
- if (LIKELY(is_SHVAL_New(wold))) {
- /* write New -> Excl(segid) */
- wnew = mk_SHVAL_Excl( thr_acc->csegid );
- stats__msm_write_New_to_Excl++;
- goto changed;
- }
+ // Read or Write
+ tl_assert(is_SHVAL_RW(sv_old));
+ was_w = is_SHVAL_W(sv_old);
+ oldSS = get_SHVAL_SS(sv_old);
+ oldLS = get_SHVAL_LS(sv_old);
- /* Exclusive */
- if (is_SHVAL_Excl(wold)) {
- // I believe is identical to case for read Excl
- // apart from enters ShM rather than ShR
- /* read Excl(segid)
- | segid_old == segid-of-thread
- -> no change
- | segid_old `happens_before` segid-of-this-thread
- -> Excl(segid-of-this-thread)
- | otherwise
- -> ShM
- */
- SegmentID segid_old = un_SHVAL_Excl(wold);
- tl_assert(is_sane_SegmentID(segid_old));
- if (segid_old == thr_acc->csegid) {
- /* no change */
- stats__msm_write_Excl_nochange++;
- /*NOCHANGE*/return wold;
+
+ oldSS_size = SS_get_size(oldSS);
+ // update the segment set and compute hb_all
+ hb_all = True;
+ newSS = SS_mk_singleton(currS);
+ for (i = 0; i < oldSS_size; i++) {
+ SegmentID S = SS_get_element(oldSS, i);
+ Bool hb = False;
+ if (S == currS // Same segment.
+ || SEG_get(S)->thr == thr // Same thread.
+ || happens_before(S, currS)) { // different thread, but happens-before
+ hb = True;
}
- if (happens_before(segid_old, thr_acc->csegid)) {
- /* -> Excl(segid-of-this-thread) */
- wnew = mk_SHVAL_Excl(thr_acc->csegid);
- stats__msm_write_Excl_transfer++;
- goto changed;
+ if (do_trace) {
+ VG_(printf)("HB(S%d/T%d,cur)=%d\n",
+ S, SEG_get(S)->thr->errmsg_index, hb);
}
- /* else */ {
- /* Enter the shared-modified (ShM) state. */
- WordSetID tset, lset;
- /* This location has been accessed by precisely two threads.
- Make an appropriate tset. */
- // FIXME: performance: duplicate map_segments_lookup(segid_old)
- // since must also be done in happens_before()
- Segment* seg_old = map_segments_lookup( segid_old );
- Thread* thr_old = seg_old->thr;
- tset = HG_(doubletonWS)( univ_tsets, (Word)thr_old, (Word)thr_acc );
- lset = thr_acc->locksetW; /* write ==> use only w-held locks */
- wnew = mk_SHVAL_ShM( tset, lset );
- if (HG_(isEmptyWS)(univ_lsets, lset)) {
- record_error_Race( thr_acc,
- a, True/*isWrite*/, szB, wold, wnew,
- maybe_get_lastlock_initpoint(a) );
+
+ if(!hb) {
+ hb_all = False;
+ // Not happened-before. Leave this segment in SS.
+ if (SS_is_singleton(newSS)) {
+ tl_assert(currS != S);
+ newSS = HG_(doubletonWS)(univ_ssets, currS, S);
+ } else {
+ newSS = HG_(addToWS)(univ_ssets, newSS, S);
}
- stats__msm_write_Excl_to_ShM++;
- goto changed;
}
- /*NOTREACHED*/
}
- /* Shared-Readonly */
- if (is_SHVAL_ShR(wold)) {
- /* write Shared-Readonly(threadset, lockset)
- We move to ShM state, add this thread to the
- threadset and refine the lockset accordingly.
- If the lockset becomes empty, complain. */
- WordSetID tset_old = un_SHVAL_ShR_tset(wold);
- WordSetID lset_old = un_SHVAL_ShR_lset(wold);
- WordSetID tset_new = HG_(addToWS)( univ_tsets,
- tset_old, (Word)thr_acc );
- WordSetID lset_new = HG_(intersectWS)(
- univ_lsets,
- lset_old,
- thr_acc->locksetW
- /* write ==> use only w-held locks */
- );
- /*SVal*/ wnew = mk_SHVAL_ShM( tset_new, lset_new );
- if (lset_old != lset_new)
- record_last_lock_lossage(a,lset_old,lset_new);
- if (HG_(isEmptyWS)(univ_lsets, lset_new)) {
- record_error_Race( thr_acc, a,
- True/*isWrite*/, szB, wold, wnew,
- maybe_get_lastlock_initpoint(a) );
- }
- stats__msm_write_ShR_to_ShM++;
- goto changed;
+ // update lock set.
+ if (hb_all) {
+ newLS = currLS;
+ } else {
+ newLS = HG_(intersectWS)(univ_lsets, oldLS, currLS);
}
- /* Shared-Modified */
- else if (is_SHVAL_ShM(wold)) {
- /* write Shared-Modified(threadset, lockset)
- We remain in ShM state, but add this thread to the
- threadset and refine the lockset accordingly.
- If the lockset becomes empty, complain. */
- WordSetID tset_old = un_SHVAL_ShM_tset(wold);
- WordSetID lset_old = un_SHVAL_ShM_lset(wold);
- WordSetID tset_new = HG_(addToWS)( univ_tsets,
- tset_old, (Word)thr_acc );
- WordSetID lset_new = HG_(intersectWS)(
- univ_lsets,
- lset_old,
- thr_acc->locksetW
- /* write ==> use only w-held locks */
- );
- /*SVal*/ wnew = mk_SHVAL_ShM( tset_new, lset_new );
- if (lset_old != lset_new)
- record_last_lock_lossage(a,lset_old,lset_new);
- if (HG_(isEmptyWS)(univ_lsets, lset_new)
- && !HG_(isEmptyWS)(univ_lsets, lset_old)) {
- record_error_Race( thr_acc, a,
- True/*isWrite*/, szB, wold, wnew,
- maybe_get_lastlock_initpoint(a) );
- }
- stats__msm_write_ShM_to_ShM++;
- goto changed;
+ // update the state
+ now_w = is_w || (was_w && !hb_all);
+
+ // generate new SVal
+ sv_new = mk_SHVAL_RW(now_w, newSS, newLS);
+
+ is_race = now_w
+ && !SS_is_singleton(newSS)
+ && HG_(isEmptyWS)(univ_lsets, newLS);
+
+ if (oldLS != newLS) {
+ // if the lockset changed, remember when it happened
+ record_last_lock_lossage(a, oldLS, newLS);
}
- /* NoAccess */
- if (is_SHVAL_NoAccess(wold)) {
- // FIXME: complain if accessing here
- // FIXME: transition to Excl?
- if (0)
- VG_(printf)(
- "msm__handle_write_aligned_32(thr=%p, addr=%p): NoAccess\n",
- thr_acc, (void*)a );
- stats__msm_write_NoAccess++;
- /*NOCHANGE*/return wold;
- }
+ done:
- /* hmm, bogus state */
- VG_(printf)("msm__handle_write_aligned_32: bogus old state 0x%x\n",
- wold);
- tl_assert(0);
+ if (do_trace) {
+ char buf[200];
- changed:
- if (UNLIKELY(clo_trace_level > 0)) {
- if (a <= clo_trace_addr && clo_trace_addr < a+szB
- && wold != wnew) {
- msm__show_state_change( thr_acc, a, szB, 'w', wold, wnew );
+ VG_(printf)("RW-Locks held: ");
+ show_lockset(thr->locksetA);
+ VG_(printf)("\n");
+ if (thr->locksetA != thr->locksetW) {
+ VG_(printf)(" W-Locks held: ");
+ show_lockset(thr->locksetW);
+ VG_(printf)("\n");
}
+
+ if (__bus_lock_Lock->heldBy) {
+ VG_(printf)("BHL is held\n");
+ }
+
+ show_sval(buf, sizeof(buf), sv_new);
+ VG_(message)(Vg_UserMsg, "TRACE: %p S%d/T%d %c %llx %s", a,
+ (int)currS, thr->errmsg_index,
+ is_w ? 'w' : 'r', sv_new, buf);
+ if (clo_trace_level >= 2) {
+ ThreadId tid = map_threads_maybe_reverse_lookup_SLOW(thr);
+ if (tid != VG_INVALID_THREADID) {
+ VG_(get_and_pp_StackTrace)( tid, 15);
+ }
+ }
}
- return wnew;
+
+ if (clo_trace_level > 0 && !do_trace) {
+ // if we are tracing something, don't report a race on anything else.
+ is_race = False;
+ }
+
+ // report the race if needed
+ if (is_race) {
+ // ok, now record the race.
+ record_error_Race( thr,
+ a, is_w, sz, sv_old, sv_new,
+ maybe_get_lastlock_initpoint(a) );
+ // put this in Race state
+ sv_new = SHVAL_Race;
+ }
+
+ return sv_new;
}
+
+
/*----------------------------------------------------------------*/
/*--- Shadow value and address range handlers ---*/
/*----------------------------------------------------------------*/
@@ -3347,7 +3259,7 @@
for that index. */
static void get_ZF_by_index ( /*OUT*/CacheLineZ** zp,
/*OUT*/CacheLineF** fp,
- SecMap* sm, Int zix ) {
+ SecMap* sm, UInt zix ) {
CacheLineZ* lineZ;
tl_assert(zp);
tl_assert(fp);
@@ -3355,7 +3267,7 @@
tl_assert(is_sane_SecMap(sm));
lineZ = &sm->linesZ[zix];
if (lineZ->dict[0] == 0) {
- Int fix = lineZ->dict[1];
+ UInt fix = (UInt)lineZ->dict[1];
tl_assert(sm->linesF);
tl_assert(sm->linesF_size > 0);
tl_assert(fix >= 0 && fix < sm->linesF_size);
@@ -3383,7 +3295,7 @@
lineZ = &sm->linesZ[zix];
lineF = NULL;
if (lineZ->dict[0] == 0) {
- Word fix = lineZ->dict[1];
+ UInt fix = (UInt)lineZ->dict[1];
tl_assert(sm->linesF);
tl_assert(sm->linesF_size > 0);
tl_assert(fix >= 0 && fix < sm->linesF_size);
@@ -3412,7 +3324,7 @@
lineF = NULL;
/* If lineZ has an associated lineF, free it up. */
if (lineZ->dict[0] == 0) {
- Word fix = lineZ->dict[1];
+ UInt fix = (UInt)lineZ->dict[1];
tl_assert(sm->linesF);
tl_assert(sm->linesF_size > 0);
tl_assert(fix >= 0 && fix < sm->linesF_size);
@@ -3426,7 +3338,7 @@
static
void alloc_F_for_writing ( /*MOD*/SecMap* sm, /*OUT*/Word* fixp ) {
- Word i, new_size;
+ UInt i, new_size;
CacheLineF* nyu;
if (sm->linesF) {
@@ -3780,7 +3692,7 @@
# define PUT(_n,_v) \
do { Word i; \
- if (is_SHVAL_Sh(_v)) \
+ if (is_SHVAL_Shared(_v)) \
*anyShared = True; \
for (i = 0; i < (_n); i++) \
*dst++ = (_v); \
@@ -3835,8 +3747,8 @@
tl_assert(cloff == N_LINE_ARANGE);
/* Assert we wrote N_LINE_ARANGE shadow values. */
- tl_assert( ((HChar*)dst) - ((HChar*)dst0)
- == nDst * sizeof(SVal) );
+ tl_assert( ((HChar*)dst) - ((HChar*)dst0)
+ == (Word)(nDst * sizeof(SVal)) );
return anyShared;
}
@@ -3913,7 +3825,7 @@
alloc_F_for_writing( sm, &fix );
tl_assert(sm->linesF);
tl_assert(sm->linesF_size > 0);
- tl_assert(fix >= 0 && fix < sm->linesF_size);
+ tl_assert(fix >= 0 && fix < (Word)sm->linesF_size);
lineF = &sm->linesF[fix];
tl_assert(!lineF->inUse);
lineZ->dict[0] = lineZ->dict[2] = lineZ->dict[3] = 0;
@@ -4277,7 +4189,7 @@
tl_assert(is_sane_CacheLine(cl)); /* EXPENSIVE */
}
svOld = cl->svals[cloff];
- svNew = msm__handle_read( thr_acc, a, svOld, 1 );
+ svNew = memory_state_machine( False /*!is_w*/, thr_acc, a, svOld, 1 );
cl->svals[cloff] = svNew;
}
static void shadow_mem_read16 ( Thread* thr_acc, Addr a, SVal uuOpaque ) {
@@ -4303,7 +4215,7 @@
tl_assert(is_sane_CacheLine(cl)); /* EXPENSIVE */
}
svOld = cl->svals[cloff];
- svNew = msm__handle_read( thr_acc, a, svOld, 2 );
+ svNew = memory_state_machine( False /*!is_w*/, thr_acc, a, svOld, 2 );
cl->svals[cloff] = svNew;
return;
slowcase: /* misaligned, or must go further down the tree */
@@ -4335,7 +4247,7 @@
tl_assert(is_sane_CacheLine(cl)); /* EXPENSIVE */
}
svOld = cl->svals[cloff];
- svNew = msm__handle_read( thr_acc, a, svOld, 4 );
+ svNew = memory_state_machine( False /*!is_w*/, thr_acc, a, svOld, 4 );
cl->svals[cloff] = svNew;
return;
slowcase: /* misaligned, or must go further down the tree */
@@ -4357,7 +4269,7 @@
descr = cl->descrs[tno];
if (UNLIKELY( !(descr & (TREE_DESCR_32_0 << toff)) )) goto slowcase;
{ SVal* p = &cl->svals[cloff];
- *p = msm__handle_read( thr_acc, a, *p, 4 );
+ *p = memory_state_machine( False /*!is_w*/, thr_acc, a, *p, 4 );
}
return;
slowcase: /* misaligned, or not at this level in the tree */
@@ -4381,7 +4293,7 @@
goto slowcase;
}
svOld = cl->svals[cloff];
- svNew = msm__handle_read( thr_acc, a, svOld, 8 );
+ svNew = memory_state_machine( False /*!is_w*/, thr_acc, a, svOld, 8 );
cl->svals[cloff] = svNew;
return;
slowcase: /* misaligned, or must go further down the tree */
@@ -4408,7 +4320,7 @@
tl_assert(is_sane_CacheLine(cl)); /* EXPENSIVE */
}
svOld = cl->svals[cloff];
- svNew = msm__handle_write( thr_acc, a, svOld, 1 );
+ svNew = memory_state_machine( True /*is_w*/, thr_acc, a, svOld, 1 );
cl->svals[cloff] = svNew;
}
static void shadow_mem_write16 ( Thread* thr_acc, Addr a, SVal uuOpaque ) {
@@ -4434,7 +4346,7 @@
tl_assert(is_sane_CacheLine(cl)); /* EXPENSIVE */
}
svOld = cl->svals[cloff];
- svNew = msm__handle_write( thr_acc, a, svOld, 2 );
+ svNew = memory_state_machine( True /*is_w*/, thr_acc, a, svOld, 2 );
cl->svals[cloff] = svNew;
return;
slowcase: /* misaligned, or must go further down the tree */
@@ -4466,7 +4378,7 @@
tl_assert(is_sane_CacheLine(cl)); /* EXPENSIVE */
}
svOld = cl->svals[cloff];
- svNew = msm__handle_write( thr_acc, a, svOld, 4 );
+ svNew = memory_state_machine( True /*is_w*/, thr_acc, a, svOld, 4 );
cl->svals[cloff] = svNew;
return;
slowcase: /* misaligned, or must go further down the tree */
@@ -4488,7 +4400,7 @@
descr = cl->descrs[tno];
if (UNLIKELY( !(descr & (TREE_DESCR_32_0 << toff)) )) goto slowcase;
{ SVal* p = &cl->svals[cloff];
- *p = msm__handle_write( thr_acc, a, *p, 4 );
+ *p = memory_state_machine( True /*is_w*/, thr_acc, a, *p, 4 );
}
return;
slowcase: /* misaligned, or must go further down the tree */
@@ -4512,7 +4424,7 @@
goto slowcase;
}
svOld = cl->svals[cloff];
- svNew = msm__handle_write( thr_acc, a, svOld, 8 );
+ svNew = memory_state_machine( True /*is_w*/, thr_acc, a, svOld, 8 );
cl->svals[cloff] = svNew;
return;
slowcase: /* misaligned, or must go further down the tree */
@@ -4856,6 +4768,8 @@
modifying values in the backing store (SecMaps) and need
subsequent shmem accesses to get the new values.
+ KCC: I removed step 7 from the code. Do we really need it?
+
7. Modify all shadow words, by removing ToDelete from the lockset
of all ShM and ShR states. Note this involves a complete scan
over map_shmem, which is very expensive according to OProfile.
@@ -4989,50 +4903,6 @@
VG_(printf)("shadow_mem_make_NoAccess(%p, %u, %p): definitely slow case\n",
(void*)firstA, (UWord)len, (void*)lastA);
- /* Modify all shadow words, by removing l...
[truncated message content] |
|
From: <sv...@va...> - 2008-03-04 00:35:07
|
Author: sewardj
Date: 2008-03-04 00:35:05 +0000 (Tue, 04 Mar 2008)
New Revision: 7552
Log:
Merge (from trunk) r7427 ("Don't be quite so paranoid about rejecting
symbols that fall outside the .text segment. [...]")
Modified:
branches/HGDEV/coregrind/m_debuginfo/readelf.c
Modified: branches/HGDEV/coregrind/m_debuginfo/readelf.c
===================================================================
--- branches/HGDEV/coregrind/m_debuginfo/readelf.c 2008-03-03 22:20:51 UTC (rev 7551)
+++ branches/HGDEV/coregrind/m_debuginfo/readelf.c 2008-03-04 00:35:05 UTC (rev 7552)
@@ -458,7 +458,19 @@
if (*is_text_out) {
- if (!in_text) {
+ /* This used to reject any symbol falling outside the text
+ segment ("if (!in_text) ..."). Now it is relaxed slightly,
+ to reject only symbols which fall outside the area mapped
+ r-x. This is in accordance with r7427. See
+ "Comment_Regarding_Text_Range_Checks" in storage.c for
+ background. */
+ Bool in_rx;
+ vg_assert(di->have_rx_map);
+ in_rx = (!(*sym_avma_out + *sym_size_out <= di->rx_map_avma
+ || *sym_avma_out >= di->rx_map_avma + di->rx_map_size));
+ if (in_text)
+ vg_assert(in_rx);
+ if (!in_rx) {
TRACE_SYMTAB(
"ignore -- %p .. %p outside .text svma range %p .. %p\n",
*sym_avma_out, *sym_avma_out + *sym_size_out,
|