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: <sv...@va...> - 2009-06-21 18:09:07
|
Author: bart
Date: 2009-06-21 19:09:02 +0100 (Sun, 21 Jun 2009)
New Revision: 10359
Log:
Statistics: fixed bug introduced in r10356.
Modified:
trunk/drd/drd_main.c
Modified: trunk/drd/drd_main.c
===================================================================
--- trunk/drd/drd_main.c 2009-06-21 18:08:31 UTC (rev 10358)
+++ trunk/drd/drd_main.c 2009-06-21 18:09:02 UTC (rev 10359)
@@ -602,11 +602,11 @@
pu_join);
VG_(message)(Vg_UserMsg,
" segments: created %lld segments, max %lld alive,",
- DRD_(sg_get_max_segments_alive_count)(),
- DRD_(thread_get_discard_ordered_segments_count)());
+ DRD_(sg_get_segments_created_count)(),
+ DRD_(sg_get_max_segments_alive_count)());
VG_(message)(Vg_UserMsg,
" %lld discard points and %lld merges.",
- DRD_(sg_get_segments_created_count)(),
+ DRD_(thread_get_discard_ordered_segments_count)(),
DRD_(sg_get_segment_merge_count)());
VG_(message)(Vg_UserMsg,
"segmnt cr: %lld mutex, %lld rwlock, %lld semaphore and"
@@ -616,8 +616,8 @@
DRD_(get_semaphore_segment_creation_count)(),
DRD_(get_barrier_segment_creation_count)());
VG_(message)(Vg_UserMsg,
- " bitmaps: %lld level 1"
- " and %lld level 2 bitmaps were allocated.",
+ " bitmaps: %lld level one"
+ " and %lld level two bitmaps were allocated.",
DRD_(bm_get_bitmap_creation_count)(),
DRD_(bm_get_bitmap2_creation_count)());
VG_(message)(Vg_UserMsg,
|
|
From: <sv...@va...> - 2009-06-21 18:08:38
|
Author: bart
Date: 2009-06-21 19:08:31 +0100 (Sun, 21 Jun 2009)
New Revision: 10358
Log:
Statistics: do not only count DRD_(bm_new)() calls but also DRD_(bm_init)() calls as level one bitmap creation events.
Modified:
trunk/drd/drd_bitmap.c
Modified: trunk/drd/drd_bitmap.c
===================================================================
--- trunk/drd/drd_bitmap.c 2009-06-21 18:07:35 UTC (rev 10357)
+++ trunk/drd/drd_bitmap.c 2009-06-21 18:08:31 UTC (rev 10358)
@@ -64,8 +64,6 @@
bm = VG_(malloc)("drd.bitmap.bn.1", sizeof(*bm));
DRD_(bm_init)(bm);
- s_bitmap_creation_count++;
-
return bm;
}
@@ -83,7 +81,8 @@
unsigned i;
tl_assert(bm);
- /* Cache initialization. a1 is initialized with a value that never can
+ /*
+ * Cache initialization. a1 is initialized with a value that never can
* match any valid address: the upper (ADDR_LSB_BITS + ADDR_IGNORED_BITS)
* bits of a1 are always zero for a valid cache entry.
*/
@@ -94,6 +93,8 @@
}
bm->oset = VG_(OSetGen_Create)(0, 0, DRD_(bm2_alloc_node),
"drd.bitmap.bn.2", DRD_(bm2_free_node));
+
+ s_bitmap_creation_count++;
}
/** Free the memory allocated by DRD_(bm_init)(). */
|
|
From: <sv...@va...> - 2009-06-21 18:07:42
|
Author: bart
Date: 2009-06-21 19:07:35 +0100 (Sun, 21 Jun 2009)
New Revision: 10357
Log:
Combined DRD_(thread_new_segment)() and DRD_(thread_combine_vc_sync)()
into the function DRD_(thread_new_segment_and_combine_vc)() because
before DRD_(thread_combine_vc_sync)() was called the function
DRD_(thread_new_segment)() was always called.
Modified:
trunk/drd/drd_mutex.c
trunk/drd/drd_semaphore.c
trunk/drd/drd_thread.c
trunk/drd/drd_thread.h
Modified: trunk/drd/drd_mutex.c
===================================================================
--- trunk/drd/drd_mutex.c 2009-06-21 11:51:23 UTC (rev 10356)
+++ trunk/drd/drd_mutex.c 2009-06-21 18:07:35 UTC (rev 10357)
@@ -306,17 +306,18 @@
if (p->recursion_count == 0)
{
- const DrdThreadId last_owner = p->owner;
-
- DRD_(thread_new_segment)(drd_tid);
- s_mutex_segment_creation_count++;
-
- if (last_owner != drd_tid && last_owner != DRD_INVALID_THREADID)
+ if (p->owner != drd_tid && p->owner != DRD_INVALID_THREADID)
{
tl_assert(p->last_locked_segment);
- DRD_(thread_combine_vc_sync)(drd_tid, p->last_locked_segment);
+
+ DRD_(thread_new_segment_and_combine_vc)(drd_tid,
+ p->last_locked_segment);
}
+ else
+ DRD_(thread_new_segment)(drd_tid);
+ s_mutex_segment_creation_count++;
+
p->owner = drd_tid;
p->acquiry_time_ms = VG_(read_millisecond_timer)();
p->acquired_at = VG_(record_ExeContext)(VG_(get_running_tid)(), 0);
Modified: trunk/drd/drd_semaphore.c
===================================================================
--- trunk/drd/drd_semaphore.c 2009-06-21 11:51:23 UTC (rev 10356)
+++ trunk/drd/drd_semaphore.c 2009-06-21 18:07:35 UTC (rev 10357)
@@ -315,14 +315,14 @@
tl_assert(sg);
if (sg)
{
- DRD_(thread_new_segment)(tid);
- s_semaphore_segment_creation_count++;
-
if (p->last_sem_post_tid != tid
&& p->last_sem_post_tid != DRD_INVALID_THREADID)
{
- DRD_(thread_combine_vc_sync)(tid, sg);
+ DRD_(thread_new_segment_and_combine_vc)(tid, sg);
}
+ else
+ DRD_(thread_new_segment)(tid);
+ s_semaphore_segment_creation_count++;
DRD_(sg_put)(sg);
}
}
Modified: trunk/drd/drd_thread.c
===================================================================
--- trunk/drd/drd_thread.c 2009-06-21 11:51:23 UTC (rev 10356)
+++ trunk/drd/drd_thread.c 2009-06-21 18:07:35 UTC (rev 10357)
@@ -984,7 +984,7 @@
DRD_(vc_copy)(&old_vc, &DRD_(g_threadinfo)[joiner].last->vc);
DRD_(vc_combine)(&DRD_(g_threadinfo)[joiner].last->vc,
- &DRD_(g_threadinfo)[joinee].last->vc);
+ &DRD_(g_threadinfo)[joinee].last->vc);
DRD_(thread_update_conflict_set)(joiner, &old_vc);
s_update_conflict_set_join_count++;
DRD_(vc_cleanup)(&old_vc);
@@ -992,7 +992,7 @@
else
{
DRD_(vc_combine)(&DRD_(g_threadinfo)[joiner].last->vc,
- &DRD_(g_threadinfo)[joinee].last->vc);
+ &DRD_(g_threadinfo)[joinee].last->vc);
}
thread_discard_ordered_segments();
@@ -1008,11 +1008,9 @@
/**
* Update the vector clock of the last segment of thread tid with the
- * the vector clock of segment sg. Call this function after thread tid had
- * to wait because of thread synchronization until the memory accesses in the
- * segment sg finished.
+ * the vector clock of segment sg.
*/
-void DRD_(thread_combine_vc_sync)(DrdThreadId tid, const Segment* sg)
+static void thread_combine_vc_sync(DrdThreadId tid, const Segment* sg)
{
const VectorClock* const vc = &sg->vc;
@@ -1052,6 +1050,31 @@
}
/**
+ * Create a new segment for thread tid and update the vector clock of the last
+ * segment of this thread with the the vector clock of segment sg. Call this
+ * function after thread tid had to wait because of thread synchronization
+ * until the memory accesses in the segment sg finished.
+ */
+void DRD_(thread_new_segment_and_combine_vc)(DrdThreadId tid, const Segment* sg)
+{
+ tl_assert(0 <= (int)tid && tid < DRD_N_THREADS
+ && tid != DRD_INVALID_THREADID);
+ tl_assert(thread_conflict_set_up_to_date(DRD_(g_drd_running_tid)));
+ tl_assert(sg);
+
+ thread_append_segment(tid, DRD_(sg_new)(tid, tid));
+
+ thread_combine_vc_sync(tid, sg);
+
+ if (s_segment_merging
+ && ++s_new_segments_since_last_merge >= s_segment_merge_interval)
+ {
+ thread_discard_ordered_segments();
+ thread_merge_segments();
+ }
+}
+
+/**
* Call this function whenever a thread is no longer using the memory
* [ a1, a2 [, e.g. because of a call to free() or a stack pointer
* increase.
@@ -1291,9 +1314,13 @@
if (*conflict_set)
{
- DRD_(bm_delete)(*conflict_set);
+ DRD_(bm_cleanup)(*conflict_set);
+ DRD_(bm_init)(*conflict_set);
}
- *conflict_set = DRD_(bm_new)();
+ else
+ {
+ *conflict_set = DRD_(bm_new)();
+ }
if (s_trace_conflict_set)
{
Modified: trunk/drd/drd_thread.h
===================================================================
--- trunk/drd/drd_thread.h 2009-06-21 11:51:23 UTC (rev 10356)
+++ trunk/drd/drd_thread.h 2009-06-21 18:07:35 UTC (rev 10357)
@@ -156,7 +156,8 @@
void DRD_(thread_get_latest_segment)(Segment** sg, const DrdThreadId tid);
void DRD_(thread_combine_vc_join)(const DrdThreadId joiner,
const DrdThreadId joinee);
-void DRD_(thread_combine_vc_sync)(const DrdThreadId tid, const Segment* sg);
+void DRD_(thread_new_segment_and_combine_vc)(DrdThreadId tid,
+ const Segment* sg);
void DRD_(thread_update_conflict_set)(const DrdThreadId tid,
const VectorClock* const old_vc);
|
|
From: <sv...@va...> - 2009-06-21 11:52:34
|
Author: bart
Date: 2009-06-21 12:51:23 +0100 (Sun, 21 Jun 2009)
New Revision: 10356
Log:
Made --drd-stats=yes output even more verbose.
Modified:
trunk/drd/drd_main.c
trunk/drd/drd_thread.c
trunk/drd/drd_thread.h
Modified: trunk/drd/drd_main.c
===================================================================
--- trunk/drd/drd_main.c 2009-06-21 10:11:15 UTC (rev 10355)
+++ trunk/drd/drd_main.c 2009-06-21 11:51:23 UTC (rev 10356)
@@ -575,21 +575,38 @@
// thread_print_all();
if (VG_(clo_verbosity) > 1 || DRD_(s_print_stats))
{
+ ULong pu = DRD_(thread_get_update_conflict_set_count)();
+ ULong pu_seg_cr = DRD_(thread_get_update_conflict_set_new_sg_count)();
+ ULong pu_mtx_cv = DRD_(thread_get_update_conflict_set_sync_count)();
+ ULong pu_join = DRD_(thread_get_update_conflict_set_join_count)();
+
VG_(message)(Vg_UserMsg,
- " thread: %lld context switches",
+ " thread: %lld context switches.",
DRD_(thread_get_context_switch_count)());
VG_(message)(Vg_UserMsg,
- "confl set: %lld full updates and %lld partial updates.",
+ "confl set: %lld full updates and %lld partial updates;",
DRD_(thread_get_compute_conflict_set_count)(),
- DRD_(thread_get_update_conflict_set_count)());
+ pu);
VG_(message)(Vg_UserMsg,
- " segments: created %lld segments, max %lld alive,"
- " %lld discard points",
- DRD_(sg_get_segments_created_count)(),
+ " %lld partial updates during segment creation,",
+ pu_seg_cr);
+ VG_(message)(Vg_UserMsg,
+ " %lld because of mutex/sema/cond.var. operations,",
+ pu_mtx_cv);
+ VG_(message)(Vg_UserMsg,
+ " %lld because of barrier/rwlock operations and",
+ pu - pu_seg_cr - pu_mtx_cv - pu_join);
+ VG_(message)(Vg_UserMsg,
+ " %lld partial updates because of thread join"
+ " operations.",
+ pu_join);
+ VG_(message)(Vg_UserMsg,
+ " segments: created %lld segments, max %lld alive,",
DRD_(sg_get_max_segments_alive_count)(),
DRD_(thread_get_discard_ordered_segments_count)());
VG_(message)(Vg_UserMsg,
- " and %lld merges.",
+ " %lld discard points and %lld merges.",
+ DRD_(sg_get_segments_created_count)(),
DRD_(sg_get_segment_merge_count)());
VG_(message)(Vg_UserMsg,
"segmnt cr: %lld mutex, %lld rwlock, %lld semaphore and"
Modified: trunk/drd/drd_thread.c
===================================================================
--- trunk/drd/drd_thread.c 2009-06-21 10:11:15 UTC (rev 10355)
+++ trunk/drd/drd_thread.c 2009-06-21 11:51:23 UTC (rev 10356)
@@ -61,6 +61,9 @@
static ULong s_discard_ordered_segments_count;
static ULong s_compute_conflict_set_count;
static ULong s_update_conflict_set_count;
+static ULong s_update_conflict_set_new_sg_count;
+static ULong s_update_conflict_set_sync_count;
+static ULong s_update_conflict_set_join_count;
static ULong s_conflict_set_bitmap_creation_count;
static ULong s_conflict_set_bitmap2_creation_count;
static ThreadId s_vg_running_tid = VG_INVALID_THREADID;
@@ -939,7 +942,10 @@
new_sg = DRD_(sg_new)(tid, tid);
thread_append_segment(tid, new_sg);
if (tid == DRD_(g_drd_running_tid) && last_sg)
+ {
DRD_(thread_update_conflict_set)(tid, &last_sg->vc);
+ s_update_conflict_set_new_sg_count++;
+ }
tl_assert(thread_conflict_set_up_to_date(DRD_(g_drd_running_tid)));
@@ -972,8 +978,25 @@
VG_(free)(str1);
VG_(free)(str2);
}
- DRD_(vc_combine)(&DRD_(g_threadinfo)[joiner].last->vc,
- &DRD_(g_threadinfo)[joinee].last->vc);
+ if (joiner == DRD_(g_drd_running_tid))
+ {
+ VectorClock old_vc;
+
+ DRD_(vc_copy)(&old_vc, &DRD_(g_threadinfo)[joiner].last->vc);
+ DRD_(vc_combine)(&DRD_(g_threadinfo)[joiner].last->vc,
+ &DRD_(g_threadinfo)[joinee].last->vc);
+ DRD_(thread_update_conflict_set)(joiner, &old_vc);
+ s_update_conflict_set_join_count++;
+ DRD_(vc_cleanup)(&old_vc);
+ }
+ else
+ {
+ DRD_(vc_combine)(&DRD_(g_threadinfo)[joiner].last->vc,
+ &DRD_(g_threadinfo)[joinee].last->vc);
+ }
+
+ thread_discard_ordered_segments();
+
if (DRD_(sg_get_trace)())
{
char* str;
@@ -981,12 +1004,6 @@
VG_(message)(Vg_DebugMsg, "After join: %s", str);
VG_(free)(str);
}
- thread_discard_ordered_segments();
-
- if (joiner == DRD_(g_drd_running_tid))
- {
- thread_compute_conflict_set(&DRD_(g_conflict_set), joiner);
- }
}
/**
@@ -1020,8 +1037,12 @@
VG_(free)(str1);
VG_(free)(str2);
}
+
thread_discard_ordered_segments();
+
DRD_(thread_update_conflict_set)(tid, &old_vc);
+ s_update_conflict_set_sync_count++;
+
DRD_(vc_cleanup)(&old_vc);
}
else
@@ -1488,6 +1509,34 @@
}
/**
+ * Return how many times the conflict set has been updated partially
+ * because a new segment has been created.
+ */
+ULong DRD_(thread_get_update_conflict_set_new_sg_count)(void)
+{
+ return s_update_conflict_set_new_sg_count;
+}
+
+/**
+ * Return how many times the conflict set has been updated partially
+ * because of combining vector clocks due to synchronization operations
+ * other than reader/writer lock or barrier operations.
+ */
+ULong DRD_(thread_get_update_conflict_set_sync_count)(void)
+{
+ return s_update_conflict_set_sync_count;
+}
+
+/**
+ * Return how many times the conflict set has been updated partially
+ * because of thread joins.
+ */
+ULong DRD_(thread_get_update_conflict_set_join_count)(void)
+{
+ return s_update_conflict_set_join_count;
+}
+
+/**
* Return the number of first-level bitmaps that have been created during
* conflict set updates.
*/
Modified: trunk/drd/drd_thread.h
===================================================================
--- trunk/drd/drd_thread.h 2009-06-21 10:11:15 UTC (rev 10355)
+++ trunk/drd/drd_thread.h 2009-06-21 11:51:23 UTC (rev 10356)
@@ -177,6 +177,9 @@
ULong DRD_(thread_get_discard_ordered_segments_count)(void);
ULong DRD_(thread_get_compute_conflict_set_count)(void);
ULong DRD_(thread_get_update_conflict_set_count)(void);
+ULong DRD_(thread_get_update_conflict_set_new_sg_count)(void);
+ULong DRD_(thread_get_update_conflict_set_sync_count)(void);
+ULong DRD_(thread_get_update_conflict_set_join_count)(void);
ULong DRD_(thread_get_conflict_set_bitmap_creation_count)(void);
ULong DRD_(thread_get_conflict_set_bitmap2_creation_count)(void);
|
|
From: <sv...@va...> - 2009-06-21 10:12:21
|
Author: bart
Date: 2009-06-21 11:11:15 +0100 (Sun, 21 Jun 2009)
New Revision: 10355
Log:
Merged revisions 10129:10130 from the DRDDEV branch to the trunk.
Added:
trunk/drd/drd_bitmap2_node.c
Modified:
trunk/drd/Makefile.am
trunk/drd/drd_bitmap.c
trunk/drd/drd_bitmap.h
trunk/drd/pub_drd_bitmap.h
trunk/drd/tests/unit_bitmap.c
Modified: trunk/drd/Makefile.am
===================================================================
--- trunk/drd/Makefile.am 2009-06-21 09:26:27 UTC (rev 10354)
+++ trunk/drd/Makefile.am 2009-06-21 10:11:15 UTC (rev 10355)
@@ -119,6 +119,7 @@
DRD_SOURCES = \
drd_barrier.c \
+ drd_bitmap2_node.c \
drd_clientobj.c \
drd_clientreq.c \
drd_cond.c \
Modified: trunk/drd/drd_bitmap.c
===================================================================
--- trunk/drd/drd_bitmap.c 2009-06-21 09:26:27 UTC (rev 10354)
+++ trunk/drd/drd_bitmap.c 2009-06-21 10:11:15 UTC (rev 10355)
@@ -92,8 +92,8 @@
bm->cache[i].a1 = ~(UWord)1;
bm->cache[i].bm2 = 0;
}
- bm->oset = VG_(OSetGen_Create)(0, 0, VG_(malloc), "drd.bitmap.bn.2",
- VG_(free));
+ bm->oset = VG_(OSetGen_Create)(0, 0, DRD_(bm2_alloc_node),
+ "drd.bitmap.bn.2", DRD_(bm2_free_node));
}
/** Free the memory allocated by DRD_(bm_init)(). */
@@ -1227,13 +1227,6 @@
return s_bitmap2_merge_count;
}
-/** Clear the bitmap contents. */
-static void bm2_clear(struct bitmap2* const bm2)
-{
- tl_assert(bm2);
- VG_(memset)(&bm2->bm1, 0, sizeof(bm2->bm1));
-}
-
/** Compute *bm2l |= *bm2r. */
static
void bm2_merge(struct bitmap2* const bm2l, const struct bitmap2* const bm2r)
Modified: trunk/drd/drd_bitmap.h
===================================================================
--- trunk/drd/drd_bitmap.h 2009-06-21 09:26:27 UTC (rev 10354)
+++ trunk/drd/drd_bitmap.h 2009-06-21 10:11:15 UTC (rev 10355)
@@ -536,6 +536,16 @@
return bm2;
}
+/** Clear the content of the second-level bitmap. */
+static __inline__
+void bm2_clear(struct bitmap2* const bm2)
+{
+#ifdef ENABLE_DRD_CONSISTENCY_CHECKS
+ tl_assert(bm2);
+#endif
+ VG_(memset)(&bm2->bm1, 0, sizeof(bm2->bm1));
+}
+
/**
* Insert an uninitialized second level bitmap for the address a1.
*
Copied: trunk/drd/drd_bitmap2_node.c (from rev 10130, branches/DRDDEV/drd/drd_bitmap2_node.c)
===================================================================
--- trunk/drd/drd_bitmap2_node.c (rev 0)
+++ trunk/drd/drd_bitmap2_node.c 2009-06-21 10:11:15 UTC (rev 10355)
@@ -0,0 +1,177 @@
+/* -*- mode: C; c-basic-offset: 3; -*- */
+/*
+ This file is part of drd, a thread error detector.
+
+ Copyright (C) 2006-2009 Bart Van Assche <bar...@gm...>.
+
+ This program is free software; you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as
+ published by the Free Software Foundation; either version 2 of the
+ License, or (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307, USA.
+
+ The GNU General Public License is contained in the file COPYING.
+*/
+
+/*
+ * Block allocator for second-level bitmap nodes. Each node consists of
+ * an OSetGen node and a struct bitmap2. The code below allocates
+ * NODES_PER_CHUNK nodes at a time.
+ */
+
+
+#include "drd_basics.h" /* DRD_() */
+#include "drd_bitmap.h" /* struct bitmap2 */
+#include "pub_drd_bitmap.h"
+#include "pub_tool_basics.h" /* Addr, SizeT */
+#include "pub_tool_libcassert.h" /* tl_assert() */
+#include "pub_tool_libcbase.h" /* VG_ROUNDUP() */
+#include "pub_tool_libcprint.h" /* VG_(message)() */
+#include "pub_tool_mallocfree.h" /* VG_(malloc), VG_(free) */
+
+
+#define NODES_PER_CHUNCK 512
+
+
+/* Local type definitions. */
+
+struct block_allocator_chunk {
+ struct block_allocator_chunk* next;
+ struct block_allocator_chunk* prev;
+ int nallocated;
+ void* data;
+ void* data_end;
+ void* first_free;
+};
+
+
+/* Local variables. */
+
+static SizeT s_bm2_node_size;
+static struct block_allocator_chunk* s_first;
+
+
+/* Function definitions. */
+
+/**
+ * Allocate a new chunk and insert it at the start of the doubly-linked list
+ * s_first.
+ */
+static struct block_allocator_chunk* allocate_new_chunk(void)
+{
+ struct block_allocator_chunk* p;
+ int i;
+
+ tl_assert(s_bm2_node_size > 0);
+
+ p = VG_(malloc)("drd.bitmap.bac",
+ sizeof(*p) + NODES_PER_CHUNCK * s_bm2_node_size);
+ tl_assert(p);
+ p->next = s_first;
+ if (s_first)
+ p->next->prev = p;
+ s_first = p;
+ p->prev = 0;
+ p->nallocated = 0;
+ p->data = (char*)p + sizeof(*p);
+ tl_assert(p->data);
+ p->data_end = (char*)(p->data) + NODES_PER_CHUNCK * s_bm2_node_size;
+ p->first_free = p->data;
+ for (i = 0; i < NODES_PER_CHUNCK - 1; i++)
+ {
+ *(void**)((char*)(p->data) + i * s_bm2_node_size)
+ = (char*)(p->data) + (i + 1) * s_bm2_node_size;
+ }
+ tl_assert(i == NODES_PER_CHUNCK - 1);
+ *(void**)((char*)(p->data) + i * s_bm2_node_size) = NULL;
+
+ return p;
+}
+
+/** Free a chunk and remove it from the list of chunks. */
+static void free_chunk(struct block_allocator_chunk* const p)
+{
+ tl_assert(p);
+ tl_assert(p->nallocated == 0);
+
+ if (p == s_first)
+ s_first = p->next;
+ else if (p->prev)
+ p->prev->next = p->next;
+ if (p->next)
+ p->next->prev = p->prev;
+ VG_(free)(p);
+}
+
+/** Allocate a node. */
+void* DRD_(bm2_alloc_node)(HChar* const ec, const SizeT szB)
+{
+ /*
+ * If szB < sizeof(struct bitmap2) then this function has been called to
+ * allocate an AVL tree root node. Otherwise it has been called to allocate
+ * an AVL tree branch or leaf node.
+ */
+ if (szB < sizeof(struct bitmap2))
+ return VG_(malloc)(ec, szB);
+
+ while (True)
+ {
+ struct block_allocator_chunk* p;
+
+ if (s_bm2_node_size == 0)
+ s_bm2_node_size = szB;
+ else
+ tl_assert(s_bm2_node_size == szB);
+
+ for (p = s_first; p; p = p->next)
+ {
+ if (p->first_free)
+ {
+ void* result;
+
+ p->nallocated++;
+ result = p->first_free;
+ p->first_free = *(void**)(p->first_free);
+ return result;
+ }
+ }
+
+ allocate_new_chunk();
+ }
+}
+
+/** Free a node. */
+void DRD_(bm2_free_node)(void* const bm2)
+{
+ struct block_allocator_chunk* p;
+
+ tl_assert(s_bm2_node_size > 0);
+ tl_assert(bm2);
+
+ for (p = s_first; p; p = p->next)
+ {
+ if (p->data <= bm2 && bm2 < p->data_end)
+ {
+ /* Free the memory that was allocated for a non-root AVL tree node. */
+ tl_assert(((char*)bm2 - (char*)(p->data)) % s_bm2_node_size == 0);
+ *(void**)bm2 = p->first_free;
+ p->first_free = bm2;
+ tl_assert(p->nallocated >= 1);
+ if (--(p->nallocated) == 0)
+ free_chunk(p);
+ return;
+ }
+ }
+
+ /* Free the memory that was allocated for an AVL tree root node. */
+ VG_(free)(bm2);
+}
Modified: trunk/drd/pub_drd_bitmap.h
===================================================================
--- trunk/drd/pub_drd_bitmap.h 2009-06-21 09:26:27 UTC (rev 10354)
+++ trunk/drd/pub_drd_bitmap.h 2009-06-21 10:11:15 UTC (rev 10355)
@@ -148,4 +148,7 @@
ULong DRD_(bm_get_bitmap2_creation_count)(void);
ULong DRD_(bm_get_bitmap2_merge_count)(void);
+void* DRD_(bm2_alloc_node)(HChar* const ec, const SizeT szB);
+void DRD_(bm2_free_node)(void* const bm2);
+
#endif /* __PUB_DRD_BITMAP_H */
Modified: trunk/drd/tests/unit_bitmap.c
===================================================================
--- trunk/drd/tests/unit_bitmap.c 2009-06-21 09:26:27 UTC (rev 10354)
+++ trunk/drd/tests/unit_bitmap.c 2009-06-21 10:11:15 UTC (rev 10355)
@@ -8,6 +8,7 @@
#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"
|
|
From: <sv...@va...> - 2009-06-21 09:26:40
|
Author: bart
Date: 2009-06-21 10:26:27 +0100 (Sun, 21 Jun 2009)
New Revision: 10354
Log:
Updated code for statistics printed by --drd-stats=yes.
Modified:
trunk/drd/drd_main.c
trunk/drd/drd_thread.c
trunk/drd/drd_thread.h
Modified: trunk/drd/drd_main.c
===================================================================
--- trunk/drd/drd_main.c 2009-06-20 17:42:59 UTC (rev 10353)
+++ trunk/drd/drd_main.c 2009-06-21 09:26:27 UTC (rev 10354)
@@ -575,35 +575,25 @@
// thread_print_all();
if (VG_(clo_verbosity) > 1 || DRD_(s_print_stats))
{
- ULong update_conflict_set_count;
- ULong dsnsc;
- ULong dscvc;
-
- update_conflict_set_count
- = DRD_(thread_get_update_conflict_set_count)(&dsnsc, &dscvc);
-
VG_(message)(Vg_UserMsg,
- " thread: %lld context switches"
- " / %lld updates of the conflict set",
- DRD_(thread_get_context_switch_count)(),
- update_conflict_set_count);
+ " thread: %lld context switches",
+ DRD_(thread_get_context_switch_count)());
VG_(message)(Vg_UserMsg,
- " (%lld new sg + %lld combine vc + %lld csw).",
- dsnsc,
- dscvc,
- update_conflict_set_count - dsnsc - dscvc);
+ "confl set: %lld full updates and %lld partial updates.",
+ DRD_(thread_get_compute_conflict_set_count)(),
+ DRD_(thread_get_update_conflict_set_count)());
VG_(message)(Vg_UserMsg,
" segments: created %lld segments, max %lld alive,"
- " %lld discard points.",
+ " %lld discard points",
DRD_(sg_get_segments_created_count)(),
DRD_(sg_get_max_segments_alive_count)(),
DRD_(thread_get_discard_ordered_segments_count)());
VG_(message)(Vg_UserMsg,
- " %lld merges",
+ " and %lld merges.",
DRD_(sg_get_segment_merge_count)());
VG_(message)(Vg_UserMsg,
- " (%lld mutex, %lld rwlock, %lld semaphore,"
- " %lld barrier).",
+ "segmnt cr: %lld mutex, %lld rwlock, %lld semaphore and"
+ " %lld barrier.",
DRD_(get_mutex_segment_creation_count)(),
DRD_(get_rwlock_segment_creation_count)(),
DRD_(get_semaphore_segment_creation_count)(),
Modified: trunk/drd/drd_thread.c
===================================================================
--- trunk/drd/drd_thread.c 2009-06-20 17:42:59 UTC (rev 10353)
+++ trunk/drd/drd_thread.c 2009-06-21 09:26:27 UTC (rev 10354)
@@ -59,9 +59,8 @@
static ULong s_context_switch_count;
static ULong s_discard_ordered_segments_count;
+static ULong s_compute_conflict_set_count;
static ULong s_update_conflict_set_count;
-static ULong s_conflict_set_new_segment_count;
-static ULong s_conflict_set_combine_vc_count;
static ULong s_conflict_set_bitmap_creation_count;
static ULong s_conflict_set_bitmap2_creation_count;
static ThreadId s_vg_running_tid = VG_INVALID_THREADID;
@@ -1263,7 +1262,7 @@
&& tid != DRD_INVALID_THREADID);
tl_assert(tid == DRD_(g_drd_running_tid));
- s_update_conflict_set_count++;
+ s_compute_conflict_set_count++;
s_conflict_set_bitmap_creation_count
-= DRD_(bm_get_bitmap_creation_count)();
s_conflict_set_bitmap2_creation_count
@@ -1452,7 +1451,7 @@
DRD_(bm_remove_cleared_marked)(DRD_(g_conflict_set));
- s_conflict_set_combine_vc_count++;
+ s_update_conflict_set_count++;
if (s_trace_conflict_set_bm)
{
@@ -1476,13 +1475,15 @@
return s_discard_ordered_segments_count;
}
-/** Return how many times the conflict set has been updated. */
-ULong DRD_(thread_get_update_conflict_set_count)(ULong* dsnsc, ULong* dscvc)
+/** Return how many times the conflict set has been updated entirely. */
+ULong DRD_(thread_get_compute_conflict_set_count)()
{
- tl_assert(dsnsc);
- tl_assert(dscvc);
- *dsnsc = s_conflict_set_new_segment_count;
- *dscvc = s_conflict_set_combine_vc_count;
+ return s_compute_conflict_set_count;
+}
+
+/** Return how many times the conflict set has been updated partially. */
+ULong DRD_(thread_get_update_conflict_set_count)(void)
+{
return s_update_conflict_set_count;
}
Modified: trunk/drd/drd_thread.h
===================================================================
--- trunk/drd/drd_thread.h 2009-06-20 17:42:59 UTC (rev 10353)
+++ trunk/drd/drd_thread.h 2009-06-21 09:26:27 UTC (rev 10354)
@@ -175,7 +175,8 @@
ULong DRD_(thread_get_context_switch_count)(void);
ULong DRD_(thread_get_report_races_count)(void);
ULong DRD_(thread_get_discard_ordered_segments_count)(void);
-ULong DRD_(thread_get_update_conflict_set_count)(ULong* dsnsc, ULong* dscvc);
+ULong DRD_(thread_get_compute_conflict_set_count)(void);
+ULong DRD_(thread_get_update_conflict_set_count)(void);
ULong DRD_(thread_get_conflict_set_bitmap_creation_count)(void);
ULong DRD_(thread_get_conflict_set_bitmap2_creation_count)(void);
|
|
From: Bart V. A. <bar...@gm...> - 2009-06-21 07:44:55
|
Nightly build on georgia-tech-cellbuzz-native ( cellbuzz, ppc64, Fedora 7, native ) Started at 2009-06-21 02:00:04 EDT Ended at 2009-06-21 03:44:31 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: Tom H. <th...@cy...> - 2009-06-21 02:48:32
|
Nightly build on lloyd ( x86_64, Fedora 7 ) Started at 2009-06-21 03:05:06 BST Ended at 2009-06-21 03:48:22 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 == 490 tests, 0 stderr failures, 0 stdout failures, 0 post failures == |
|
From: Tom H. <th...@cy...> - 2009-06-21 02:46:54
|
Nightly build on vauxhall ( x86_64, Fedora 10 ) Started at 2009-06-21 03:20:04 BST Ended at 2009-06-21 03:46:46 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 == 499 tests, 0 stderr failures, 0 stdout failures, 0 post failures == |
|
From: Tom H. <th...@cy...> - 2009-06-21 02:28:54
|
Nightly build on mg ( x86_64, Fedora 9 ) Started at 2009-06-21 03:10:06 BST Ended at 2009-06-21 03:28:40 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 == 496 tests, 0 stderr failures, 1 stdout failure, 0 post failures == none/tests/linux/mremap2 (stdout) |