Re: [Valgrind-users] Optimization flags to speed unit tests running under valgrind

2018-11-05 Thread John Carter
Thanks for the replies...

Tweaking the optimization settings did very little for the running time.

However a huge difference (factor of 2) comes from taking out
--show-reachable=yes --track-origins=yes except they are very very
useful... so I sort of don't want to.


On Tue, Nov 6, 2018 at 9:43 AM Philippe Waroquiers <
philippe.waroqui...@skynet.be> wrote:

> On Sun, 2018-11-04 at 20:36 -0800, John Reiser wrote:
> > > What techniques can we employ to speed things up (whilst retaining
> most of the value)?
>
> > The memcheck option --expensive-definedness-checks= already defaults to
> 'no'.
> Note that it defaults to 'auto' in 3.14.
>
> > Specifying --redzone-size=8 might save 16 bytes of memory for each
> allocation,
> > which helps if there are many small allocations.  But default
> --alignment=16
> > is required for common SSE2 instructions [used by other glibc routines
> on the blocks,
> > etc.], and the redzone is not the only per-block overhead (see
> --keep-stacktraces=
> > and --num-callers=), so experimentation may be required.
> >
> > If all you care about is memory leaks, then experiment with
> --undef-value-errors=no
> > and even non-valgrind tools [such as mtrace (malloc trace)] that are
> specialized
> > for detecting leaks.
>
> You might look at the FOSDEM presentation
>  'Tuning Valgrind for your Workload
>  Hints, tricks and tips to effectively use Valgrind on small or big
>
>  applications'
> https://archive.fosdem.org/2015/schedule/event/valgrind_tuning/
>
> for other suggestions.
>
> Philippe
>
>
>
> ___
> Valgrind-users mailing list
> Valgrind-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/valgrind-users
>


-- 
John Carter
Phone : (64)(3) 358 6639
Tait Electronics
PO Box 1645 Christchurch
New Zealand

-- 
This Communication is Confidential. We only send and receive email on the

basis of the terms set out at www.taitradio.com/email_disclaimer 

___
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users


Re: [Valgrind-users] Missing debug symbols

2018-11-05 Thread Philippe Waroquiers
On Mon, 2018-11-05 at 15:30 -0500, Shahbaz Youssefi wrote:
> Looks like I was slightly too quick to ask this question. The issue
> seems to be coming from the way LLD produces debugging information,
> and adding --no-resegment to LLD fixes the issue:
> 
> https://bugs.chromium.org/p/chromium/issues/detail?id=830706

 Note that the above references valgrind bug 384727,
duplicate of 395682, which is fixed in valgrind 3.14.

So, if you upgrade to latest valgrind release, it should
work without --no-resegment.

Philippe



___
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users


Re: [Valgrind-users] Missing debug symbols

2018-11-05 Thread Shahbaz Youssefi
Looks like I was slightly too quick to ask this question. The issue
seems to be coming from the way LLD produces debugging information,
and adding --no-resegment to LLD fixes the issue:

https://bugs.chromium.org/p/chromium/issues/detail?id=830706
On Mon, Nov 5, 2018 at 3:24 PM Shahbaz Youssefi  wrote:
>
> Hi,
>
> I'm in the following situation and need help understanding why
> valgrind doesn't show debug symbols. First of all, I'm on Linux 4.15
> x86_64, valgrind 3.13.0. I'm running valgrind on ANGLE
> (angleproject.org). Normally, this library provides a .so file that I
> believe gets dynamically loaded, but a few of the tests statically
> link against this library.
>
> Verification #1: I can verify that the executable I'm running is
> statically linked because ldd doesn't show a dependency to the
> library.
>
> I know the debug symbols are there. The code is built with -g2.
>
> Verification #2: Running gdb on the execution and breaking shows the
> symbols. `nm -l` shows the symbols and their paths as well.
>
> However, the stack traces I get from valgrind are of the following form:
>
> ==1199==at 0x61F1F89: sched_setaffinity@@GLIBC_2.3.4
> (sched_setaffinity.c:35)
> ==1199==by 0x3B3D7F: ??? (in /path/to/angle_perftests)
> ==1199==by 0x326D02: ??? (in /path/to/angle_perftests)
> ==1199==by 0x38F6FC: ??? (in /path/to/angle_perftests)
> ==1199==by 0x39082F: ??? (in /path/to/angle_perftests)
> ==1199==by 0x390EC6: ??? (in /path/to/angle_perftests)
> ==1199==by 0x39CF86: ??? (in /path/to/angle_perftests)
> ==1199==by 0x39CAAB: ??? (in /path/to/angle_perftests)
> ==1199==by 0x37CB0D: ??? (in /path/to/angle_perftests)
> ==1199==by 0x610FB96: (below main) (libc-start.c:310)
> ==1199==  Address 0x1ffefff9c8 is on thread 1's stack
>
> This doesn't match any of the possible outputs in question 4.2 of the
> faq (http://valgrind.org/docs/manual/faq.html)!
>
> If I run readelf -s, then I can see that many of the symbols are
> marked as HIDDEN under the Vis column (something for which I can't
> seem to find any documentation).
>
> Can anybody make sense of what's going on, or has any idea why
> valgrind is unable to give me debug symbols?
>
> Cheers,


___
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users


[Valgrind-users] Missing debug symbols

2018-11-05 Thread Shahbaz Youssefi
Hi,

I'm in the following situation and need help understanding why
valgrind doesn't show debug symbols. First of all, I'm on Linux 4.15
x86_64, valgrind 3.13.0. I'm running valgrind on ANGLE
(angleproject.org). Normally, this library provides a .so file that I
believe gets dynamically loaded, but a few of the tests statically
link against this library.

Verification #1: I can verify that the executable I'm running is
statically linked because ldd doesn't show a dependency to the
library.

I know the debug symbols are there. The code is built with -g2.

Verification #2: Running gdb on the execution and breaking shows the
symbols. `nm -l` shows the symbols and their paths as well.

However, the stack traces I get from valgrind are of the following form:

==1199==at 0x61F1F89: sched_setaffinity@@GLIBC_2.3.4
(sched_setaffinity.c:35)
==1199==by 0x3B3D7F: ??? (in /path/to/angle_perftests)
==1199==by 0x326D02: ??? (in /path/to/angle_perftests)
==1199==by 0x38F6FC: ??? (in /path/to/angle_perftests)
==1199==by 0x39082F: ??? (in /path/to/angle_perftests)
==1199==by 0x390EC6: ??? (in /path/to/angle_perftests)
==1199==by 0x39CF86: ??? (in /path/to/angle_perftests)
==1199==by 0x39CAAB: ??? (in /path/to/angle_perftests)
==1199==by 0x37CB0D: ??? (in /path/to/angle_perftests)
==1199==by 0x610FB96: (below main) (libc-start.c:310)
==1199==  Address 0x1ffefff9c8 is on thread 1's stack

This doesn't match any of the possible outputs in question 4.2 of the
faq (http://valgrind.org/docs/manual/faq.html)!

If I run readelf -s, then I can see that many of the symbols are
marked as HIDDEN under the Vis column (something for which I can't
seem to find any documentation).

Can anybody make sense of what's going on, or has any idea why
valgrind is unable to give me debug symbols?

Cheers,


___
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users