|
From: <sv...@va...> - 2009-07-15 14:49:30
|
Author: sewardj
Date: 2009-07-15 15:49:17 +0100 (Wed, 15 Jul 2009)
New Revision: 10466
Log:
Merge drd/ changes from branches/MESSAGING_TIDYUP r10464.
See trunk r10465 commit message for details.
Modified:
trunk/drd/drd_barrier.c
trunk/drd/drd_clientobj.c
trunk/drd/drd_cond.c
trunk/drd/drd_error.c
trunk/drd/drd_load_store.c
trunk/drd/drd_main.c
trunk/drd/drd_malloc_wrappers.c
trunk/drd/drd_mutex.c
trunk/drd/drd_rwlock.c
trunk/drd/drd_semaphore.c
trunk/drd/drd_suppression.c
trunk/drd/drd_thread.c
trunk/drd/tests/boost_thread.cpp
trunk/drd/tests/boost_thread.stderr.exp
trunk/drd/tests/boost_thread.vgtest
trunk/drd/tests/pth_barrier.c
trunk/drd/tests/pth_cond_race3.stderr.exp
trunk/drd/tests/pth_cond_race3.vgtest
trunk/drd/tests/rwlock_race.c
trunk/drd/tests/rwlock_test.c
trunk/drd/tests/tc09_bad_unlock.stderr.exp-glibc2.8
Modified: trunk/drd/drd_barrier.c
===================================================================
--- trunk/drd/drd_barrier.c 2009-07-15 14:48:32 UTC (rev 10465)
+++ trunk/drd/drd_barrier.c 2009-07-15 14:49:17 UTC (rev 10466)
@@ -257,7 +257,7 @@
if (reinitialization)
{
VG_(message)(Vg_UserMsg,
- "[%d/%d] barrier_reinit %s 0x%lx count %ld -> %ld",
+ "[%d/%d] barrier_reinit %s 0x%lx count %ld -> %ld\n",
VG_(get_running_tid)(),
DRD_(thread_get_running_tid)(),
barrier_get_typename(p),
@@ -268,7 +268,7 @@
else
{
VG_(message)(Vg_UserMsg,
- "[%d/%d] barrier_init %s 0x%lx",
+ "[%d/%d] barrier_init %s 0x%lx\n",
VG_(get_running_tid)(),
DRD_(thread_get_running_tid)(),
barrier_get_typename(p),
@@ -302,7 +302,7 @@
if (s_trace_barrier)
{
VG_(message)(Vg_UserMsg,
- "[%d/%d] barrier_destroy %s 0x%lx",
+ "[%d/%d] barrier_destroy %s 0x%lx\n",
VG_(get_running_tid)(),
DRD_(thread_get_running_tid)(),
barrier_get_typename(p),
@@ -349,20 +349,20 @@
* not. The only cause I know of that can trigger this is that libgomp.so
* has been compiled with --enable-linux-futex.
*/
- VG_(message)(Vg_UserMsg, "");
+ VG_(message)(Vg_UserMsg, "\n");
VG_(message)(Vg_UserMsg,
"Please verify whether gcc has been configured"
- " with option --disable-linux-futex.");
+ " with option --disable-linux-futex.\n");
VG_(message)(Vg_UserMsg,
- "See also the section about OpenMP in the DRD manual.");
- VG_(message)(Vg_UserMsg, "");
+ "See also the section about OpenMP in the DRD manual.\n");
+ VG_(message)(Vg_UserMsg, "\n");
}
tl_assert(p);
if (s_trace_barrier)
{
VG_(message)(Vg_UserMsg,
- "[%d/%d] barrier_pre_wait %s 0x%lx iteration %ld",
+ "[%d/%d] barrier_pre_wait %s 0x%lx iteration %ld\n",
VG_(get_running_tid)(),
DRD_(thread_get_running_tid)(),
barrier_get_typename(p),
@@ -416,7 +416,7 @@
if (s_trace_barrier)
{
VG_(message)(Vg_UserMsg,
- "[%d/%d] barrier_post_wait %s 0x%lx iteration %ld%s",
+ "[%d/%d] barrier_post_wait %s 0x%lx iteration %ld%s\n",
VG_(get_running_tid)(),
tid,
p ? barrier_get_typename(p) : "(?)",
Modified: trunk/drd/drd_clientobj.c
===================================================================
--- trunk/drd/drd_clientobj.c 2009-07-15 14:48:32 UTC (rev 10465)
+++ trunk/drd/drd_clientobj.c 2009-07-15 14:49:17 UTC (rev 10466)
@@ -134,7 +134,7 @@
if (s_trace_clientobj)
{
- VG_(message)(Vg_UserMsg, "Adding client object 0x%lx of type %d", a1, t);
+ VG_(message)(Vg_UserMsg, "Adding client object 0x%lx of type %d\n", a1, t);
}
p = VG_(OSetGen_AllocNode)(s_clientobj_set, sizeof(*p));
@@ -179,7 +179,7 @@
if (s_trace_clientobj)
{
- VG_(message)(Vg_UserMsg, "Removing client object 0x%lx of type %d",
+ VG_(message)(Vg_UserMsg, "Removing client object 0x%lx of type %d\n",
p->any.a1, p->any.type);
}
Modified: trunk/drd/drd_cond.c
===================================================================
--- trunk/drd/drd_cond.c 2009-07-15 14:48:32 UTC (rev 10465)
+++ trunk/drd/drd_cond.c 2009-07-15 14:49:17 UTC (rev 10466)
@@ -125,7 +125,7 @@
if (DRD_(s_trace_cond))
{
VG_(message)(Vg_UserMsg,
- "[%d/%d] cond_init cond 0x%lx",
+ "[%d/%d] cond_init cond 0x%lx\n",
VG_(get_running_tid)(),
DRD_(thread_get_running_tid)(),
cond);
@@ -154,7 +154,7 @@
if (DRD_(s_trace_cond))
{
VG_(message)(Vg_UserMsg,
- "[%d/%d] cond_destroy cond 0x%lx",
+ "[%d/%d] cond_destroy cond 0x%lx\n",
VG_(get_running_tid)(),
DRD_(thread_get_running_tid)(),
cond);
@@ -197,7 +197,7 @@
if (DRD_(s_trace_cond))
{
VG_(message)(Vg_UserMsg,
- "[%d/%d] cond_pre_wait cond 0x%lx",
+ "[%d/%d] cond_pre_wait cond 0x%lx\n",
VG_(get_running_tid)(),
DRD_(thread_get_running_tid)(),
cond);
@@ -252,7 +252,7 @@
if (DRD_(s_trace_cond))
{
VG_(message)(Vg_UserMsg,
- "[%d/%d] cond_post_wait cond 0x%lx",
+ "[%d/%d] cond_post_wait cond 0x%lx\n",
VG_(get_running_tid)(),
DRD_(thread_get_running_tid)(),
cond);
@@ -311,7 +311,7 @@
if (DRD_(s_trace_cond))
{
VG_(message)(Vg_UserMsg,
- "[%d/%d] cond_signal cond 0x%lx",
+ "[%d/%d] cond_signal cond 0x%lx\n",
VG_(get_running_tid)(),
DRD_(thread_get_running_tid)(),
cond);
@@ -326,7 +326,7 @@
if (DRD_(s_trace_cond))
{
VG_(message)(Vg_UserMsg,
- "[%d/%d] cond_broadcast cond 0x%lx",
+ "[%d/%d] cond_broadcast cond 0x%lx\n",
VG_(get_running_tid)(),
DRD_(thread_get_running_tid)(),
cond);
Modified: trunk/drd/drd_error.c
===================================================================
--- trunk/drd/drd_error.c 2009-07-15 14:48:32 UTC (rev 10465)
+++ trunk/drd/drd_error.c 2009-07-15 14:49:17 UTC (rev 10466)
@@ -85,7 +85,7 @@
{
tl_assert(cl->any.first_observed_at);
VG_(message)(Vg_UserMsg,
- "%s 0x%lx was first observed at:",
+ "%s 0x%lx was first observed at:\n",
DRD_(clientobj_type_name)(cl->any.type),
obj);
VG_(pp_ExeContext)(cl->any.first_observed_at);
@@ -96,41 +96,64 @@
void drd_report_data_race(Error* const err, const DataRaceErrInfo* const dri)
{
AddrInfo ai;
- const unsigned descr_size = 256;
- Char* descr1 = VG_(malloc)("drd.error.drdr2.1", descr_size);
- Char* descr2 = VG_(malloc)("drd.error.drdr2.2", descr_size);
+ XArray* /* of HChar */ descr1
+ = VG_(newXA)( VG_(malloc), "drd.error.drdr2.1",
+ VG_(free), sizeof(HChar) );
+ XArray* /* of HChar */ descr2
+ = VG_(newXA)( VG_(malloc), "drd.error.drdr2.2",
+ VG_(free), sizeof(HChar) );
+
tl_assert(dri);
tl_assert(dri->addr);
tl_assert(dri->size > 0);
tl_assert(descr1);
tl_assert(descr2);
- descr1[0] = 0;
- descr2[0] = 0;
- VG_(get_data_description)(descr1, descr2, descr_size, dri->addr);
- if (descr1[0] == 0)
+ (void) VG_(get_data_description)(descr1, descr2, dri->addr);
+ /* If there's nothing in descr1/2, free them. Why is it safe to to
+ VG_(indexXA) at zero here? Because VG_(get_data_description)
+ guarantees to zero terminate descr1/2 regardless of the outcome
+ of the call. So there's always at least one element in each XA
+ after the call.
+ */
+ if (0 == VG_(strlen)( VG_(indexXA)( descr1, 0 ))) {
+ VG_(deleteXA)( descr1 );
+ descr1 = NULL;
+ }
+ if (0 == VG_(strlen)( VG_(indexXA)( descr2, 0 ))) {
+ VG_(deleteXA)( descr2 );
+ descr2 = NULL;
+ }
+ /* Assume (assert) that VG_(get_data_description) fills in descr1
+ before it fills in descr2 */
+ if (descr1 == NULL)
+ tl_assert(descr2 == NULL);
+ /* So anyway. Do we have something useful? */
+ if (descr1 == NULL)
{
+ /* No. Do Plan B. */
describe_malloced_addr(dri->addr, dri->size, &ai);
}
VG_(message)(Vg_UserMsg,
- "Conflicting %s by thread %d/%d at 0x%08lx size %ld",
+ "Conflicting %s by thread %d/%d at 0x%08lx size %ld\n",
dri->access_type == eStore ? "store" : "load",
DRD_(DrdThreadIdToVgThreadId)(dri->tid),
dri->tid,
dri->addr,
dri->size);
VG_(pp_ExeContext)(VG_(get_error_where)(err));
- if (descr1[0])
+ if (descr1 != NULL)
{
- VG_(message)(Vg_UserMsg, "%s", descr1);
- VG_(message)(Vg_UserMsg, "%s", descr2);
+ VG_(message)(Vg_UserMsg, "%s\n", (HChar*)VG_(indexXA)(descr1, 0));
+ if (descr2 != NULL)
+ VG_(message)(Vg_UserMsg, "%s\n", (HChar*)VG_(indexXA)(descr2, 0));
}
else if (ai.akind == eMallocd && ai.lastchange)
{
VG_(message)(Vg_UserMsg,
"Address 0x%lx is at offset %ld from 0x%lx."
- " Allocation context:",
+ " Allocation context:\n",
dri->addr, ai.rwoffset, dri->addr - ai.rwoffset);
VG_(pp_ExeContext)(ai.lastchange);
}
@@ -144,13 +167,13 @@
if (sect_kind != Vg_SectUnknown)
{
VG_(message)(Vg_UserMsg,
- "Allocation context: %s section of %s",
+ "Allocation context: %s section of %s\n",
VG_(pp_SectKind)(sect_kind),
sect_name);
}
else
{
- VG_(message)(Vg_UserMsg, "Allocation context: unknown.");
+ VG_(message)(Vg_UserMsg, "Allocation context: unknown.\n");
}
}
if (s_show_conflicting_segments)
@@ -160,8 +183,10 @@
dri->access_type);
}
- VG_(free)(descr2);
- VG_(free)(descr1);
+ if (descr2)
+ VG_(deleteXA)(descr2);
+ if (descr1)
+ VG_(deleteXA)(descr1);
}
static Bool drd_tool_error_eq(VgRes res, Error* e1, Error* e2)
@@ -169,6 +194,12 @@
return False;
}
+static void drd_tool_error_before_pp(Error* const e)
+{
+ /* No need to do anything; drd_tool_error_pp does all
+ the work. */
+}
+
static void drd_tool_error_pp(Error* const e)
{
static DrdThreadId s_last_tid_printed = 1;
@@ -178,7 +209,7 @@
if (err_extra && *err_extra != s_last_tid_printed)
{
- VG_UMSG("%s:", DRD_(thread_get_name)(*err_extra));
+ VG_(umsg)("%s:\n", DRD_(thread_get_name)(*err_extra));
s_last_tid_printed = *err_extra;
}
@@ -194,7 +225,7 @@
if (p->recursion_count >= 0)
{
VG_(message)(Vg_UserMsg,
- "%s: mutex 0x%lx, recursion count %d, owner %d.",
+ "%s: mutex 0x%lx, recursion count %d, owner %d.\n",
VG_(get_error_string)(e),
p->mutex,
p->recursion_count,
@@ -203,7 +234,7 @@
else
{
VG_(message)(Vg_UserMsg,
- "The object at address 0x%lx is not a mutex.",
+ "The object at address 0x%lx is not a mutex.\n",
p->mutex);
}
VG_(pp_ExeContext)(VG_(get_error_where)(e));
@@ -213,7 +244,7 @@
case CondErr: {
CondErrInfo* cdei =(CondErrInfo*)(VG_(get_error_extra)(e));
VG_(message)(Vg_UserMsg,
- "%s: cond 0x%lx",
+ "%s: cond 0x%lx\n",
VG_(get_error_string)(e),
cdei->cond);
VG_(pp_ExeContext)(VG_(get_error_where)(e));
@@ -223,7 +254,7 @@
case CondDestrErr: {
CondDestrErrInfo* cdi = (CondDestrErrInfo*)(VG_(get_error_extra)(e));
VG_(message)(Vg_UserMsg,
- "%s: cond 0x%lx, mutex 0x%lx locked by thread %d/%d",
+ "%s: cond 0x%lx, mutex 0x%lx locked by thread %d/%d\n",
VG_(get_error_string)(e),
cdi->cond, cdi->mutex,
DRD_(DrdThreadIdToVgThreadId)(cdi->owner), cdi->owner);
@@ -236,7 +267,7 @@
VG_(message)(Vg_UserMsg,
"Probably a race condition: condition variable 0x%lx has"
" been signaled but the associated mutex 0x%lx is not"
- " locked by the signalling thread.",
+ " locked by the signalling thread.\n",
cei->cond, cei->mutex);
VG_(pp_ExeContext)(VG_(get_error_where)(e));
first_observed(cei->cond);
@@ -246,7 +277,7 @@
case CondWaitErr: {
CondWaitErrInfo* cwei = (CondWaitErrInfo*)(VG_(get_error_extra)(e));
VG_(message)(Vg_UserMsg,
- "%s: condition variable 0x%lx, mutexes 0x%lx and 0x%lx",
+ "%s: condition variable 0x%lx, mutexes 0x%lx and 0x%lx\n",
VG_(get_error_string)(e),
cwei->cond,
cwei->mutex1,
@@ -261,7 +292,7 @@
SemaphoreErrInfo* sei = (SemaphoreErrInfo*)(VG_(get_error_extra)(e));
tl_assert(sei);
VG_(message)(Vg_UserMsg,
- "%s: semaphore 0x%lx",
+ "%s: semaphore 0x%lx\n",
VG_(get_error_string)(e),
sei->semaphore);
VG_(pp_ExeContext)(VG_(get_error_where)(e));
@@ -272,14 +303,14 @@
BarrierErrInfo* bei = (BarrierErrInfo*)(VG_(get_error_extra)(e));
tl_assert(bei);
VG_(message)(Vg_UserMsg,
- "%s: barrier 0x%lx",
+ "%s: barrier 0x%lx\n",
VG_(get_error_string)(e),
bei->barrier);
VG_(pp_ExeContext)(VG_(get_error_where)(e));
if (bei->other_context)
{
VG_(message)(Vg_UserMsg,
- "Conflicting wait call by thread %d/%d:",
+ "Conflicting wait call by thread %d/%d:\n",
DRD_(DrdThreadIdToVgThreadId)(bei->other_tid),
bei->other_tid);
VG_(pp_ExeContext)(bei->other_context);
@@ -291,7 +322,7 @@
RwlockErrInfo* p = (RwlockErrInfo*)(VG_(get_error_extra)(e));
tl_assert(p);
VG_(message)(Vg_UserMsg,
- "%s: rwlock 0x%lx.",
+ "%s: rwlock 0x%lx.\n",
VG_(get_error_string)(e),
p->rwlock);
VG_(pp_ExeContext)(VG_(get_error_where)(e));
@@ -302,10 +333,10 @@
HoldtimeErrInfo* p =(HoldtimeErrInfo*)(VG_(get_error_extra)(e));
tl_assert(p);
tl_assert(p->acquired_at);
- VG_(message)(Vg_UserMsg, "Acquired at:");
+ VG_(message)(Vg_UserMsg, "Acquired at:\n");
VG_(pp_ExeContext)(p->acquired_at);
VG_(message)(Vg_UserMsg,
- "Lock on %s 0x%lx was held during %d ms (threshold: %d ms).",
+ "Lock on %s 0x%lx was held during %d ms (threshold: %d ms).\n",
VG_(get_error_string)(e),
p->synchronization_object,
p->hold_time_ms,
@@ -316,13 +347,13 @@
}
case GenericErr: {
//GenericErrInfo* gei =(GenericErrInfo*)(VG_(get_error_extra)(e));
- VG_(message)(Vg_UserMsg, "%s", VG_(get_error_string)(e));
+ VG_(message)(Vg_UserMsg, "%s\n", VG_(get_error_string)(e));
VG_(pp_ExeContext)(VG_(get_error_where)(e));
break;
}
default:
VG_(message)(Vg_UserMsg,
- "%s",
+ "%s\n",
VG_(get_error_string)(e));
VG_(pp_ExeContext)(VG_(get_error_where)(e));
break;
@@ -436,6 +467,7 @@
{
// Tool error reporting.
VG_(needs_tool_errors)(drd_tool_error_eq,
+ drd_tool_error_before_pp,
drd_tool_error_pp,
False,
drd_tool_error_update_extra,
Modified: trunk/drd/drd_load_store.c
===================================================================
--- trunk/drd/drd_load_store.c 2009-07-15 14:48:32 UTC (rev 10465)
+++ trunk/drd/drd_load_store.c 2009-07-15 14:49:17 UTC (rev 10466)
@@ -90,7 +90,7 @@
vc = DRD_(vc_aprint)(DRD_(thread_get_vc)(DRD_(thread_get_running_tid)()));
VG_(message)(Vg_UserMsg,
- "%s 0x%lx size %ld (vg %d / drd %d / vc %s)",
+ "%s 0x%lx size %ld (vg %d / drd %d / vc %s)\n",
access_type == eLoad
? "load "
: access_type == eStore
Modified: trunk/drd/drd_main.c
===================================================================
--- trunk/drd/drd_main.c 2009-07-15 14:48:32 UTC (rev 10465)
+++ trunk/drd/drd_main.c 2009-07-15 14:49:17 UTC (rev 10466)
@@ -468,7 +468,7 @@
if (DRD_(thread_get_trace_fork_join)())
{
VG_(message)(Vg_DebugMsg,
- "drd_pre_thread_create creator = %d/%d, created = %d",
+ "drd_pre_thread_create creator = %d/%d, created = %d\n",
creator, drd_creator, created);
}
}
@@ -487,7 +487,7 @@
if (DRD_(thread_get_trace_fork_join)())
{
VG_(message)(Vg_DebugMsg,
- "drd_post_thread_create created = %d/%d",
+ "drd_post_thread_create created = %d/%d\n",
vg_created, drd_created);
}
if (! DRD_(get_check_stack_accesses)())
@@ -510,7 +510,7 @@
if (DRD_(thread_get_trace_fork_join)())
{
VG_(message)(Vg_DebugMsg,
- "drd_thread_finished tid = %d/%d%s",
+ "drd_thread_finished tid = %d/%d%s\n",
vg_tid,
drd_tid,
DRD_(thread_get_joinable)(drd_tid)
@@ -525,7 +525,7 @@
- DRD_(thread_get_stack_min_min)(drd_tid));
VG_(message)(Vg_UserMsg,
"thread %d/%d%s finished and used %ld bytes out of %ld"
- " on its stack. Margin: %ld bytes.",
+ " on its stack. Margin: %ld bytes.\n",
vg_tid,
drd_tid,
DRD_(thread_get_joinable)(drd_tid)
@@ -581,47 +581,47 @@
ULong pu_join = DRD_(thread_get_update_conflict_set_join_count)();
VG_(message)(Vg_UserMsg,
- " thread: %lld context switches.",
+ " thread: %lld context switches.\n",
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;\n",
DRD_(thread_get_compute_conflict_set_count)(),
pu);
VG_(message)(Vg_UserMsg,
- " %lld partial updates during segment creation,",
+ " %lld partial updates during segment creation,\n",
pu_seg_cr);
VG_(message)(Vg_UserMsg,
- " %lld because of mutex/sema/cond.var. operations,",
+ " %lld because of mutex/sema/cond.var. operations,\n",
pu_mtx_cv);
VG_(message)(Vg_UserMsg,
- " %lld because of barrier/rwlock operations and",
+ " %lld because of barrier/rwlock operations and\n",
pu - pu_seg_cr - pu_mtx_cv - pu_join);
VG_(message)(Vg_UserMsg,
" %lld partial updates because of thread join"
- " operations.",
+ " operations.\n",
pu_join);
VG_(message)(Vg_UserMsg,
- " segments: created %lld segments, max %lld alive,",
+ " segments: created %lld segments, max %lld alive,\n",
DRD_(sg_get_segments_created_count)(),
DRD_(sg_get_max_segments_alive_count)());
VG_(message)(Vg_UserMsg,
- " %lld discard points and %lld merges.",
+ " %lld discard points and %lld merges.\n",
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"
- " %lld barrier.",
+ " %lld barrier.\n",
DRD_(get_mutex_segment_creation_count)(),
DRD_(get_rwlock_segment_creation_count)(),
DRD_(get_semaphore_segment_creation_count)(),
DRD_(get_barrier_segment_creation_count)());
VG_(message)(Vg_UserMsg,
" bitmaps: %lld level one"
- " and %lld level two bitmaps were allocated.",
+ " and %lld level two bitmaps were allocated.\n",
DRD_(bm_get_bitmap_creation_count)(),
DRD_(bm_get_bitmap2_creation_count)());
VG_(message)(Vg_UserMsg,
- " mutex: %lld non-recursive lock/unlock events.",
+ " mutex: %lld non-recursive lock/unlock events.\n",
DRD_(get_mutex_lock_count)());
DRD_(print_malloc_stats)();
}
Modified: trunk/drd/drd_malloc_wrappers.c
===================================================================
--- trunk/drd/drd_malloc_wrappers.c 2009-07-15 14:48:32 UTC (rev 10465)
+++ trunk/drd/drd_malloc_wrappers.c 2009-07-15 14:49:17 UTC (rev 10466)
@@ -360,14 +360,14 @@
}
VG_(message)(Vg_DebugMsg,
- "malloc/free: in use at exit: %lu bytes in %lu blocks.",
+ "malloc/free: in use at exit: %lu bytes in %lu blocks.\n",
nbytes, nblocks);
VG_(message)(Vg_DebugMsg,
- "malloc/free: %lu allocs, %lu frees, %lu bytes allocated.",
+ "malloc/free: %lu allocs, %lu frees, %lu bytes allocated.\n",
s_cmalloc_n_mallocs,
s_cmalloc_n_frees, s_cmalloc_bs_mallocd);
if (VG_(clo_verbosity) > 1)
- VG_(message)(Vg_DebugMsg, " ");
+ VG_(message)(Vg_DebugMsg, " \n");
}
/*--------------------------------------------------------------------*/
Modified: trunk/drd/drd_mutex.c
===================================================================
--- trunk/drd/drd_mutex.c 2009-07-15 14:48:32 UTC (rev 10465)
+++ trunk/drd/drd_mutex.c 2009-07-15 14:49:17 UTC (rev 10466)
@@ -92,7 +92,7 @@
if (s_trace_mutex)
{
VG_(message)(Vg_UserMsg,
- "[%d/%d] mutex_destroy %s 0x%lx rc %d owner %d",
+ "[%d/%d] mutex_destroy %s 0x%lx rc %d owner %d\n",
VG_(get_running_tid)(),
DRD_(thread_get_running_tid)(),
DRD_(mutex_get_typename)(p),
@@ -171,7 +171,7 @@
if (s_trace_mutex)
{
VG_(message)(Vg_UserMsg,
- "[%d/%d] mutex_init %s 0x%lx",
+ "[%d/%d] mutex_init %s 0x%lx\n",
VG_(get_running_tid)(),
DRD_(thread_get_running_tid)(),
DRD_(mutex_type_name)(mutex_type),
@@ -235,7 +235,7 @@
if (s_trace_mutex)
{
VG_(message)(Vg_UserMsg,
- "[%d/%d] %s %s 0x%lx rc %d owner %d",
+ "[%d/%d] %s %s 0x%lx rc %d owner %d\n",
VG_(get_running_tid)(),
DRD_(thread_get_running_tid)(),
trylock ? "pre_mutex_lock " : "mutex_trylock ",
@@ -290,7 +290,7 @@
if (s_trace_mutex)
{
VG_(message)(Vg_UserMsg,
- "[%d/%d] %s %s 0x%lx rc %d owner %d%s",
+ "[%d/%d] %s %s 0x%lx rc %d owner %d%s\n",
VG_(get_running_tid)(),
drd_tid,
post_cond_wait ? "cond_post_wait " : "post_mutex_lock",
@@ -328,7 +328,7 @@
VG_(message)(Vg_UserMsg,
"The impossible happened: mutex 0x%lx is locked"
" simultaneously by two threads (recursion count %d,"
- " owners %d and %d) !",
+ " owners %d and %d) !\n",
p->a1, p->recursion_count, p->owner, drd_tid);
p->owner = drd_tid;
}
@@ -359,7 +359,7 @@
if (s_trace_mutex)
{
VG_(message)(Vg_UserMsg,
- "[%d/%d] mutex_unlock %s 0x%lx rc %d",
+ "[%d/%d] mutex_unlock %s 0x%lx rc %d\n",
vg_tid,
drd_tid,
p ? DRD_(mutex_get_typename)(p) : "(?)",
@@ -388,7 +388,7 @@
tl_assert(p);
if (p->mutex_type != mutex_type)
{
- VG_(message)(Vg_UserMsg, "??? mutex 0x%lx: type changed from %d into %d",
+ VG_(message)(Vg_UserMsg, "??? mutex 0x%lx: type changed from %d into %d\n",
p->a1, p->mutex_type, mutex_type);
}
tl_assert(p->mutex_type == mutex_type);
Modified: trunk/drd/drd_rwlock.c
===================================================================
--- trunk/drd/drd_rwlock.c 2009-07-15 14:48:32 UTC (rev 10465)
+++ trunk/drd/drd_rwlock.c 2009-07-15 14:49:17 UTC (rev 10466)
@@ -211,7 +211,7 @@
if (DRD_(s_trace_rwlock))
{
VG_(message)(Vg_UserMsg,
- "[%d/%d] rwlock_destroy 0x%lx",
+ "[%d/%d] rwlock_destroy 0x%lx\n",
VG_(get_running_tid)(),
DRD_(thread_get_running_tid)(),
p->a1);
@@ -279,7 +279,7 @@
if (DRD_(s_trace_rwlock))
{
VG_(message)(Vg_UserMsg,
- "[%d/%d] rwlock_init 0x%lx",
+ "[%d/%d] rwlock_init 0x%lx\n",
VG_(get_running_tid)(),
DRD_(thread_get_running_tid)(),
rwlock);
@@ -337,7 +337,7 @@
if (DRD_(s_trace_rwlock))
{
VG_(message)(Vg_UserMsg,
- "[%d/%d] pre_rwlock_rdlock 0x%lx",
+ "[%d/%d] pre_rwlock_rdlock 0x%lx\n",
VG_(get_running_tid)(),
DRD_(thread_get_running_tid)(),
rwlock);
@@ -350,7 +350,7 @@
{
VG_(message)(Vg_UserMsg,
"reader-writer lock 0x%lx is already locked for"
- " writing by calling thread",
+ " writing by calling thread\n",
p->a1);
}
}
@@ -370,7 +370,7 @@
if (DRD_(s_trace_rwlock))
{
VG_(message)(Vg_UserMsg,
- "[%d/%d] post_rwlock_rdlock 0x%lx",
+ "[%d/%d] post_rwlock_rdlock 0x%lx\n",
VG_(get_running_tid)(),
drd_tid,
rwlock);
@@ -411,7 +411,7 @@
if (DRD_(s_trace_rwlock))
{
VG_(message)(Vg_UserMsg,
- "[%d/%d] pre_rwlock_wrlock 0x%lx",
+ "[%d/%d] pre_rwlock_wrlock 0x%lx\n",
VG_(get_running_tid)(),
DRD_(thread_get_running_tid)(),
rwlock);
@@ -452,7 +452,7 @@
if (DRD_(s_trace_rwlock))
{
VG_(message)(Vg_UserMsg,
- "[%d/%d] post_rwlock_wrlock 0x%lx",
+ "[%d/%d] post_rwlock_wrlock 0x%lx\n",
VG_(get_running_tid)(),
drd_tid,
rwlock);
@@ -494,7 +494,7 @@
if (DRD_(s_trace_rwlock))
{
VG_(message)(Vg_UserMsg,
- "[%d/%d] rwlock_unlock 0x%lx",
+ "[%d/%d] rwlock_unlock 0x%lx\n",
vg_tid,
drd_tid,
rwlock);
Modified: trunk/drd/drd_semaphore.c
===================================================================
--- trunk/drd/drd_semaphore.c 2009-07-15 14:48:32 UTC (rev 10465)
+++ trunk/drd/drd_semaphore.c 2009-07-15 14:49:17 UTC (rev 10466)
@@ -177,7 +177,7 @@
if (s_trace_semaphore)
{
VG_(message)(Vg_UserMsg,
- "[%d/%d] semaphore_init 0x%lx value %u",
+ "[%d/%d] semaphore_init 0x%lx value %u\n",
VG_(get_running_tid)(),
DRD_(thread_get_running_tid)(),
semaphore,
@@ -219,7 +219,7 @@
if (s_trace_semaphore)
{
VG_(message)(Vg_UserMsg,
- "[%d/%d] semaphore_destroy 0x%lx value %u",
+ "[%d/%d] semaphore_destroy 0x%lx value %u\n",
VG_(get_running_tid)(),
DRD_(thread_get_running_tid)(),
semaphore,
@@ -275,7 +275,7 @@
if (s_trace_semaphore)
{
VG_(message)(Vg_UserMsg,
- "[%d/%d] semaphore_wait 0x%lx value %u -> %u",
+ "[%d/%d] semaphore_wait 0x%lx value %u -> %u\n",
VG_(get_running_tid)(),
DRD_(thread_get_running_tid)(),
semaphore,
@@ -340,7 +340,7 @@
if (s_trace_semaphore)
{
VG_(message)(Vg_UserMsg,
- "[%d/%d] semaphore_post 0x%lx value %u -> %u",
+ "[%d/%d] semaphore_post 0x%lx value %u -> %u\n",
VG_(get_running_tid)(),
DRD_(thread_get_running_tid)(),
semaphore,
Modified: trunk/drd/drd_suppression.c
===================================================================
--- trunk/drd/drd_suppression.c 2009-07-15 14:48:32 UTC (rev 10465)
+++ trunk/drd/drd_suppression.c 2009-07-15 14:49:17 UTC (rev 10466)
@@ -61,7 +61,7 @@
{
if (DRD_(s_trace_suppression))
{
- VG_(message)(Vg_DebugMsg, "start suppression of 0x%lx sz %ld (%s)",
+ VG_(message)(Vg_DebugMsg, "start suppression of 0x%lx sz %ld (%s)\n",
a1, a2 - a1, reason);
}
@@ -74,7 +74,7 @@
{
if (DRD_(s_trace_suppression))
{
- VG_(message)(Vg_DebugMsg, "finish suppression of 0x%lx sz %ld",
+ VG_(message)(Vg_DebugMsg, "finish suppression of 0x%lx sz %ld\n",
a1, a2 - a1);
VG_(get_and_pp_StackTrace)(VG_(get_running_tid)(), 12);
}
@@ -82,7 +82,7 @@
tl_assert(a1 < a2);
if (! DRD_(is_suppressed)(a1, a2))
{
- VG_(message)(Vg_DebugMsg, "?? [0x%lx,0x%lx[ not suppressed ??", a1, a2);
+ VG_(message)(Vg_DebugMsg, "?? [0x%lx,0x%lx[ not suppressed ??\n", a1, a2);
VG_(get_and_pp_StackTrace)(VG_(get_running_tid)(), 12);
tl_assert(False);
}
@@ -148,7 +148,7 @@
{
VG_(message)(Vg_DebugMsg,
"stop_using_mem(0x%lx, %ld) finish suppression of"
- " 0x%lx", a1, a2 - a1, b);
+ " 0x%lx\n", a1, a2 - a1, b);
}
}
}
Modified: trunk/drd/drd_thread.c
===================================================================
--- trunk/drd/drd_thread.c 2009-07-15 14:48:32 UTC (rev 10465)
+++ trunk/drd/drd_thread.c 2009-07-15 14:49:17 UTC (rev 10466)
@@ -351,7 +351,7 @@
", new vc: %s", vc);
VG_(free)(vc);
}
- VG_(message)(Vg_DebugMsg, "%s", msg);
+ VG_(message)(Vg_DebugMsg, "%s\n", msg);
VG_(free)(msg);
}
@@ -584,7 +584,7 @@
{
VG_(message)(Vg_DebugMsg,
"Context switch from thread %d/%d to thread %d/%d;"
- " segments: %llu",
+ " segments: %llu\n",
s_vg_running_tid, DRD_(g_drd_running_tid),
DRD_(DrdThreadIdToVgThreadId)(drd_tid), drd_tid,
DRD_(sg_get_segments_alive_count)());
@@ -783,7 +783,7 @@
vc_min = DRD_(vc_aprint)(&thread_vc_min);
vc_max = DRD_(vc_aprint)(&thread_vc_max);
VG_(message)(Vg_DebugMsg,
- "Discarding ordered segments -- min vc is %s, max vc is %s",
+ "Discarding ordered segments -- min vc is %s, max vc is %s\n",
vc_min, vc_max);
VG_(free)(vc_min);
VG_(free)(vc_max);
@@ -973,7 +973,7 @@
char *str1, *str2;
str1 = DRD_(vc_aprint)(&DRD_(g_threadinfo)[joiner].last->vc);
str2 = DRD_(vc_aprint)(&DRD_(g_threadinfo)[joinee].last->vc);
- VG_(message)(Vg_DebugMsg, "Before join: joiner %s, joinee %s",
+ VG_(message)(Vg_DebugMsg, "Before join: joiner %s, joinee %s\n",
str1, str2);
VG_(free)(str1);
VG_(free)(str2);
@@ -1001,7 +1001,7 @@
{
char* str;
str = DRD_(vc_aprint)(&DRD_(g_threadinfo)[joiner].last->vc);
- VG_(message)(Vg_DebugMsg, "After join: %s", str);
+ VG_(message)(Vg_DebugMsg, "After join: %s\n", str);
VG_(free)(str);
}
}
@@ -1031,7 +1031,7 @@
char *str1, *str2;
str1 = DRD_(vc_aprint)(&old_vc);
str2 = DRD_(vc_aprint)(&DRD_(g_threadinfo)[tid].last->vc);
- VG_(message)(Vg_DebugMsg, "thread %d: vc %s -> %s", tid, str1, str2);
+ VG_(message)(Vg_DebugMsg, "thread %d: vc %s -> %s\n", tid, str1, str2);
VG_(free)(str1);
VG_(free)(str2);
}
@@ -1174,7 +1174,7 @@
{
const ThreadId vg_tid = DRD_(DrdThreadIdToVgThreadId)(tid);
- VG_(message)(Vg_UserMsg, "%s (thread %d/%d)", msg, vg_tid, tid);
+ VG_(message)(Vg_UserMsg, "%s (thread %d/%d)\n", msg, vg_tid, tid);
if (vg_tid != VG_INVALID_THREADID)
{
@@ -1190,7 +1190,7 @@
else
{
VG_(message)(Vg_UserMsg,
- " (thread finished, call stack no longer available)");
+ " (thread finished, call stack no longer available)\n");
}
}
@@ -1328,7 +1328,7 @@
str = DRD_(vc_aprint)(&DRD_(g_threadinfo)[tid].last->vc);
VG_(message)(Vg_DebugMsg,
- "computing conflict set for thread %d/%d with vc %s",
+ "computing conflict set for thread %d/%d with vc %s\n",
DRD_(DrdThreadIdToVgThreadId)(tid), tid, str);
VG_(free)(str);
}
@@ -1342,7 +1342,7 @@
char* vc;
vc = DRD_(vc_aprint)(&p->vc);
- VG_(message)(Vg_DebugMsg, "conflict set: thread [%d] at vc %s",
+ VG_(message)(Vg_DebugMsg, "conflict set: thread [%d] at vc %s\n",
tid, vc);
VG_(free)(vc);
}
@@ -1363,7 +1363,7 @@
str = DRD_(vc_aprint)(&q->vc);
VG_(message)(Vg_DebugMsg,
- "conflict set: [%d] merging segment %s",
+ "conflict set: [%d] merging segment %s\n",
j, str);
VG_(free)(str);
}
@@ -1377,7 +1377,7 @@
str = DRD_(vc_aprint)(&q->vc);
VG_(message)(Vg_DebugMsg,
- "conflict set: [%d] ignoring segment %s",
+ "conflict set: [%d] ignoring segment %s\n",
j, str);
VG_(free)(str);
}
@@ -1394,9 +1394,9 @@
if (s_trace_conflict_set_bm)
{
- VG_(message)(Vg_DebugMsg, "[%d] new conflict set:", tid);
+ VG_(message)(Vg_DebugMsg, "[%d] new conflict set:\n", tid);
DRD_(bm_print)(*conflict_set);
- VG_(message)(Vg_DebugMsg, "[%d] end of new conflict set.", tid);
+ VG_(message)(Vg_DebugMsg, "[%d] end of new conflict set.\n", tid);
}
}
@@ -1424,7 +1424,7 @@
str = DRD_(vc_aprint)(&DRD_(g_threadinfo)[tid].last->vc);
VG_(message)(Vg_DebugMsg,
- "updating conflict set for thread %d/%d with vc %s",
+ "updating conflict set for thread %d/%d with vc %s\n",
DRD_(DrdThreadIdToVgThreadId)(tid), tid, str);
VG_(free)(str);
}
@@ -1456,7 +1456,7 @@
str = DRD_(vc_aprint)(&q->vc);
VG_(message)(Vg_DebugMsg,
- "conflict set: [%d] merging segment %s", j, str);
+ "conflict set: [%d] merging segment %s\n", j, str);
VG_(free)(str);
}
DRD_(bm_mark)(DRD_(g_conflict_set), DRD_(sg_bm)(q));
@@ -1469,7 +1469,7 @@
str = DRD_(vc_aprint)(&q->vc);
VG_(message)(Vg_DebugMsg,
- "conflict set: [%d] ignoring segment %s", j, str);
+ "conflict set: [%d] ignoring segment %s\n", j, str);
VG_(free)(str);
}
}
@@ -1503,9 +1503,9 @@
if (s_trace_conflict_set_bm)
{
- VG_(message)(Vg_DebugMsg, "[%d] updated conflict set:", tid);
+ VG_(message)(Vg_DebugMsg, "[%d] updated conflict set:\n", tid);
DRD_(bm_print)(DRD_(g_conflict_set));
- VG_(message)(Vg_DebugMsg, "[%d] end of updated conflict set.", tid);
+ VG_(message)(Vg_DebugMsg, "[%d] end of updated conflict set.\n", tid);
}
tl_assert(thread_conflict_set_up_to_date(DRD_(g_drd_running_tid)));
Property changes on: trunk/drd/tests/boost_thread.cpp
___________________________________________________________________
Name: svn:mergeinfo
-
Property changes on: trunk/drd/tests/boost_thread.stderr.exp
___________________________________________________________________
Name: svn:mergeinfo
-
Property changes on: trunk/drd/tests/boost_thread.vgtest
___________________________________________________________________
Name: svn:mergeinfo
-
Property changes on: trunk/drd/tests/pth_barrier.c
___________________________________________________________________
Name: svn:mergeinfo
-
Property changes on: trunk/drd/tests/pth_cond_race3.stderr.exp
___________________________________________________________________
Name: svn:mergeinfo
-
Property changes on: trunk/drd/tests/pth_cond_race3.vgtest
___________________________________________________________________
Name: svn:mergeinfo
-
Property changes on: trunk/drd/tests/rwlock_race.c
___________________________________________________________________
Name: svn:mergeinfo
-
Property changes on: trunk/drd/tests/rwlock_test.c
___________________________________________________________________
Name: svn:mergeinfo
-
Property changes on: trunk/drd/tests/tc09_bad_unlock.stderr.exp-glibc2.8
___________________________________________________________________
Name: svn:mergeinfo
-
|