|
From: Konstantin S. <kon...@gm...> - 2010-06-03 09:00:33
|
On Thu, Jun 3, 2010 at 1:04 PM, Julian Seward <js...@ac...> wrote: > >> With Valgrind it seems to be a bit trickier: if we call sleep() inside a >> helper function we will block the whole process because Valgrind is >> single-threaded. >> Question: how can I sleep in a helper function so that other threads get a >> chance to run? > > I don't think you can, unfortunately. I can't think of any remotely sane > way to do it. (Or even any insane ones). I see. So, we need to sleep in the instrumented code using the native program's sleep. This seems to work at some extent, but we had some problems (see the first message from Evgeniy). Do you have a code somewhere which inserts a native program's call into an IRSB? > > Really Valgrind needs to be made multithreaded, but that's a big job. Haha. PIN *is* multithreaded, and that is the biggest headache for me. But yes, I would love to have this headache with valgrind too :) :) --kcc > > J > |