|
From: Nicholas N. <n.n...@gm...> - 2009-04-23 03:52:39
|
On Thu, Apr 23, 2009 at 1:10 PM, Nicholas Nethercote
<n.n...@gm...> wrote:
> Hi,
>
> Some time in the last few days, on my ubuntu box,
> helgrind/tests/tc19_shadowmem started running incredibly slowly under
> DRD. It used to take a few seconds, now it takes about 5 minutes. It
> happens with both 32-bit and 64-bit builds. It's still fast under
> Helgrind.
>
> Any other thoughts? It's pretty annoying because it makes the
> regtests difficult to run.
Doing some more investigation:
- the pthread_join() calls are slow
- they cause DRD_(thread_post_join) to be called
- within it, DRD_(finish_supression) is the slow part
- within it, DRD_(bm_clear_store) is the slow part
The DRD_(finish_suppression) call looks like this:
DRD_(finish_suppression)(DRD_(thread_get_stack_max)(drd_joinee)
- DRD_(thread_get_stack_size)(drd_joinee),
DRD_(thread_get_stack_max)(drd_joinee));
Those two arguments are exactly 8MB apart.
So it looks like the thread stacks are 8MB, which seems rather large
-- I thought the main stack was typically something like that size,
but that thread stacks were much smaller, maybe 64KB or something?
If I use ulimit to change the stack size to 512KB, it only takes about
13 seconds to run. If I change the stack size to 64KB, it only takes
about 2.7 seconds to run.
Could the thread stack size on my machine have changed spontaneously somehow?
Nick
|