On Wednesday 29 October 2008, Darryl Miles wrote: [...] I see what you're saying. However ...
> Then when VGs default scheduler selects the next thread to run there is > also another event simply to notify the custom scheduler this is > happening (for which the return value is ignored). you still seem to assume that Valgrind has some control over which thread runs next. And it doesn't. A long time ago, in versions prior to 2.2.0, V did do thread scheduling, by running all application threads in one OS-level thread, but those days are long gone. Nowadays, if an application creates N threads running natively, it will have N threads when running on Valgrind too. In that case, Valgrind is somewhat irrelevant. An equivalent problem (it seems to me) is this: for a threaded program running natively, how do you force the Linux kernel to run a thread of your choice next, when there is more than one runnable thread? I don't know how. You can do sys_yield(), but that's only a hint to the kernel; it doesn't _force_ anything to happen. FWIW, the ability to force the kernel to run one specific thread would really make some parts of Helgrind simpler, so it's not like I'm unmotivated to discover how to do so. Regarding Helgrind not finding threading bugs: we have now a pretty good understanding of the various race detection algorithms that have been implemented in the framework (helgrind-3.3, drd, helgrind-3.4, HGDEV branch) and their strengths and weaknesses. If you have some examples of cases where a race has not been detected, and you think it should have been, and you can condense it down to a manageable sized test program, I'd be interested to see it. J ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Valgrind-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/valgrind-users
