On Wednesday, December 19, 2012, Tomislav Janjusic wrote:
> Hi all,
>      Is there a mechanism built into Valgrind to detect when a context
> switch happens?

Yes.  You need to write (and register, at startup, with coregrind),
a pair of functions like  evh__start_client_code and evh__stop_client_code
in hg_main.c.  Then, the core will notify you of starting and stopping
of each thread, so you can figure out when the running thread changes.
At least, assuming the core's notification mechanism does this correctly :)

J

------------------------------------------------------------------------------
Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and
much more. Get web development skills now with LearnDevNow -
350+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122812
_______________________________________________
Valgrind-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to