|
From: Hien Le <Hi...@me...> - 2008-03-07 21:07:55
|
Can the client-request mechanism be used to detect which Valgrind tool
is active?
I'm using client-requests in my source as follows:
if(RUNNING_ON_VALGRIND) {
// code that's easier to leak check
} else {
// normal code
}
The first block gives more accurate MemCheck results but is slow so I'd
like the "normal code" to execute if I'm using Callgrind.
Thanks,
Hien
|
|
From: Nicholas N. <nj...@cs...> - 2008-03-08 04:12:44
|
On Fri, 7 Mar 2008, Hien Le wrote: > Can the client-request mechanism be used to detect which Valgrind tool > is active? Interesting... I don't think so. Nick |
|
From: Robert W. <rj...@du...> - 2008-03-08 05:05:24
|
How about setting and then getting the validity bits? I haven't looked at the client requests in a while. Is this still possible? Regards, Robert. On Mar 7, 2008, at 8:12 PM, Nicholas Nethercote <nj...@cs...> wrote: > On Fri, 7 Mar 2008, Hien Le wrote: > >> Can the client-request mechanism be used to detect which Valgrind >> tool >> is active? > > Interesting... I don't think so. > > Nick > > --- > ---------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Valgrind-users mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-users |
|
From: Nicholas N. <nj...@cs...> - 2008-03-10 20:25:07
|
On Fri, 7 Mar 2008, Robert Walsh wrote: > How about setting and then getting the validity bits? I haven't > looked at the client requests in a while. Is this still possible? It is. At best, that would let you know if you're running Memcheck vs. a non-Memcheck tool. Nick |
|
From: Paul W. <pa...@bl...> - 2008-03-08 14:23:00
|
On Fri, Mar 07, 2008 at 01:07:59PM -0800, Hien Le wrote:
> if(RUNNING_ON_VALGRIND) {
> // code that's easier to leak check
> } else {
> // normal code
> }
Um... I don't know the answer, but doesn't running different code inside
Valgrind to when "live" kind of defeat the point of leak checking...?
--
Paul
|