|
From: Julian S. <js...@ac...> - 2006-08-22 02:35:22
|
> A proof-of-concept version of drd is available at the following location:
Just trying it now.
> This version is not yet ready for a release -- e.g. it does not yet support
> floating-point instructions,
Huh? I guess you mean it does not handle the dirty helper calls used
for doing x87 80-bit loads/stores. I rewrote the Ist_Dirty case in
drd_instrument() in drd_main.c as shown below and that appears to fix
it (at least it does not die on fldt/fstpt). For the Ifx_Modify case
I called drd_trace_load and then drd_trace_store with the same args
since there is no drd_trace_modify function. Is that OK ?
So now, I can start konqueror and it runs for ~ 60 seconds
(doing fontconfig crap) but I had to control-C it before the konq
window appeared, due to memory use exceeding 450MB.
So it looks promising. At this point I have two questions:
(1) The memory use .. seems huge.
Can you say what it is that the memory use depends on?
Is there a worst-case bound?
Can the current behaviour be improved?
(2) Nick asked:
> What's the difference between detected and actual races?
>
The output of the drd tool is structured as follows:
- First the text "Detected data races. Context:".
[ ...]
So .. I read all this but still didn't understand what the
meaning of these phrases is. Can you clarify?
If the tool is to become popular we need to have a way to
explain to programmers in a simple way what it does and how
to interpret the results. I for one would like to know .. at
the moment all I know is that it finds data races by some
entirely mysterious means, and gives fewer false positives
than the Eraser style algorithms.
J
-----
Patch for drd_instrument() in drd_main.c to make x86 FP work:
(replaces entire previous Ist_Dirty case)
case Ist_Dirty:
{
IRDirty* d = st->Ist.Dirty.details;
IREffect const mFx = d->mFx;
switch (mFx) {
case Ifx_None:
break;
case Ifx_Read:
case Ifx_Write:
case Ifx_Modify:
tl_assert(d->mAddr);
tl_assert(d->mSize > 0);
argv = mkIRExprVec_2(d->mAddr, mkIRExpr_HWord(d->mSize));
if (mFx == Ifx_Read || mFx == Ifx_Modify) {
di = unsafeIRDirty_0_N(
/*regparms*/2,
"drd_trace_load",
VG_(fnptr_to_fnentry)(drd_trace_load),
argv);
addStmtToIRBB(bb, IRStmt_Dirty(di));
}
if (mFx == Ifx_Write || mFx == Ifx_Modify) {
di = unsafeIRDirty_0_N(
/*regparms*/2,
"drd_trace_store",
VG_(fnptr_to_fnentry)(drd_trace_store),
argv);
addStmtToIRBB(bb, IRStmt_Dirty(di));
}
break;
default:
tl_assert(0);
}
}
addStmtToIRBB(bb, st);
break;
|