|
From: Augusto V. <aug...@si...> - 2005-08-02 21:34:01
|
Content-Transfer-Encoding: 7bit Thanks Tom. Actually, 2.4.0 is the Valgrind version I'm working on. I think I know what is happening (timing problem). Client pthreads finish too fast, so Valgrind reuse the entry in vg_threads[]. Which version has a complete and well-tested thread state modeling? I appreciate your help, Augusto Tom Hughes wrote: > In message <b2e...@lo...> > Tom Hughes <to...@co...> wrote: > > >>In message <42E...@si...> >> Augusto Vega <aug...@si...> wrote: >> >> >>>I've some C helpers, which are called from instrumentation code. Inside >>>helpers, I call VG_(get_running_tid), which always return thread ids >>>between 1 and 3 (never mind how many pthreads the client program had). >> >>What version of valgrind are we alking about here? >> >> >>>I thought it was some problem with VG_(get_running_tid), so I >>>registered (in my tool) a callback function to be notified (from core) >>>on thread switchings. But, the same problem occurs. >> >>If that's the thread_run event then note that it wasn't being called >>in the valgrind 3 code until the other day. > > > I guess you must be talking about the 2.4.0 code though, as it > looks like VG_(get_running_tid) doesn't work in the 3.0 code at > the moment as it is part of the thread state modelling. > > In fact even in 2.4.0 it may not be that reliable as the thread > state modelling wasn't complete or well tested. > > Tom > |