|
From: Oliver S. <ol...@f-...> - 2011-01-03 14:45:51
Attachments:
signature.asc
|
Hi there, is there any way to run native code in Valgrind. We have one very memory intensive function that takes up the majority of time when loading our code, but it is checked separately and is known to be sane as of now. Is there a way to run this code at native speed instead of inside the emulation layer? Thanks and a happy new year to all of you, // Oliver |
|
From: John R. <jr...@bi...> - 2011-01-03 17:07:11
|
> Is there a way to run this code at native speed instead of inside the > emulation layer? Turn that app into a shell script which detects valgrind, then invokes the original compiled binary app (placed somewhere else in the filesystem) without valgrind. -- |
|
From: Oliver S. <ol...@f-...> - 2011-01-04 09:53:06
Attachments:
signature.asc
|
Hi John, thanks for your reply. On 2011-01-03 16:04, John Reiser wrote: > Turn that app into a shell script which detects valgrind, then invokes > the original compiled binary app (placed somewhere else in the filesystem) > without valgrind. This is not quite what I need. The problem is that this particular function is often taking up 90% or more of the runtime when run under Valgrind. So running that function at native or near-native speed would really help in testing. Basically what would be needed is that within this function any allocation gets reported to Valgrind so later it won't result in undefined access reports, but that this function otherwise runs on the CPU instead of inside VEX. Does such a facility exist? // Oliver |
|
From: Tom H. <to...@co...> - 2011-01-04 10:18:11
|
On 04/01/11 09:52, Oliver Schneider wrote: > Basically what would be needed is that within this function any > allocation gets reported to Valgrind so later it won't result in > undefined access reports, but that this function otherwise runs on the > CPU instead of inside VEX. It's not enough to report allocations - all writes would need to be reported so that memory state could be updated correctly. Otherwise when you went back to running on the real CPU you might get reports about uninitialised memory being used because valgrind didn't realise that the native code had initialised it. > Does such a facility exist? No, because it can't really work - valgrind needs to monitor the program all the time in order to understand it's state and be able to correctly detect and report errors. Tom -- Tom Hughes (to...@co...) http://compton.nu/ |
|
From: Konstantin S. <kon...@gm...> - 2011-01-06 08:50:51
|
On Mon, Jan 3, 2011 at 4:47 PM, Oliver Schneider <ol...@f-...> wrote: > Hi there, > > is there any way to run native code in Valgrind. We have one very memory > There is a bizare way to implement what you need. [If the function you are talking about can be ripped from your program and be put somewhere else] You can rebuild the valgrind binary to contain your function (and dependencies) and instead of calling your function from your code, call a valgrind client request (which you will have to implement too) that will in turn call your function. This is more or less like calling native code from Java via JNI. --kcc > intensive function that takes up the majority of time when loading our > code, but it is checked separately and is known to be sane as of now. Is > there a way to run this code at native speed instead of inside the > emulation layer? > > > Thanks and a happy new year to all of you, > > // Oliver > > > > ------------------------------------------------------------------------------ > Learn how Oracle Real Application Clusters (RAC) One Node allows customers > to consolidate database storage, standardize their database environment, > and, > should the need arise, upgrade to a full multi-node Oracle RAC database > without downtime or disruption > http://p.sf.net/sfu/oracle-sfdevnl > _______________________________________________ > Valgrind-users mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-users > > |
|
From: Oliver S. <ol...@f-...> - 2011-01-07 15:02:50
Attachments:
signature.asc
|
Hi, thanks for your advice. I'll see whether I can manage to implement that. Nice trick :) // Oliver |
|
From: WAROQUIERS P. <phi...@eu...> - 2011-01-11 18:31:20
|
But similarly to the previous comment of Tom, your application code you would integrate and link in "valgrind tool code" will need to ensure all "writes" are properly "recorded". So, it looks the same kind of work to do it in your own code, or do it inside valgrind. So, if your often called function is relatively simple, and you know which "write" operations it is doing, you might just have a piece of code (in your application) which first tells what is being written by the function (using the client request to make a piece of memory defined), and then use the client request VALGRIND_NON_SIMD_CALLx to call the code on the native cpu. This can only (reasonably) be done if the function is quite heavy in cpu, but does not do a (lot) of writes which needs to be tracked. Philippe >-----Original Message----- >From: Oliver Schneider [mailto:ol...@f-...] >Sent: Friday 7 January 2011 16:03 >To: val...@li... >Subject: Re: [Valgrind-users] Run native code? > >Hi, > >thanks for your advice. I'll see whether I can manage to >implement that. >Nice trick :) > > >// Oliver > > ____ This message and any files transmitted with it are legally privileged and intended for the sole use of the individual(s) or entity to whom they are addressed. If you are not the intended recipient, please notify the sender by reply and delete the message and any attachments from your system. Any unauthorised use or disclosure of the content of this message is strictly prohibited and may be unlawful. Nothing in this e-mail message amounts to a contractual or legal commitment on the part of EUROCONTROL, unless it is confirmed by appropriately signed hard copy. Any views expressed in this message are those of the sender. |