|
From: mohit t. <tew...@ya...> - 2007-12-03 09:26:41
|
Hi,
We wish to build a game-playing system where participants can run their
competing algorithms and get feedback on how many x86
instructions their program has taken for a move (for eg.). I was wondering if there is a way to invoke a (pre-decided) client function from within Valgrind.
The contestants could write a handler for when their program goes over limit, but valgrind should be able to call the handler when it discovers the threshold number of X86 instructions have passed. Can I program a VG tool to call a client function once it discovers an event has occurred?
Thanks,
Mohit
____________________________________________________________________________________
Be a better pen pal.
Text or chat with friends inside Yahoo! Mail. See how. http://overview.mail.yahoo.com/ |
|
From: Nicholas N. <nj...@cs...> - 2007-12-03 10:25:10
|
On Mon, 3 Dec 2007, mohit tewari wrote: > We wish to build a game-playing system where participants can run their > competing algorithms and get feedback on how many x86 > instructions their program has taken for a move (for eg.). I was wondering if there is a way to invoke a (pre-decided) client function from within Valgrind. > The contestants could write a handler for when their program goes over limit, but valgrind should be able to call the handler when it discovers the threshold number of X86 instructions have passed. Can I program a VG tool to call a client function once it discovers an event has occurred? I think you could... you'd use a client request that the program would have to call initially. You'd use this to register the callback function with the tool. Then the tool could call that function later on. Nick |