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
(18) |
2
(35) |
3
(34) |
4
(25) |
5
(16) |
6
(32) |
|
7
(7) |
8
(13) |
9
(20) |
10
(17) |
11
(10) |
12
(18) |
13
(9) |
|
14
(5) |
15
(26) |
16
(23) |
17
(5) |
18
(1) |
19
(4) |
20
(3) |
|
21
(10) |
22
(13) |
23
(13) |
24
(23) |
25
(30) |
26
(13) |
27
(6) |
|
28
(1) |
29
(16) |
30
(15) |
|
|
|
|
|
From: Michael S. <ms...@ap...> - 2009-06-05 23:29:50
|
On Jun 5, 2009, at 3:59 PM, Nicholas Nethercote wrote: > On Sat, Jun 6, 2009 at 1:19 AM, Michael Sweet <ms...@ap...> > wrote: >> >> Well, since I already have everything setup, I'm going to turn my >> system on >> once I verify the results this morning... > > Excellent, thanks. I hope the improved README.txt made things easier. They are definitely an improvement, but for me the best changes were to the nightly script so that I could actually run it! :P Anyways, they should be going out now, the main issue that I saw in the first report was that one of the tests wouldn't build since <stdint.h> wasn't being included (for uint32_t). ________________________________________ Michael R Sweet, Senior Printing System Engineer |
|
From: Nicholas N. <n.n...@gm...> - 2009-06-05 22:59:24
|
On Sat, Jun 6, 2009 at 1:19 AM, Michael Sweet <ms...@ap...> wrote: > > Well, since I already have everything setup, I'm going to turn my system on > once I verify the results this morning... Excellent, thanks. I hope the improved README.txt made things easier. > But like Alex said, it won't > hurt to have a few systems running the tests anyways (you already do for > Linux...) Sure. Nick |
|
From: <sv...@va...> - 2009-06-05 18:11:12
|
Author: bart Date: 2009-06-05 19:11:08 +0100 (Fri, 05 Jun 2009) New Revision: 10256 Log: Updated ignore list. Modified: branches/DRDDEV/drd/tests/ Property changes on: branches/DRDDEV/drd/tests ___________________________________________________________________ Name: svn:ignore - *.stderr.diff* *.stderr.out *.stdout.diff* *.stdout.out .deps annotate_rwlock atomic_var bar_bad bar_trivial boost_thread circular_buffer drd_bitmap_test fp_race hg01_all_ok hg02_deadlock hg03_inherit hg04_race hg05_race2 hg06_readshared hold_lock linuxthreads_det Makefile Makefile.in matinv memory_allocation monitor_example new_delete omp_matinv omp_prime omp_printf pth_barrier pth_barrier_race pth_barrier_reinit pth_broadcast pth_cancel_locked pth_cond_race pth_create_chain pth_create_glibc_2_0 pth_detached pth_detached_sem pth_inconsistent_cond_wait pth_mutex_reinit pth_process_shared_mutex pth_spinlock qt4_mutex qt4_rwlock qt4_semaphore recursive_mutex rwlock_race rwlock_test sem_as_mutex sigalrm tc01_simple_race tc02_simple_tls tc03_re_excl tc04_free_lock tc05_simple_race tc06_two_races tc07_hbl1 tc08_hbl2 tc09_bad_unlock tc10_rec_lock tc11_XCHG tc12_rwl_trivial tc13_laog1 tc15_laog_lockdel tc16_byterace tc17_sembar tc18_semabuse tc19_shadowmem tc20_verifywrap tc21_pthonce tc22_exit_w_lock tc23_bogus_condwait tc24_nonzero_sem thread_name trylock tsan_unittest vg_regtest.tmp* + *.stderr.diff* *.stderr.out *.stdout.diff* *.stdout.out .deps annotate_rwlock atomic_var bar_bad bar_trivial boost_thread circular_buffer fp_race hg01_all_ok hg02_deadlock hg03_inherit hg04_race hg05_race2 hg06_readshared hold_lock linuxthreads_det Makefile Makefile.in matinv memory_allocation monitor_example new_delete omp_matinv omp_prime omp_printf pth_barrier pth_barrier_race pth_barrier_reinit pth_broadcast pth_cancel_locked pth_cond_race pth_create_chain pth_create_glibc_2_0 pth_detached pth_detached_sem pth_inconsistent_cond_wait pth_mutex_reinit pth_process_shared_mutex pth_spinlock qt4_mutex qt4_rwlock qt4_semaphore recursive_mutex rwlock_race rwlock_test sem_as_mutex sigalrm tc01_simple_race tc02_simple_tls tc03_re_excl tc04_free_lock tc05_simple_race tc06_two_races tc07_hbl1 tc08_hbl2 tc09_bad_unlock tc10_rec_lock tc11_XCHG tc12_rwl_trivial tc13_laog1 tc15_laog_lockdel tc16_byterace tc17_sembar tc18_semabuse tc19_shadowmem tc20_verifywrap tc21_pthonce tc22_exit_w_lock tc23_bogus_condwait tc24_nonzero_sem thread_name trylock tsan_unittest unit_bitmap unit_vc vg_regtest.tmp* |
|
From: <sv...@va...> - 2009-06-05 18:11:03
|
Author: bart Date: 2009-06-05 19:10:55 +0100 (Fri, 05 Jun 2009) New Revision: 10255 Log: Added to repository. Added: branches/DRDDEV/drd/tests/unit_vc.stderr.exp branches/DRDDEV/drd/tests/unit_vc.vgtest Added: branches/DRDDEV/drd/tests/unit_vc.stderr.exp =================================================================== --- branches/DRDDEV/drd/tests/unit_vc.stderr.exp (rev 0) +++ branches/DRDDEV/drd/tests/unit_vc.stderr.exp 2009-06-05 18:10:55 UTC (rev 10255) @@ -0,0 +1,5 @@ +vc1: [ 3: 7, 5: 8 ] +vc2: [ 1: 4, 3: 9 ] +vc3: [ 1: 4, 3: 9, 5: 8 ] +vc_lte(vc1, vc2) = 0, vc_lte(vc1, vc3) = 1, vc_lte(vc2, vc3) = 1 +vc_lte([ 1: 3, 2: 1 ], [ 1: 4 ]) = 0 sw 0 Added: branches/DRDDEV/drd/tests/unit_vc.vgtest =================================================================== --- branches/DRDDEV/drd/tests/unit_vc.vgtest (rev 0) +++ branches/DRDDEV/drd/tests/unit_vc.vgtest 2009-06-05 18:10:55 UTC (rev 10255) @@ -0,0 +1,3 @@ +prog: unit_vc +args: +vgopts: -q --tool=memcheck --leak-check=full --show-reachable=yes |
|
From: <sv...@va...> - 2009-06-05 18:09:53
|
Author: bart
Date: 2009-06-05 19:09:48 +0100 (Fri, 05 Jun 2009)
New Revision: 10254
Log:
- Added a new functin called DRD_(vc_aprint)().
- Moved unit test for functions in drd_vc.c to tests/unit_vc.c.
- Renamed tests/drd_bitmap_test.c to tests/unit_bitmap.c.
- All tests/unit_bitmap.c output is now sent to stderr.
Added:
branches/DRDDEV/drd/tests/unit_bitmap.c
branches/DRDDEV/drd/tests/unit_bitmap.stderr.exp
branches/DRDDEV/drd/tests/unit_bitmap.vgtest
branches/DRDDEV/drd/tests/unit_vc.c
Removed:
branches/DRDDEV/drd/tests/drd_bitmap_test.c
branches/DRDDEV/drd/tests/drd_bitmap_test.stderr.exp
branches/DRDDEV/drd/tests/drd_bitmap_test.stdout.exp
branches/DRDDEV/drd/tests/drd_bitmap_test.vgtest
Modified:
branches/DRDDEV/drd/drd_vc.c
branches/DRDDEV/drd/drd_vc.h
branches/DRDDEV/drd/tests/Makefile.am
Modified: branches/DRDDEV/drd/drd_vc.c
===================================================================
--- branches/DRDDEV/drd/drd_vc.c 2009-06-05 16:56:40 UTC (rev 10253)
+++ branches/DRDDEV/drd/drd_vc.c 2009-06-05 18:09:48 UTC (rev 10254)
@@ -237,17 +237,48 @@
/** Print the contents of vector clock 'vc'. */
void DRD_(vc_print)(const VectorClock* const vc)
{
+ char* str;
+
+ if ((str = DRD_(vc_aprint)(vc)) != NULL)
+ {
+ VG_(printf)("%s", str);
+ VG_(free)(str);
+ }
+}
+
+/**
+ * Print the contents of vector clock 'vc' to a newly allocated string.
+ * The caller must call VG_(free)() on the return value of this function.
+ */
+char* DRD_(vc_aprint)(const VectorClock* const vc)
+{
unsigned i;
+ unsigned len;
+ char* str = 0;
tl_assert(vc);
- VG_(printf)("[");
+ len = 64;
+ str = VG_(realloc)("drd.vc.aprint.1", str, len);
+ if (! str)
+ return str;
+ VG_(snprintf)(str, len, "[");
for (i = 0; i < vc->size; i++)
{
tl_assert(vc->vc);
- VG_(printf)("%s %d: %d", i > 0 ? "," : "",
- vc->vc[i].threadid, vc->vc[i].count);
+ if (VG_(strlen)(str) + 32 > len)
+ {
+ len *= 2;
+ str = VG_(realloc)("drd.vc.aprint.2", str, len);
+ if (! str)
+ return str;
+ }
+ VG_(snprintf)(str + VG_(strlen)(str), len - VG_(strlen)(str),
+ "%s %d: %d", i > 0 ? "," : "",
+ vc->vc[i].threadid, vc->vc[i].count);
}
- VG_(printf)(" ]");
+ VG_(snprintf)(str + VG_(strlen)(str), len - VG_(strlen)(str), " ]");
+
+ return str;
}
/**
@@ -357,6 +388,7 @@
if (vc->capacity > VC_PREALLOCATED)
VG_(free)(vc->vc);
vc->vc = 0;
+ vc->capacity = 0;
}
tl_assert(new_capacity == 0 || vc->vc != 0);
@@ -364,49 +396,3 @@
|| vc->vc == 0
|| vc->vc == vc->preallocated);
}
-
-#if 0
-/**
- * Unit test.
- */
-void DRD_(vc_test)(void)
-{
- VectorClock vc1;
- VCElem vc1elem[] = { { 3, 7 }, { 5, 8 }, };
- VectorClock vc2;
- VCElem vc2elem[] = { { 1, 4 }, { 3, 9 }, };
- VectorClock vc3;
- VCElem vc4elem[] = { { 1, 3 }, { 2, 1 }, };
- VectorClock vc4;
- VCElem vc5elem[] = { { 1, 4 }, };
- VectorClock vc5;
-
- vc_init(&vc1, vc1elem, sizeof(vc1elem)/sizeof(vc1elem[0]));
- vc_init(&vc2, vc2elem, sizeof(vc2elem)/sizeof(vc2elem[0]));
- vc_init(&vc3, 0, 0);
- vc_init(&vc4, vc4elem, sizeof(vc4elem)/sizeof(vc4elem[0]));
- vc_init(&vc5, vc5elem, sizeof(vc5elem)/sizeof(vc5elem[0]));
-
- vc_combine(&vc3, &vc1);
- vc_combine(&vc3, &vc2);
-
- VG_(printf)("vc1: ");
- vc_print(&vc1);
- VG_(printf)("\nvc2: ");
- vc_print(&vc2);
- VG_(printf)("\nvc3: ");
- vc_print(&vc3);
- VG_(printf)("\n");
- VG_(printf)("vc_lte(vc1, vc2) = %d, vc_lte(vc1, vc3) = %d,"
- " vc_lte(vc2, vc3) = %d, vc_lte(",
- vc_lte(&vc1, &vc2), vc_lte(&vc1, &vc3), vc_lte(&vc2, &vc3));
- vc_print(&vc4);
- VG_(printf)(", ");
- vc_print(&vc5);
- VG_(printf)(") = %d sw %d\n", vc_lte(&vc4, &vc5), vc_lte(&vc5, &vc4));
-
- vc_cleanup(&vc1);
- vc_cleanup(&vc2);
- vc_cleanup(&vc3);
-}
-#endif
Modified: branches/DRDDEV/drd/drd_vc.h
===================================================================
--- branches/DRDDEV/drd/drd_vc.h 2009-06-05 16:56:40 UTC (rev 10253)
+++ branches/DRDDEV/drd/drd_vc.h 2009-06-05 18:09:48 UTC (rev 10254)
@@ -47,7 +47,9 @@
*/
-#include "pub_tool_basics.h" // Addr, SizeT
+#include "pub_tool_basics.h" /* Addr, SizeT */
+#include "drd_basics.h" /* DrdThreadId */
+#include "pub_tool_libcassert.h" /* tl_assert() */
#define VC_PREALLOCATED 8
@@ -86,6 +88,7 @@
void DRD_(vc_combine)(VectorClock* const result,
const VectorClock* const rhs);
void DRD_(vc_print)(const VectorClock* const vc);
+char* DRD_(vc_aprint)(const VectorClock* const vc);
void DRD_(vc_snprint)(Char* const str, const Int size,
const VectorClock* const vc);
void DRD_(vc_check)(const VectorClock* const vc);
Modified: branches/DRDDEV/drd/tests/Makefile.am
===================================================================
--- branches/DRDDEV/drd/tests/Makefile.am 2009-06-05 16:56:40 UTC (rev 10253)
+++ branches/DRDDEV/drd/tests/Makefile.am 2009-06-05 18:09:48 UTC (rev 10254)
@@ -41,9 +41,6 @@
circular_buffer.vgtest \
custom_alloc.stderr.exp \
custom_alloc.vgtest \
- drd_bitmap_test.stderr.exp \
- drd_bitmap_test.stdout.exp \
- drd_bitmap_test.vgtest \
fp_race.stderr.exp \
fp_race.vgtest \
fp_race2.stderr.exp \
@@ -218,10 +215,14 @@
thread_name.stderr.exp \
thread_name.vgtest \
trylock.stderr.exp \
- trylock.vgtest
+ trylock.vgtest \
+ unit_bitmap.stderr.exp \
+ unit_bitmap.vgtest \
+ unit_vc.stderr.exp \
+ unit_vc.vgtest
+
check_PROGRAMS = \
- drd_bitmap_test \
fp_race \
hold_lock \
linuxthreads_det \
@@ -243,7 +244,9 @@
sem_as_mutex \
sigalrm \
thread_name \
- trylock
+ trylock \
+ unit_bitmap \
+ unit_vc
if HAVE_BOOST_1_35
check_PROGRAMS += boost_thread
@@ -283,11 +286,6 @@
LDADD = -lpthread
-drd_bitmap_test_CFLAGS = $(AM_CFLAGS) -O2 \
- -DENABLE_DRD_CONSISTENCY_CHECKS\
- @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@
-drd_bitmap_test_LDADD = # nothing, i.e. not -lpthread
-
monitor_example_SOURCES = monitor_example.cpp
new_delete_SOURCES = new_delete.cpp
@@ -296,6 +294,14 @@
-DTHREAD_WRAPPERS='"tsan_thread_wrappers_pthread.h"' \
-Wno-sign-compare -Wno-shadow @FLAG_W_NO_EMPTY_BODY@
+unit_bitmap_CFLAGS = $(AM_CFLAGS) -O2 \
+ -DENABLE_DRD_CONSISTENCY_CHECKS \
+ @FLAG_UNLIMITED_INLINE_UNIT_GROWTH@
+unit_bitmap_LDADD = # nothing, i.e. not -lpthread
+
+unit_vc_CFLAGS = $(AM_CFLAGS) -DENABLE_DRD_CONSISTENCY_CHECKS
+unit_vc_LDADD = # nothing, i.e. not -lpthread
+
if HAVE_BOOST_1_35
boost_thread_SOURCES = boost_thread.cpp
boost_thread_CXXFLAGS = $(AM_CXXFLAGS) $(BOOST_CFLAGS)
Deleted: branches/DRDDEV/drd/tests/drd_bitmap_test.c
===================================================================
--- branches/DRDDEV/drd/tests/drd_bitmap_test.c 2009-06-05 16:56:40 UTC (rev 10253)
+++ branches/DRDDEV/drd/tests/drd_bitmap_test.c 2009-06-05 18:09:48 UTC (rev 10254)
@@ -1,341 +0,0 @@
-#include <assert.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include "coregrind/m_oset.c"
-#include "drd/drd_bitmap.c"
-#include "drd/drd_bitmap2_node.c"
-#include "drd/pub_drd_bitmap.h"
-
-
-#ifndef MIN
-#define MIN(x, y) ((x) < (y) ? (x) : (y))
-#endif
-#ifndef MAX
-#define MAX(x, y) ((x) > (y) ? (x) : (y))
-#endif
-
-
-/* Replacements for core functionality. */
-
-void* VG_(malloc)(HChar* cc, SizeT nbytes)
-{ return malloc(nbytes); }
-void VG_(free)(void* p)
-{ return free(p); }
-void VG_(assert_fail)(Bool isCore, const Char* assertion, const Char* file,
- Int line, const Char* function, const HChar* format,
- ...)
-{
- fprintf(stderr,
- "%s:%u: %s%sAssertion `%s' failed.\n",
- file,
- line,
- function ? (char*)function : "",
- function ? ": " : "",
- assertion);
- fflush(stdout);
- fflush(stderr);
- abort();
-}
-
-void* VG_(memset)(void *s, Int c, SizeT sz)
-{ return memset(s, c, sz); }
-void* VG_(memcpy)(void *d, const void *s, SizeT sz)
-{ return memcpy(d, s, sz); }
-Int VG_(memcmp)(const void* s1, const void* s2, SizeT n)
-{ return memcmp(s1, s2, n); }
-UInt VG_(printf)(const HChar *format, ...)
-{ UInt ret; va_list vargs; va_start(vargs, format); ret = vprintf(format, vargs); va_end(vargs); return ret; }
-UInt VG_(message)(VgMsgKind kind, const HChar* format, ...)
-{ UInt ret; va_list vargs; va_start(vargs, format); ret = vprintf(format, vargs); va_end(vargs); printf("\n"); return ret; }
-Bool DRD_(is_suppressed)(const Addr a1, const Addr a2)
-{ assert(0); }
-
-
-/* Actual unit test */
-
-static int s_verbose = 1;
-
-static
-struct { Addr address; SizeT size; BmAccessTypeT access_type; }
- s_test1_args[] = {
- { 0, 1, eLoad },
- { 666, 4, eLoad },
- { 667, 2, eStore },
- { 1024, 1, eStore },
- { 0xffffULL, 1, eStore },
- { 0x0001ffffULL, 1, eLoad },
- { 0x00ffffffULL, 1, eLoad },
- { 0xffffffffULL - (((1 << ADDR_LSB_BITS) + 1) << ADDR_IGNORED_BITS),
- 1, eStore },
-#if defined(VGP_amd64_linux) || defined(VGP_ppc64_linux) || defined(VGP_ppc64_aix5)
- { 0xffffffffULL - (1 << ADDR_LSB_BITS << ADDR_IGNORED_BITS),
- 1, eStore },
- { 0xffffffffULL, 1, eStore },
- { 0x100000000ULL, 1, eStore },
- { -2ULL - (1 << ADDR_LSB_BITS << ADDR_IGNORED_BITS),
- 1, eStore },
-#endif
- };
-
-/**
- * Compare two bitmaps and if different, print the differences.
- */
-int bm_equal_print_diffs(struct bitmap* bm1, struct bitmap* bm2)
-{
- int equal;
-
- equal = DRD_(bm_equal)(bm1, bm2);
- if (s_verbose && ! equal)
- {
- unsigned i;
-
- VG_(printf)("Bitmaps are different.\n");
- for (i = 0; i < 0x10000; i++)
- {
- if (DRD_(bm_has_1)(bm1, i, eLoad) != DRD_(bm_has_1)(bm2, i, eLoad)
- || DRD_(bm_has_1)(bm1, i, eStore) != DRD_(bm_has_1)(bm2, i, eStore))
- {
- printf("0x%x %c %c %c %c\n",
- i,
- DRD_(bm_has_1)(bm1, i, eLoad) ? 'R' : ' ',
- DRD_(bm_has_1)(bm1, i, eStore) ? 'W' : ' ',
- DRD_(bm_has_1)(bm2, i, eLoad) ? 'R' : ' ',
- DRD_(bm_has_1)(bm2, i, eStore) ? 'W' : ' '
- );
- }
- }
- fflush(stdout);
- }
-
- return equal;
-}
-
-void bm_test1(void)
-{
- struct bitmap* bm;
- struct bitmap* bm2;
- unsigned i, j;
-
- bm = DRD_(bm_new)();
-
- for (i = 0; i < sizeof(s_test1_args)/sizeof(s_test1_args[0]); i++)
- {
- DRD_(bm_access_range)(bm,
- s_test1_args[i].address,
- s_test1_args[i].address + s_test1_args[i].size,
- s_test1_args[i].access_type);
- }
-
- for (i = 0; i < sizeof(s_test1_args)/sizeof(s_test1_args[0]); i++)
- {
- for (j = 0;
- first_address_with_higher_lsb(j) <= s_test1_args[i].size;
- j = first_address_with_higher_lsb(j))
- {
- tl_assert(DRD_(bm_has_1)(bm,
- s_test1_args[i].address + j,
- s_test1_args[i].access_type));
- }
- }
-
- bm2 = DRD_(bm_new)();
- DRD_(bm_merge2)(bm2, bm);
- DRD_(bm_merge2)(bm2, bm);
- assert(bm_equal_print_diffs(bm2, bm));
-
- if (s_verbose)
- VG_(printf)("Deleting bitmap bm\n");
- DRD_(bm_delete)(bm);
- if (s_verbose)
- VG_(printf)("Deleting bitmap bm2\n");
- DRD_(bm_delete)(bm2);
-}
-
-/** Test whether bm_equal() works correctly. */
-void bm_test2()
-{
- struct bitmap* bm1;
- struct bitmap* bm2;
-
- bm1 = DRD_(bm_new)();
- bm2 = DRD_(bm_new)();
- DRD_(bm_access_load_1)(bm1, 7);
- DRD_(bm_access_load_1)(bm2, make_address(1, 0) + 7);
- assert(! DRD_(bm_equal)(bm1, bm2));
- assert(! DRD_(bm_equal)(bm2, bm1));
- DRD_(bm_access_load_1)(bm2, 7);
- assert(! DRD_(bm_equal)(bm1, bm2));
- assert(! DRD_(bm_equal)(bm2, bm1));
- DRD_(bm_access_store_1)(bm1, make_address(1, 0) + 7);
- assert(! DRD_(bm_equal)(bm1, bm2));
- assert(! DRD_(bm_equal)(bm2, bm1));
- DRD_(bm_delete)(bm2);
- DRD_(bm_delete)(bm1);
-}
-
-/** Torture test of the functions that set or clear a range of bits. */
-void bm_test3(const int outer_loop_step, const int inner_loop_step)
-{
- unsigned i, j;
- struct bitmap* bm1;
- struct bitmap* bm2;
-
- const Addr lb = make_address(2, 0) - 2 * BITS_PER_UWORD;
- const Addr ub = make_address(2, 0) + 2 * BITS_PER_UWORD;
-
- assert(outer_loop_step >= 1);
- assert((outer_loop_step % ADDR_GRANULARITY) == 0);
- assert(inner_loop_step >= 1);
- assert((inner_loop_step % ADDR_GRANULARITY) == 0);
-
- bm1 = DRD_(bm_new)();
- bm2 = DRD_(bm_new)();
- for (i = lb; i < ub; i += outer_loop_step)
- {
- for (j = i + ADDR_GRANULARITY; j < ub; j += inner_loop_step)
- {
- DRD_(bm_access_range_load)(bm1, i, j);
- DRD_(bm_clear_load)(bm1, i, j);
- assert(bm_equal_print_diffs(bm1, bm2));
- DRD_(bm_access_load_1)(bm1, i);
- DRD_(bm_clear_load)(bm1, i, i + MAX(1, ADDR_GRANULARITY));
- assert(bm_equal_print_diffs(bm1, bm2));
- DRD_(bm_access_load_2)(bm1, i);
- DRD_(bm_clear_load)(bm1, i, i + MAX(2, ADDR_GRANULARITY));
- assert(bm_equal_print_diffs(bm1, bm2));
- DRD_(bm_access_load_4)(bm1, i);
- DRD_(bm_clear_load)(bm1, i, i + MAX(4, ADDR_GRANULARITY));
- assert(bm_equal_print_diffs(bm1, bm2));
- DRD_(bm_access_load_8)(bm1, i);
- DRD_(bm_clear_load)(bm1, i, i + MAX(8, ADDR_GRANULARITY));
- assert(bm_equal_print_diffs(bm1, bm2));
-
- DRD_(bm_access_range_store)(bm1, i, j);
- DRD_(bm_clear_store)(bm1, i, j);
- assert(bm_equal_print_diffs(bm1, bm2));
- DRD_(bm_access_store_1)(bm1, i);
- DRD_(bm_clear_store)(bm1, i, i + MAX(1, ADDR_GRANULARITY));
- assert(bm_equal_print_diffs(bm1, bm2));
- DRD_(bm_access_store_2)(bm1, i);
- DRD_(bm_clear_store)(bm1, i, i + MAX(2, ADDR_GRANULARITY));
- assert(bm_equal_print_diffs(bm1, bm2));
- DRD_(bm_access_store_4)(bm1, i);
- DRD_(bm_clear_store)(bm1, i, i + MAX(4, ADDR_GRANULARITY));
- assert(bm_equal_print_diffs(bm1, bm2));
- DRD_(bm_access_store_8)(bm1, i);
- DRD_(bm_clear_store)(bm1, i, i + MAX(8, ADDR_GRANULARITY));
- assert(bm_equal_print_diffs(bm1, bm2));
-
- DRD_(bm_access_range_load)(bm1, i, j);
- DRD_(bm_access_range_store)(bm1, i, j);
- DRD_(bm_clear)(bm1, i, j);
- assert(bm_equal_print_diffs(bm1, bm2));
- DRD_(bm_access_load_1)(bm1, i);
- DRD_(bm_access_store_1)(bm1, i);
- DRD_(bm_clear)(bm1, i, i + MAX(1, ADDR_GRANULARITY));
- assert(bm_equal_print_diffs(bm1, bm2));
- DRD_(bm_access_load_2)(bm1, i);
- DRD_(bm_access_store_2)(bm1, i);
- DRD_(bm_clear)(bm1, i, i + MAX(2, ADDR_GRANULARITY));
- assert(bm_equal_print_diffs(bm1, bm2));
- DRD_(bm_access_load_4)(bm1, i);
- DRD_(bm_access_store_4)(bm1, i);
- DRD_(bm_clear)(bm1, i, i + MAX(4, ADDR_GRANULARITY));
- assert(bm_equal_print_diffs(bm1, bm2));
- DRD_(bm_access_load_8)(bm1, i);
- DRD_(bm_access_store_8)(bm1, i);
- DRD_(bm_clear)(bm1, i, i + MAX(8, ADDR_GRANULARITY));
- assert(bm_equal_print_diffs(bm1, bm2));
- }
- }
- DRD_(bm_access_range_load)(bm1, 0, make_address(2, 0) + 2 * BITS_PER_UWORD);
- DRD_(bm_access_range_store)(bm1, 0, make_address(2, 0) + 2 * BITS_PER_UWORD);
- DRD_(bm_access_range_load)(bm2, 0, make_address(2, 0) + 2 * BITS_PER_UWORD);
- DRD_(bm_access_range_store)(bm2, 0, make_address(2, 0) + 2 * BITS_PER_UWORD);
- for (i = make_address(1, 0) - 2 * BITS_PER_UWORD;
- i < make_address(1, 0) + 2 * BITS_PER_UWORD;
- i += outer_loop_step)
- {
- for (j = i + 1; j < ub; j += inner_loop_step)
- {
- DRD_(bm_clear_load)(bm1, i, j);
- DRD_(bm_access_range_load)(bm1, i, j);
- assert(bm_equal_print_diffs(bm1, bm2));
- DRD_(bm_clear_load)(bm1, i, i+1);
- DRD_(bm_access_load_1)(bm1, i);
- assert(bm_equal_print_diffs(bm1, bm2));
- DRD_(bm_clear_load)(bm1, i, i+2);
- DRD_(bm_access_load_2)(bm1, i);
- assert(bm_equal_print_diffs(bm1, bm2));
- DRD_(bm_clear_load)(bm1, i, i+4);
- DRD_(bm_access_load_4)(bm1, i);
- assert(bm_equal_print_diffs(bm1, bm2));
- DRD_(bm_clear_load)(bm1, i, i+8);
- DRD_(bm_access_load_8)(bm1, i);
- assert(bm_equal_print_diffs(bm1, bm2));
-
- DRD_(bm_clear_store)(bm1, i, j);
- DRD_(bm_access_range_store)(bm1, i, j);
- assert(bm_equal_print_diffs(bm1, bm2));
- DRD_(bm_clear_store)(bm1, i, i+1);
- DRD_(bm_access_store_1)(bm1, i);
- assert(bm_equal_print_diffs(bm1, bm2));
- DRD_(bm_clear_store)(bm1, i, i+2);
- DRD_(bm_access_store_2)(bm1, i);
- assert(bm_equal_print_diffs(bm1, bm2));
- DRD_(bm_clear_store)(bm1, i, i+4);
- DRD_(bm_access_store_4)(bm1, i);
- assert(bm_equal_print_diffs(bm1, bm2));
- DRD_(bm_clear_store)(bm1, i, i+8);
- DRD_(bm_access_store_8)(bm1, i);
- assert(bm_equal_print_diffs(bm1, bm2));
-
- DRD_(bm_clear)(bm1, i, j);
- DRD_(bm_access_range_load)(bm1, i, j);
- DRD_(bm_access_range_store)(bm1, i, j);
- assert(bm_equal_print_diffs(bm1, bm2));
- }
- }
- DRD_(bm_delete)(bm2);
- DRD_(bm_delete)(bm1);
-}
-
-int main(int argc, char** argv)
-{
- int outer_loop_step = ADDR_GRANULARITY;
- int inner_loop_step = ADDR_GRANULARITY;
- int optchar;
-
- while ((optchar = getopt(argc, argv, "s:t:q")) != EOF)
- {
- switch (optchar)
- {
- case 's':
- outer_loop_step = atoi(optarg);
- break;
- case 't':
- inner_loop_step = atoi(optarg);
- break;
- case 'q':
- s_verbose = 0;
- break;
- default:
- fprintf(stderr,
- "Usage: %s [-s<outer_loop_step>] [-t<inner_loop_step>] [-q].\n",
- argv[0]);
- break;
- }
- }
-
- VG_(printf)("Start of DRD BM unit test.\n");
-
- bm_test1();
- bm_test2();
- bm_test3(outer_loop_step, inner_loop_step);
-
- VG_(printf)("End of DRD BM unit test.\n");
-
- return 0;
-}
Deleted: branches/DRDDEV/drd/tests/drd_bitmap_test.stderr.exp
===================================================================
Deleted: branches/DRDDEV/drd/tests/drd_bitmap_test.stdout.exp
===================================================================
--- branches/DRDDEV/drd/tests/drd_bitmap_test.stdout.exp 2009-06-05 16:56:40 UTC (rev 10253)
+++ branches/DRDDEV/drd/tests/drd_bitmap_test.stdout.exp 2009-06-05 18:09:48 UTC (rev 10254)
@@ -1,2 +0,0 @@
-Start of DRD BM unit test.
-End of DRD BM unit test.
Deleted: branches/DRDDEV/drd/tests/drd_bitmap_test.vgtest
===================================================================
--- branches/DRDDEV/drd/tests/drd_bitmap_test.vgtest 2009-06-05 16:56:40 UTC (rev 10253)
+++ branches/DRDDEV/drd/tests/drd_bitmap_test.vgtest 2009-06-05 18:09:48 UTC (rev 10254)
@@ -1,3 +0,0 @@
-prog: drd_bitmap_test
-args: -s 93 -t 97 -q
-vgopts: -q --tool=memcheck
Copied: branches/DRDDEV/drd/tests/unit_bitmap.c (from rev 10245, branches/DRDDEV/drd/tests/drd_bitmap_test.c)
===================================================================
--- branches/DRDDEV/drd/tests/unit_bitmap.c (rev 0)
+++ branches/DRDDEV/drd/tests/unit_bitmap.c 2009-06-05 18:09:48 UTC (rev 10254)
@@ -0,0 +1,344 @@
+/** @brief Unit-test for DRD's bitmap implementation. */
+
+
+#include <assert.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include "coregrind/m_oset.c"
+#include "drd/drd_bitmap.c"
+#include "drd/drd_bitmap2_node.c"
+#include "drd/pub_drd_bitmap.h"
+
+
+#ifndef MIN
+#define MIN(x, y) ((x) < (y) ? (x) : (y))
+#endif
+#ifndef MAX
+#define MAX(x, y) ((x) > (y) ? (x) : (y))
+#endif
+
+
+/* Replacements for Valgrind core functionality. */
+
+void* VG_(malloc)(HChar* cc, SizeT nbytes)
+{ return malloc(nbytes); }
+void VG_(free)(void* p)
+{ return free(p); }
+void VG_(assert_fail)(Bool isCore, const Char* assertion, const Char* file,
+ Int line, const Char* function, const HChar* format,
+ ...)
+{
+ fprintf(stderr,
+ "%s:%u: %s%sAssertion `%s' failed.\n",
+ file,
+ line,
+ function ? (char*)function : "",
+ function ? ": " : "",
+ assertion);
+ fflush(stdout);
+ fflush(stderr);
+ abort();
+}
+
+void* VG_(memset)(void *s, Int c, SizeT sz)
+{ return memset(s, c, sz); }
+void* VG_(memcpy)(void *d, const void *s, SizeT sz)
+{ return memcpy(d, s, sz); }
+Int VG_(memcmp)(const void* s1, const void* s2, SizeT n)
+{ return memcmp(s1, s2, n); }
+UInt VG_(printf)(const HChar *format, ...)
+{ UInt ret; va_list vargs; va_start(vargs, format); ret = vprintf(format, vargs); va_end(vargs); return ret; }
+UInt VG_(message)(VgMsgKind kind, const HChar* format, ...)
+{ UInt ret; va_list vargs; va_start(vargs, format); ret = vprintf(format, vargs); va_end(vargs); printf("\n"); return ret; }
+Bool DRD_(is_suppressed)(const Addr a1, const Addr a2)
+{ assert(0); }
+
+
+/* Actual unit test */
+
+static int s_verbose = 1;
+
+static
+struct { Addr address; SizeT size; BmAccessTypeT access_type; }
+ s_test1_args[] = {
+ { 0, 1, eLoad },
+ { 666, 4, eLoad },
+ { 667, 2, eStore },
+ { 1024, 1, eStore },
+ { 0xffffULL, 1, eStore },
+ { 0x0001ffffULL, 1, eLoad },
+ { 0x00ffffffULL, 1, eLoad },
+ { 0xffffffffULL - (((1 << ADDR_LSB_BITS) + 1) << ADDR_IGNORED_BITS),
+ 1, eStore },
+#if defined(VGP_amd64_linux) || defined(VGP_ppc64_linux) || defined(VGP_ppc64_aix5)
+ { 0xffffffffULL - (1 << ADDR_LSB_BITS << ADDR_IGNORED_BITS),
+ 1, eStore },
+ { 0xffffffffULL, 1, eStore },
+ { 0x100000000ULL, 1, eStore },
+ { -2ULL - (1 << ADDR_LSB_BITS << ADDR_IGNORED_BITS),
+ 1, eStore },
+#endif
+ };
+
+/**
+ * Compare two bitmaps and if different, print the differences.
+ */
+int bm_equal_print_diffs(struct bitmap* bm1, struct bitmap* bm2)
+{
+ int equal;
+
+ equal = DRD_(bm_equal)(bm1, bm2);
+ if (s_verbose && ! equal)
+ {
+ unsigned i;
+
+ VG_(printf)("Bitmaps are different.\n");
+ for (i = 0; i < 0x10000; i++)
+ {
+ if (DRD_(bm_has_1)(bm1, i, eLoad) != DRD_(bm_has_1)(bm2, i, eLoad)
+ || DRD_(bm_has_1)(bm1, i, eStore) != DRD_(bm_has_1)(bm2, i, eStore))
+ {
+ printf("0x%x %c %c %c %c\n",
+ i,
+ DRD_(bm_has_1)(bm1, i, eLoad) ? 'R' : ' ',
+ DRD_(bm_has_1)(bm1, i, eStore) ? 'W' : ' ',
+ DRD_(bm_has_1)(bm2, i, eLoad) ? 'R' : ' ',
+ DRD_(bm_has_1)(bm2, i, eStore) ? 'W' : ' '
+ );
+ }
+ }
+ fflush(stdout);
+ }
+
+ return equal;
+}
+
+void bm_test1(void)
+{
+ struct bitmap* bm;
+ struct bitmap* bm2;
+ unsigned i, j;
+
+ bm = DRD_(bm_new)();
+
+ for (i = 0; i < sizeof(s_test1_args)/sizeof(s_test1_args[0]); i++)
+ {
+ DRD_(bm_access_range)(bm,
+ s_test1_args[i].address,
+ s_test1_args[i].address + s_test1_args[i].size,
+ s_test1_args[i].access_type);
+ }
+
+ for (i = 0; i < sizeof(s_test1_args)/sizeof(s_test1_args[0]); i++)
+ {
+ for (j = 0;
+ first_address_with_higher_lsb(j) <= s_test1_args[i].size;
+ j = first_address_with_higher_lsb(j))
+ {
+ tl_assert(DRD_(bm_has_1)(bm,
+ s_test1_args[i].address + j,
+ s_test1_args[i].access_type));
+ }
+ }
+
+ bm2 = DRD_(bm_new)();
+ DRD_(bm_merge2)(bm2, bm);
+ DRD_(bm_merge2)(bm2, bm);
+ assert(bm_equal_print_diffs(bm2, bm));
+
+ if (s_verbose)
+ VG_(printf)("Deleting bitmap bm\n");
+ DRD_(bm_delete)(bm);
+ if (s_verbose)
+ VG_(printf)("Deleting bitmap bm2\n");
+ DRD_(bm_delete)(bm2);
+}
+
+/** Test whether bm_equal() works correctly. */
+void bm_test2()
+{
+ struct bitmap* bm1;
+ struct bitmap* bm2;
+
+ bm1 = DRD_(bm_new)();
+ bm2 = DRD_(bm_new)();
+ DRD_(bm_access_load_1)(bm1, 7);
+ DRD_(bm_access_load_1)(bm2, make_address(1, 0) + 7);
+ assert(! DRD_(bm_equal)(bm1, bm2));
+ assert(! DRD_(bm_equal)(bm2, bm1));
+ DRD_(bm_access_load_1)(bm2, 7);
+ assert(! DRD_(bm_equal)(bm1, bm2));
+ assert(! DRD_(bm_equal)(bm2, bm1));
+ DRD_(bm_access_store_1)(bm1, make_address(1, 0) + 7);
+ assert(! DRD_(bm_equal)(bm1, bm2));
+ assert(! DRD_(bm_equal)(bm2, bm1));
+ DRD_(bm_delete)(bm2);
+ DRD_(bm_delete)(bm1);
+}
+
+/** Torture test of the functions that set or clear a range of bits. */
+void bm_test3(const int outer_loop_step, const int inner_loop_step)
+{
+ unsigned i, j;
+ struct bitmap* bm1;
+ struct bitmap* bm2;
+
+ const Addr lb = make_address(2, 0) - 2 * BITS_PER_UWORD;
+ const Addr ub = make_address(2, 0) + 2 * BITS_PER_UWORD;
+
+ assert(outer_loop_step >= 1);
+ assert((outer_loop_step % ADDR_GRANULARITY) == 0);
+ assert(inner_loop_step >= 1);
+ assert((inner_loop_step % ADDR_GRANULARITY) == 0);
+
+ bm1 = DRD_(bm_new)();
+ bm2 = DRD_(bm_new)();
+ for (i = lb; i < ub; i += outer_loop_step)
+ {
+ for (j = i + ADDR_GRANULARITY; j < ub; j += inner_loop_step)
+ {
+ DRD_(bm_access_range_load)(bm1, i, j);
+ DRD_(bm_clear_load)(bm1, i, j);
+ assert(bm_equal_print_diffs(bm1, bm2));
+ DRD_(bm_access_load_1)(bm1, i);
+ DRD_(bm_clear_load)(bm1, i, i + MAX(1, ADDR_GRANULARITY));
+ assert(bm_equal_print_diffs(bm1, bm2));
+ DRD_(bm_access_load_2)(bm1, i);
+ DRD_(bm_clear_load)(bm1, i, i + MAX(2, ADDR_GRANULARITY));
+ assert(bm_equal_print_diffs(bm1, bm2));
+ DRD_(bm_access_load_4)(bm1, i);
+ DRD_(bm_clear_load)(bm1, i, i + MAX(4, ADDR_GRANULARITY));
+ assert(bm_equal_print_diffs(bm1, bm2));
+ DRD_(bm_access_load_8)(bm1, i);
+ DRD_(bm_clear_load)(bm1, i, i + MAX(8, ADDR_GRANULARITY));
+ assert(bm_equal_print_diffs(bm1, bm2));
+
+ DRD_(bm_access_range_store)(bm1, i, j);
+ DRD_(bm_clear_store)(bm1, i, j);
+ assert(bm_equal_print_diffs(bm1, bm2));
+ DRD_(bm_access_store_1)(bm1, i);
+ DRD_(bm_clear_store)(bm1, i, i + MAX(1, ADDR_GRANULARITY));
+ assert(bm_equal_print_diffs(bm1, bm2));
+ DRD_(bm_access_store_2)(bm1, i);
+ DRD_(bm_clear_store)(bm1, i, i + MAX(2, ADDR_GRANULARITY));
+ assert(bm_equal_print_diffs(bm1, bm2));
+ DRD_(bm_access_store_4)(bm1, i);
+ DRD_(bm_clear_store)(bm1, i, i + MAX(4, ADDR_GRANULARITY));
+ assert(bm_equal_print_diffs(bm1, bm2));
+ DRD_(bm_access_store_8)(bm1, i);
+ DRD_(bm_clear_store)(bm1, i, i + MAX(8, ADDR_GRANULARITY));
+ assert(bm_equal_print_diffs(bm1, bm2));
+
+ DRD_(bm_access_range_load)(bm1, i, j);
+ DRD_(bm_access_range_store)(bm1, i, j);
+ DRD_(bm_clear)(bm1, i, j);
+ assert(bm_equal_print_diffs(bm1, bm2));
+ DRD_(bm_access_load_1)(bm1, i);
+ DRD_(bm_access_store_1)(bm1, i);
+ DRD_(bm_clear)(bm1, i, i + MAX(1, ADDR_GRANULARITY));
+ assert(bm_equal_print_diffs(bm1, bm2));
+ DRD_(bm_access_load_2)(bm1, i);
+ DRD_(bm_access_store_2)(bm1, i);
+ DRD_(bm_clear)(bm1, i, i + MAX(2, ADDR_GRANULARITY));
+ assert(bm_equal_print_diffs(bm1, bm2));
+ DRD_(bm_access_load_4)(bm1, i);
+ DRD_(bm_access_store_4)(bm1, i);
+ DRD_(bm_clear)(bm1, i, i + MAX(4, ADDR_GRANULARITY));
+ assert(bm_equal_print_diffs(bm1, bm2));
+ DRD_(bm_access_load_8)(bm1, i);
+ DRD_(bm_access_store_8)(bm1, i);
+ DRD_(bm_clear)(bm1, i, i + MAX(8, ADDR_GRANULARITY));
+ assert(bm_equal_print_diffs(bm1, bm2));
+ }
+ }
+ DRD_(bm_access_range_load)(bm1, 0, make_address(2, 0) + 2 * BITS_PER_UWORD);
+ DRD_(bm_access_range_store)(bm1, 0, make_address(2, 0) + 2 * BITS_PER_UWORD);
+ DRD_(bm_access_range_load)(bm2, 0, make_address(2, 0) + 2 * BITS_PER_UWORD);
+ DRD_(bm_access_range_store)(bm2, 0, make_address(2, 0) + 2 * BITS_PER_UWORD);
+ for (i = make_address(1, 0) - 2 * BITS_PER_UWORD;
+ i < make_address(1, 0) + 2 * BITS_PER_UWORD;
+ i += outer_loop_step)
+ {
+ for (j = i + 1; j < ub; j += inner_loop_step)
+ {
+ DRD_(bm_clear_load)(bm1, i, j);
+ DRD_(bm_access_range_load)(bm1, i, j);
+ assert(bm_equal_print_diffs(bm1, bm2));
+ DRD_(bm_clear_load)(bm1, i, i+1);
+ DRD_(bm_access_load_1)(bm1, i);
+ assert(bm_equal_print_diffs(bm1, bm2));
+ DRD_(bm_clear_load)(bm1, i, i+2);
+ DRD_(bm_access_load_2)(bm1, i);
+ assert(bm_equal_print_diffs(bm1, bm2));
+ DRD_(bm_clear_load)(bm1, i, i+4);
+ DRD_(bm_access_load_4)(bm1, i);
+ assert(bm_equal_print_diffs(bm1, bm2));
+ DRD_(bm_clear_load)(bm1, i, i+8);
+ DRD_(bm_access_load_8)(bm1, i);
+ assert(bm_equal_print_diffs(bm1, bm2));
+
+ DRD_(bm_clear_store)(bm1, i, j);
+ DRD_(bm_access_range_store)(bm1, i, j);
+ assert(bm_equal_print_diffs(bm1, bm2));
+ DRD_(bm_clear_store)(bm1, i, i+1);
+ DRD_(bm_access_store_1)(bm1, i);
+ assert(bm_equal_print_diffs(bm1, bm2));
+ DRD_(bm_clear_store)(bm1, i, i+2);
+ DRD_(bm_access_store_2)(bm1, i);
+ assert(bm_equal_print_diffs(bm1, bm2));
+ DRD_(bm_clear_store)(bm1, i, i+4);
+ DRD_(bm_access_store_4)(bm1, i);
+ assert(bm_equal_print_diffs(bm1, bm2));
+ DRD_(bm_clear_store)(bm1, i, i+8);
+ DRD_(bm_access_store_8)(bm1, i);
+ assert(bm_equal_print_diffs(bm1, bm2));
+
+ DRD_(bm_clear)(bm1, i, j);
+ DRD_(bm_access_range_load)(bm1, i, j);
+ DRD_(bm_access_range_store)(bm1, i, j);
+ assert(bm_equal_print_diffs(bm1, bm2));
+ }
+ }
+ DRD_(bm_delete)(bm2);
+ DRD_(bm_delete)(bm1);
+}
+
+int main(int argc, char** argv)
+{
+ int outer_loop_step = ADDR_GRANULARITY;
+ int inner_loop_step = ADDR_GRANULARITY;
+ int optchar;
+
+ while ((optchar = getopt(argc, argv, "s:t:q")) != EOF)
+ {
+ switch (optchar)
+ {
+ case 's':
+ outer_loop_step = atoi(optarg);
+ break;
+ case 't':
+ inner_loop_step = atoi(optarg);
+ break;
+ case 'q':
+ s_verbose = 0;
+ break;
+ default:
+ fprintf(stderr,
+ "Usage: %s [-s<outer_loop_step>] [-t<inner_loop_step>] [-q].\n",
+ argv[0]);
+ break;
+ }
+ }
+
+ fprintf(stderr, "Start of DRD BM unit test.\n");
+
+ bm_test1();
+ bm_test2();
+ bm_test3(outer_loop_step, inner_loop_step);
+
+ fprintf(stderr, "End of DRD BM unit test.\n");
+
+ return 0;
+}
Property changes on: branches/DRDDEV/drd/tests/unit_bitmap.c
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: branches/DRDDEV/drd/tests/unit_bitmap.stderr.exp (from rev 10245, branches/DRDDEV/drd/tests/drd_bitmap_test.stderr.exp)
===================================================================
--- branches/DRDDEV/drd/tests/unit_bitmap.stderr.exp (rev 0)
+++ branches/DRDDEV/drd/tests/unit_bitmap.stderr.exp 2009-06-05 18:09:48 UTC (rev 10254)
@@ -0,0 +1,2 @@
+Start of DRD BM unit test.
+End of DRD BM unit test.
Property changes on: branches/DRDDEV/drd/tests/unit_bitmap.stderr.exp
___________________________________________________________________
Name: svn:mergeinfo
+
Copied: branches/DRDDEV/drd/tests/unit_bitmap.vgtest (from rev 10245, branches/DRDDEV/drd/tests/drd_bitmap_test.vgtest)
===================================================================
--- branches/DRDDEV/drd/tests/unit_bitmap.vgtest (rev 0)
+++ branches/DRDDEV/drd/tests/unit_bitmap.vgtest 2009-06-05 18:09:48 UTC (rev 10254)
@@ -0,0 +1,3 @@
+prog: unit_bitmap
+args: -s 93 -t 97 -q
+vgopts: -q --tool=memcheck --leak-check=full --show-reachable=yes
Property changes on: branches/DRDDEV/drd/tests/unit_bitmap.vgtest
___________________________________________________________________
Name: svn:mergeinfo
+
Added: branches/DRDDEV/drd/tests/unit_vc.c
===================================================================
--- branches/DRDDEV/drd/tests/unit_vc.c (rev 0)
+++ branches/DRDDEV/drd/tests/unit_vc.c 2009-06-05 18:09:48 UTC (rev 10254)
@@ -0,0 +1,110 @@
+/** @brief Unit-test for DRD's vector clock implementation. */
+
+
+#include <assert.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include "drd/drd_vc.c"
+
+
+/* Replacements for Valgrind core functionality. */
+
+void* VG_(malloc)(HChar* cc, SizeT nbytes)
+{ return malloc(nbytes); }
+void* VG_(realloc)(HChar* cc, void* p, SizeT size)
+{ return realloc(p, size); }
+void VG_(free)(void* p)
+{ return free(p); }
+void VG_(assert_fail)(Bool isCore, const Char* assertion, const Char* file,
+ Int line, const Char* function, const HChar* format,
+ ...)
+{
+ fprintf(stderr,
+ "%s:%u: %s%sAssertion `%s' failed.\n",
+ file,
+ line,
+ function ? (char*)function : "",
+ function ? ": " : "",
+ assertion);
+ fflush(stdout);
+ fflush(stderr);
+ abort();
+}
+
+void* VG_(memset)(void *s, Int c, SizeT sz)
+{ return memset(s, c, sz); }
+void* VG_(memcpy)(void *d, const void *s, SizeT sz)
+{ return memcpy(d, s, sz); }
+Int VG_(memcmp)(const void* s1, const void* s2, SizeT n)
+{ return memcmp(s1, s2, n); }
+UInt VG_(printf)(const HChar *format, ...)
+{ UInt ret; va_list vargs; va_start(vargs, format); ret = vprintf(format, vargs); va_end(vargs); return ret; }
+UInt VG_(snprintf)(Char* buf, Int size, const HChar *format, ...)
+{ UInt ret; va_list vargs; va_start(vargs, format); ret = vsnprintf(buf, size, format, vargs); va_end(vargs); return ret; }
+SizeT VG_(strlen)(const Char* str) { return strlen(str); }
+UInt VG_(message)(VgMsgKind kind, const HChar* format, ...)
+{ UInt ret; va_list vargs; va_start(vargs, format); ret = vprintf(format, vargs); va_end(vargs); printf("\n"); return ret; }
+Bool DRD_(is_suppressed)(const Addr a1, const Addr a2)
+{ assert(0); }
+
+
+/* Actual unit test */
+
+static void vc_unittest(void)
+{
+ int i;
+ char *str;
+ VectorClock vc1;
+ VCElem vc1elem[] = { { 3, 7 }, { 5, 8 }, };
+ VectorClock vc2;
+ VCElem vc2elem[] = { { 1, 4 }, { 3, 9 }, };
+ VectorClock vc3;
+ VCElem vc4elem[] = { { 1, 3 }, { 2, 1 }, };
+ VectorClock vc4;
+ VCElem vc5elem[] = { { 1, 4 }, };
+ VectorClock vc5;
+
+ DRD_(vc_init)(&vc1, vc1elem, sizeof(vc1elem)/sizeof(vc1elem[0]));
+ DRD_(vc_init)(&vc2, vc2elem, sizeof(vc2elem)/sizeof(vc2elem[0]));
+ DRD_(vc_init)(&vc3, 0, 0);
+ DRD_(vc_init)(&vc4, vc4elem, sizeof(vc4elem)/sizeof(vc4elem[0]));
+ DRD_(vc_init)(&vc5, vc5elem, sizeof(vc5elem)/sizeof(vc5elem[0]));
+
+ DRD_(vc_combine)(&vc3, &vc1);
+ DRD_(vc_combine)(&vc3, &vc2);
+
+ fprintf(stderr, "vc1: %s", (str = DRD_(vc_aprint)(&vc1)));
+ free(str);
+ fprintf(stderr, "\nvc2: %s", (str = DRD_(vc_aprint)(&vc2)));
+ free(str);
+ fprintf(stderr, "\nvc3: %s", (str = DRD_(vc_aprint)(&vc3)));
+ free(str);
+ fprintf(stderr, "\n");
+ fprintf(stderr, "vc_lte(vc1, vc2) = %d, vc_lte(vc1, vc3) = %d,"
+ " vc_lte(vc2, vc3) = %d\nvc_lte(",
+ DRD_(vc_lte)(&vc1, &vc2), DRD_(vc_lte)(&vc1, &vc3),
+ DRD_(vc_lte)(&vc2, &vc3));
+ fprintf(stderr, "%s", (str = DRD_(vc_aprint)(&vc4)));
+ free(str);
+ fprintf(stderr, ", ");
+ fprintf(stderr, "%s", (str = DRD_(vc_aprint)(&vc5)));
+ free(str);
+ fprintf(stderr, ") = %d sw %d\n",
+ DRD_(vc_lte)(&vc4, &vc5), DRD_(vc_lte)(&vc5, &vc4));
+
+ for (i = 0; i < 64; i++)
+ DRD_(vc_reserve)(&vc1, i);
+ for (i = 64; i > 0; i--)
+ DRD_(vc_reserve)(&vc1, i);
+
+ DRD_(vc_cleanup)(&vc1);
+ DRD_(vc_cleanup)(&vc2);
+ DRD_(vc_cleanup)(&vc3);
+}
+
+int main(int argc, char** argv)
+{
+ vc_unittest();
+ return 0;
+}
|
|
From: <sv...@va...> - 2009-06-05 16:56:45
|
Author: bart
Date: 2009-06-05 17:56:40 +0100 (Fri, 05 Jun 2009)
New Revision: 10253
Log:
Added command-line option -v.
Modified:
branches/DRDDEV/drd/tests/omp_prime.c
Modified: branches/DRDDEV/drd/tests/omp_prime.c
===================================================================
--- branches/DRDDEV/drd/tests/omp_prime.c 2009-06-05 16:55:45 UTC (rev 10252)
+++ branches/DRDDEV/drd/tests/omp_prime.c 2009-06-05 16:56:40 UTC (rev 10253)
@@ -10,6 +10,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h> // getopt()
+#include "../../drd/drd.h"
static int is_prime(int* const pflag, int v)
@@ -35,6 +36,7 @@
{
int i;
int total = 0;
+ int trace_total = 0;
int silent = 0;
int n;
int num_threads = 2;
@@ -42,12 +44,19 @@
int* primes;
int* pflag;
- while ((optchar = getopt(argc, argv, "qt:")) != EOF)
+ while ((optchar = getopt(argc, argv, "qt:v")) != EOF)
{
switch (optchar)
{
- case 'q': silent = 1; break;
- case 't': num_threads = atoi(optarg); break;
+ case 'q':
+ silent = 1;
+ break;
+ case 't':
+ num_threads = atoi(optarg);
+ break;
+ case 'v':
+ trace_total = 1;
+ break;
default:
fprintf(stderr, "Error: unknown option '%c'.\n", optchar);
return 1;
@@ -76,6 +85,9 @@
pflag[i] = 1;
}
+ if (trace_total)
+ DRD_TRACE_VAR(total);
+
#pragma omp parallel for
for (i = 2; i < n; i++)
{
|
|
From: <sv...@va...> - 2009-06-05 16:55:55
|
Author: bart
Date: 2009-06-05 17:55:45 +0100 (Fri, 05 Jun 2009)
New Revision: 10252
Log:
Removed DRD_(vc_combine2)() because it is no longer used.
Modified:
branches/DRDDEV/drd/drd_vc.c
branches/DRDDEV/drd/drd_vc.h
Modified: branches/DRDDEV/drd/drd_vc.c
===================================================================
--- branches/DRDDEV/drd/drd_vc.c 2009-06-05 13:17:31 UTC (rev 10251)
+++ branches/DRDDEV/drd/drd_vc.c 2009-06-05 16:55:45 UTC (rev 10252)
@@ -163,24 +163,10 @@
*/
void DRD_(vc_combine)(VectorClock* const result, const VectorClock* const rhs)
{
- DRD_(vc_combine2)(result, rhs, -1);
-}
-
-/**
- * Compute elementwise maximum.
- *
- * @return True if *result and *rhs are equal, or if *result and *rhs only
- * differ in the component with thread ID tid.
- */
-Bool DRD_(vc_combine2)(VectorClock* const result,
- const VectorClock* const rhs,
- const DrdThreadId tid)
-{
unsigned i;
unsigned j;
unsigned shared;
unsigned new_size;
- Bool almost_equal = True;
tl_assert(result);
tl_assert(rhs);
@@ -214,10 +200,6 @@
/* is no corresponding clock in rhs->vc[]. */
while (i < result->size && result->vc[i].threadid < rhs->vc[j].threadid)
{
- if (result->vc[i].threadid != tid)
- {
- almost_equal = False;
- }
i++;
}
/* If the end of *result is met, append rhs->vc[j] to *result. */
@@ -225,10 +207,6 @@
{
result->size++;
result->vc[i] = rhs->vc[j];
- if (result->vc[i].threadid != tid)
- {
- almost_equal = False;
- }
}
/* If clock rhs->vc[j] is not in *result, insert it. */
else if (result->vc[i].threadid > rhs->vc[j].threadid)
@@ -240,21 +218,12 @@
}
result->size++;
result->vc[i] = rhs->vc[j];
- if (result->vc[i].threadid != tid)
- {
- almost_equal = False;
- }
}
/* Otherwise, both *result and *rhs have a clock for thread */
/* result->vc[i].threadid == rhs->vc[j].threadid. Compute the maximum. */
else
{
tl_assert(result->vc[i].threadid == rhs->vc[j].threadid);
- if (result->vc[i].threadid != tid
- && rhs->vc[j].count != result->vc[i].count)
- {
- almost_equal = False;
- }
if (rhs->vc[j].count > result->vc[i].count)
{
result->vc[i].count = rhs->vc[j].count;
@@ -263,8 +232,6 @@
}
DRD_(vc_check)(result);
tl_assert(result->size == new_size);
-
- return almost_equal;
}
/** Print the contents of vector clock 'vc'. */
Modified: branches/DRDDEV/drd/drd_vc.h
===================================================================
--- branches/DRDDEV/drd/drd_vc.h 2009-06-05 13:17:31 UTC (rev 10251)
+++ branches/DRDDEV/drd/drd_vc.h 2009-06-05 16:55:45 UTC (rev 10252)
@@ -85,9 +85,6 @@
const VectorClock* const rhs);
void DRD_(vc_combine)(VectorClock* const result,
const VectorClock* const rhs);
-Bool DRD_(vc_combine2)(VectorClock* const result,
- const VectorClock* const rhs,
- const DrdThreadId tid);
void DRD_(vc_print)(const VectorClock* const vc);
void DRD_(vc_snprint)(Char* const str, const Int size,
const VectorClock* const vc);
|
|
From: Michael S. <ms...@ap...> - 2009-06-05 15:19:12
|
On Jun 3, 2009, at 6:53 PM, Nicholas Nethercote wrote: > On Thu, Jun 4, 2009 at 10:37 AM, Nicholas Nethercote > <n.n...@gm...> wrote: >> Argh, turns out it's GNU-vs-BSD issues to do with 'date'. On GNU, >> you >> specify the date 24 hours ago like this: >> >> date --date=yesterday >> >> on BSD you do this >> >> date -v-24H > > I've fixed this and another minor issue. It seems to run ok on > Darwin now. > > Now we just have to work out who will run the tests. We have offers > from Michael, Alex and Greg. Care to fight it out amongst yourselves? > :) Well, since I already have everything setup, I'm going to turn my system on once I verify the results this morning... But like Alex said, it won't hurt to have a few systems running the tests anyways (you already do for Linux...) ________________________________________ Michael R Sweet, Senior Printing System Engineer |
|
From: <sv...@va...> - 2009-06-05 13:17:34
|
Author: sewardj
Date: 2009-06-05 14:17:31 +0100 (Fri, 05 Jun 2009)
New Revision: 10251
Log:
x86-linux: sys_set_thread_area: don't allocate GDT entry number zero,
and reject attempts to use it. This is because the hardware does not
allow entry zero to be used, and apparently doing so confuses some
code (perhaps Windows apps running on Wine). Derived from a patch by
John Reiser.
Modified:
trunk/coregrind/m_syswrap/syswrap-x86-linux.c
Modified: trunk/coregrind/m_syswrap/syswrap-x86-linux.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-x86-linux.c 2009-06-05 05:28:17 UTC (rev 10250)
+++ trunk/coregrind/m_syswrap/syswrap-x86-linux.c 2009-06-05 13:17:31 UTC (rev 10251)
@@ -647,8 +647,11 @@
idx = info->entry_number;
if (idx == -1) {
- /* Find and use the first free entry. */
- for (idx = 0; idx < VEX_GUEST_X86_GDT_NENT; idx++) {
+ /* Find and use the first free entry. Don't allocate entry
+ zero, because the hardware will never do that, and apparently
+ doing so confuses some code (perhaps stuff running on
+ Wine). */
+ for (idx = 1; idx < VEX_GUEST_X86_GDT_NENT; idx++) {
if (gdt[idx].LdtEnt.Words.word1 == 0
&& gdt[idx].LdtEnt.Words.word2 == 0)
break;
@@ -656,7 +659,8 @@
if (idx == VEX_GUEST_X86_GDT_NENT)
return VG_(mk_SysRes_Error)( VKI_ESRCH );
- } else if (idx < 0 || idx >= VEX_GUEST_X86_GDT_NENT) {
+ } else if (idx < 0 || idx == 0 || idx >= VEX_GUEST_X86_GDT_NENT) {
+ /* Similarly, reject attempts to use GDT[0]. */
return VG_(mk_SysRes_Error)( VKI_EINVAL );
}
|
|
From: Bart V. A. <bar...@gm...> - 2009-06-05 11:16:09
|
Nightly build on georgia-tech-cellbuzz-native ( cellbuzz, ppc64, Fedora 7, native ) Started at 2009-06-05 05:37:09 EDT Ended at 2009-06-05 07:15:45 EDT Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... done Regression test results follow == 418 tests, 36 stderr failures, 12 stdout failures, 0 post failures == memcheck/tests/deep_templates (stdout) memcheck/tests/leak-cases-full (stderr) memcheck/tests/leak-cases-summary (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/origin5-bz2 (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/wrap8 (stderr) none/tests/linux/mremap (stderr) none/tests/linux/mremap2 (stdout) none/tests/ppc32/jm-fp (stdout) none/tests/ppc32/jm-vmx (stdout) none/tests/ppc32/round (stdout) none/tests/ppc32/test_gx (stdout) none/tests/ppc64/jm-fp (stdout) none/tests/ppc64/jm-vmx (stdout) none/tests/ppc64/round (stdout) none/tests/shell_valid2 (stderr) none/tests/shell_valid3 (stderr) helgrind/tests/hg05_race2 (stderr) exp-ptrcheck/tests/bad_percentify (stdout) exp-ptrcheck/tests/bad_percentify (stderr) exp-ptrcheck/tests/base (stderr) exp-ptrcheck/tests/ccc (stderr) exp-ptrcheck/tests/fp (stderr) exp-ptrcheck/tests/globalerr (stderr) exp-ptrcheck/tests/hackedbz2 (stdout) exp-ptrcheck/tests/hackedbz2 (stderr) exp-ptrcheck/tests/hp_bounds (stderr) exp-ptrcheck/tests/hp_dangle (stderr) exp-ptrcheck/tests/justify (stderr) exp-ptrcheck/tests/partial_bad (stderr) exp-ptrcheck/tests/partial_good (stderr) exp-ptrcheck/tests/preen_invars (stdout) exp-ptrcheck/tests/preen_invars (stderr) exp-ptrcheck/tests/pth_create (stderr) exp-ptrcheck/tests/pth_specific (stderr) exp-ptrcheck/tests/realloc (stderr) exp-ptrcheck/tests/stackerr (stderr) exp-ptrcheck/tests/strcpy (stderr) exp-ptrcheck/tests/supp (stderr) exp-ptrcheck/tests/tricky (stderr) exp-ptrcheck/tests/unaligned (stderr) exp-ptrcheck/tests/zero (stderr) |
|
From: Bart V. A. <bar...@gm...> - 2009-06-05 09:33:49
|
Nightly build on georgia-tech-cellbuzz-native ( cellbuzz, ppc64, Fedora 7, native ) Started at 2009-06-05 03:31:44 EDT Ended at 2009-06-05 05:33:30 EDT Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... done Regression test results follow == 418 tests, 36 stderr failures, 12 stdout failures, 0 post failures == memcheck/tests/deep_templates (stdout) memcheck/tests/leak-cases-full (stderr) memcheck/tests/leak-cases-summary (stderr) memcheck/tests/leak-cycle (stderr) memcheck/tests/origin5-bz2 (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/wrap8 (stderr) none/tests/linux/mremap (stderr) none/tests/linux/mremap2 (stdout) none/tests/ppc32/jm-fp (stdout) none/tests/ppc32/jm-vmx (stdout) none/tests/ppc32/round (stdout) none/tests/ppc32/test_gx (stdout) none/tests/ppc64/jm-fp (stdout) none/tests/ppc64/jm-vmx (stdout) none/tests/ppc64/round (stdout) none/tests/shell_valid2 (stderr) none/tests/shell_valid3 (stderr) helgrind/tests/hg05_race2 (stderr) exp-ptrcheck/tests/bad_percentify (stdout) exp-ptrcheck/tests/bad_percentify (stderr) exp-ptrcheck/tests/base (stderr) exp-ptrcheck/tests/ccc (stderr) exp-ptrcheck/tests/fp (stderr) exp-ptrcheck/tests/globalerr (stderr) exp-ptrcheck/tests/hackedbz2 (stdout) exp-ptrcheck/tests/hackedbz2 (stderr) exp-ptrcheck/tests/hp_bounds (stderr) exp-ptrcheck/tests/hp_dangle (stderr) exp-ptrcheck/tests/justify (stderr) exp-ptrcheck/tests/partial_bad (stderr) exp-ptrcheck/tests/partial_good (stderr) exp-ptrcheck/tests/preen_invars (stdout) exp-ptrcheck/tests/preen_invars (stderr) exp-ptrcheck/tests/pth_create (stderr) exp-ptrcheck/tests/pth_specific (stderr) exp-ptrcheck/tests/realloc (stderr) exp-ptrcheck/tests/stackerr (stderr) exp-ptrcheck/tests/strcpy (stderr) exp-ptrcheck/tests/supp (stderr) exp-ptrcheck/tests/tricky (stderr) exp-ptrcheck/tests/unaligned (stderr) exp-ptrcheck/tests/zero (stderr) |
|
From: <sv...@va...> - 2009-06-05 05:28:22
|
Author: njn
Date: 2009-06-05 06:28:17 +0100 (Fri, 05 Jun 2009)
New Revision: 10250
Log:
Increase a hard limit that was reached in the wild.
Modified:
trunk/coregrind/m_aspacemgr/aspacemgr-linux.c
trunk/coregrind/m_syswrap/syswrap-darwin.c
Modified: trunk/coregrind/m_aspacemgr/aspacemgr-linux.c
===================================================================
--- trunk/coregrind/m_aspacemgr/aspacemgr-linux.c 2009-06-05 01:33:16 UTC (rev 10249)
+++ trunk/coregrind/m_aspacemgr/aspacemgr-linux.c 2009-06-05 05:28:17 UTC (rev 10250)
@@ -3374,6 +3374,8 @@
else if (nsegments[i].kind == SkFree || nsegments[i].kind == SkResvn) {
/* Add mapping for SkResvn regions */
ChangedSeg* cs = &css_local[css_used_local];
+ // If this assert fails, the css_size arg passed to
+ // VG_(get_changed_segments) needs to be increased.
aspacem_assert(css_used_local < css_size_local);
cs->is_added = True;
cs->start = addr;
@@ -3433,8 +3435,9 @@
if (nsegments[i].kind != SkFree && nsegments[i].kind != SkResvn) {
// V has a mapping, kernel doesn't
ChangedSeg* cs = &css_local[css_used_local];
+ // If this assert fails, the css_size arg passed to
+ // VG_(get_changed_segments) needs to be increased.
aspacem_assert(css_used_local < css_size_local);
- cs->is_added = True;
cs->is_added = False;
cs->start = nsegments[i].start;
cs->end = nsegments[i].end;
Modified: trunk/coregrind/m_syswrap/syswrap-darwin.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-darwin.c 2009-06-05 01:33:16 UTC (rev 10249)
+++ trunk/coregrind/m_syswrap/syswrap-darwin.c 2009-06-05 05:28:17 UTC (rev 10250)
@@ -592,10 +592,13 @@
static void sync_mappings(const HChar *when, const HChar *where, Int num)
{
- // I haven't seen more than 1 segment be added or removed in a single calls
- // to sync_mappings(). So 20 seems generous. The upper bound is the
- // number of segments currently in use. --njn
- #define CSS_SIZE 20
+ // Usually the number of segments added/removed in a single calls is very
+ // small e.g. 1. But the limit was 20 at one point, and that wasn't enough
+ // for at least one invocation of Firefox. If we need to go much bigger,
+ // should probably make VG_(get_changed_segments) fail if the size isn't
+ // big enough, and repeatedly redo it with progressively bigger dynamically
+ // allocated buffers until it succeeds.
+ #define CSS_SIZE 100
ChangedSeg css[CSS_SIZE];
Int css_used;
Int i;
|
|
From: Tom H. <th...@cy...> - 2009-06-05 02:47:21
|
Nightly build on vauxhall ( x86_64, Fedora 10 ) Started at 2009-06-05 03:20:04 BST Ended at 2009-06-05 03:47:15 BST Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... done Regression test results follow == 498 tests, 0 stderr failures, 0 stdout failures, 0 post failures == |
|
From: Tom H. <th...@cy...> - 2009-06-05 02:47:17
|
Nightly build on lloyd ( x86_64, Fedora 7 ) Started at 2009-06-05 03:05:05 BST Ended at 2009-06-05 03:47:06 BST Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... done Regression test results follow == 489 tests, 0 stderr failures, 0 stdout failures, 0 post failures == |
|
From: Tom H. <th...@cy...> - 2009-06-05 02:29:43
|
Nightly build on mg ( x86_64, Fedora 9 ) Started at 2009-06-05 03:10:09 BST Ended at 2009-06-05 03:29:32 BST Results unchanged from 24 hours ago Checking out valgrind source tree ... done Configuring valgrind ... done Building valgrind ... done Running regression tests ... failed Regression test results follow == 495 tests, 0 stderr failures, 1 stdout failure, 0 post failures == none/tests/linux/mremap2 (stdout) |
|
From: <sv...@va...> - 2009-06-05 02:28:52
|
Author: njn
Date: 2009-06-05 02:33:16 +0100 (Fri, 05 Jun 2009)
New Revision: 10249
Log:
For no apparent reason, the machine-dependent syscall
thread_fast_set_cthread_self was being called pthread_set_self. This commit
fixes this.
Modified:
trunk/coregrind/m_syswrap/priv_syswrap-darwin.h
trunk/coregrind/m_syswrap/syswrap-darwin.c
trunk/coregrind/m_syswrap/syswrap-main.c
trunk/exp-ptrcheck/h_main.c
trunk/include/vki/vki-scnums-darwin.h
Modified: trunk/coregrind/m_syswrap/priv_syswrap-darwin.h
===================================================================
--- trunk/coregrind/m_syswrap/priv_syswrap-darwin.h 2009-06-04 23:17:12 UTC (rev 10248)
+++ trunk/coregrind/m_syswrap/priv_syswrap-darwin.h 2009-06-05 01:33:16 UTC (rev 10249)
@@ -241,7 +241,7 @@
DECL_TEMPLATE(darwin, swtch_pri);
// Machine-dependent traps
-DECL_TEMPLATE(darwin, pthread_set_self);
+DECL_TEMPLATE(darwin, thread_fast_set_cthread_self);
// syswrap-<arch>-darwin.c
#include <mach/mach.h>
Modified: trunk/coregrind/m_syswrap/syswrap-darwin.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-darwin.c 2009-06-04 23:17:12 UTC (rev 10248)
+++ trunk/coregrind/m_syswrap/syswrap-darwin.c 2009-06-05 01:33:16 UTC (rev 10249)
@@ -6873,13 +6873,12 @@
}
#endif
-PRE(pthread_set_self)
+PRE(thread_fast_set_cthread_self)
{
- PRINT("pthread_set_self ( %#lx )", ARG1);
- PRE_REG_READ1(void, "pthread_set_self", struct pthread_t *, self);
+ PRINT("thread_fast_set_cthread_self ( %#lx )", ARG1);
+ PRE_REG_READ1(void, "thread_fast_set_cthread_self", struct pthread_t *, self);
#if defined(VGA_x86)
- // GrP fixme hack this isn't really pthread_set_self
// Point the USER_CTHREAD ldt entry (slot 6, reg 0x37) at this pthread
{
VexGuestX86SegDescr *ldt;
@@ -6912,7 +6911,7 @@
// and use that to set the syscall return status.
SET_STATUS_from_SysRes(
VG_(mk_SysRes_x86_darwin)(
- VG_DARWIN_SYSNO_CLASS(__NR_pthread_set_self),
+ VG_DARWIN_SYSNO_CLASS(__NR_thread_fast_set_cthread_self),
False, 0, 0x37
)
);
@@ -6928,7 +6927,7 @@
// see comments on x86 case just above
SET_STATUS_from_SysRes(
VG_(mk_SysRes_amd64_darwin)(
- VG_DARWIN_SYSNO_CLASS(__NR_pthread_set_self),
+ VG_DARWIN_SYSNO_CLASS(__NR_thread_fast_set_cthread_self),
False, 0, 0x60
)
);
@@ -7524,11 +7523,11 @@
#if defined(VGA_x86)
const SyscallTableEntry ML_(mdep_trap_table)[] = {
- MACX_(__NR_pthread_set_self, pthread_set_self),
+ MACX_(__NR_thread_fast_set_cthread_self, thread_fast_set_cthread_self),
};
#elif defined(VGA_amd64)
const SyscallTableEntry ML_(mdep_trap_table)[] = {
- MACX_(__NR_pthread_set_self, pthread_set_self),
+ MACX_(__NR_thread_fast_set_cthread_self, thread_fast_set_cthread_self),
};
#else
#error unknown architecture
Modified: trunk/coregrind/m_syswrap/syswrap-main.c
===================================================================
--- trunk/coregrind/m_syswrap/syswrap-main.c 2009-06-04 23:17:12 UTC (rev 10248)
+++ trunk/coregrind/m_syswrap/syswrap-main.c 2009-06-05 01:33:16 UTC (rev 10249)
@@ -1622,9 +1622,9 @@
when they really should call SET_STATUS_from_SysRes. The former
create a UNIX-class syscall result on Darwin, which may not be
correct for the syscall; if that's the case then this assertion
- fires. See PRE(pthread_set_self) for an example. On non-Darwin
- platforms this assertion is should never fail, and this comment
- is completely irrelevant. */
+ fires. See PRE(thread_fast_set_cthread_self) for an example. On
+ non-Darwin platforms this assertion is should never fail, and this
+ comment is completely irrelevant. */
/* Ok, looks sane */
/* Get the system call number. Because the pre-handler isn't
Modified: trunk/exp-ptrcheck/h_main.c
===================================================================
--- trunk/exp-ptrcheck/h_main.c 2009-06-04 23:17:12 UTC (rev 10248)
+++ trunk/exp-ptrcheck/h_main.c 2009-06-05 01:33:16 UTC (rev 10249)
@@ -2461,7 +2461,7 @@
ADD(0, __NR_task_self_trap);
// Machine-dependent syscalls.
- ADD(0, __NR_pthread_set_self);
+ ADD(0, __NR_thread_fast_set_cthread_self);
/* ------------------------------------ */
Modified: trunk/include/vki/vki-scnums-darwin.h
===================================================================
--- trunk/include/vki/vki-scnums-darwin.h 2009-06-04 23:17:12 UTC (rev 10248)
+++ trunk/include/vki/vki-scnums-darwin.h 2009-06-05 01:33:16 UTC (rev 10249)
@@ -116,18 +116,21 @@
#if defined(VGA_x86)
// osfmk/i386/machdep_call.c
-// # define __NR_thread_get_cthread_self VG_DARWIN_SYSCALL_CONSTRUCT_MDEP(0)
-// # define __NR_thread_set_cthread_self VG_DARWIN_SYSCALL_CONSTRUCT_MDEP(1)
-// # define __NR_2 VG_DARWIN_SYSCALL_CONSTRUCT_MDEP(2)
-# define __NR_pthread_set_self VG_DARWIN_SYSCALL_CONSTRUCT_MDEP(3)
-// # define __NR_thread_set_user_ldt VG_DARWIN_SYSCALL_CONSTRUCT_MDEP(4)
-// # define __NR_i386_set_ldt VG_DARWIN_SYSCALL_CONSTRUCT_MDEP(5)
-// # define __NR_i386_get_ldt VG_DARWIN_SYSCALL_CONSTRUCT_MDEP(6)
+// DDD: the last two are BSD_CALL instead of CALL...
+//#define __NR_thread_get_cthread_self VG_DARWIN_SYSCALL_CONSTRUCT_MDEP(0)
+//#define __NR_thread_set_cthread_self VG_DARWIN_SYSCALL_CONSTRUCT_MDEP(1)
+// 2 is invalid
+#define __NR_thread_fast_set_cthread_self VG_DARWIN_SYSCALL_CONSTRUCT_MDEP(3)
+//#define __NR_thread_set_user_ldt VG_DARWIN_SYSCALL_CONSTRUCT_MDEP(4)
+//#define __NR_i386_set_ldt VG_DARWIN_SYSCALL_CONSTRUCT_MDEP(5)
+//#define __NR_i386_get_ldt VG_DARWIN_SYSCALL_CONSTRUCT_MDEP(6)
#elif defined(VGA_amd64)
// osfmk/i386/machdep_call.c
-# define __NR_pthread_set_self VG_DARWIN_SYSCALL_CONSTRUCT_MDEP(3)
+// 0, 1, 2 are invalid
+#define __NR_thread_fast_set_cthread_self VG_DARWIN_SYSCALL_CONSTRUCT_MDEP(3)
+// 4, 5, 6 are invalid
#else
# error unknown architecture
|