Re: [Valgrind-users] RFC: changing Cachegrind default to `--cache-sim=no`

2023-04-04 Thread David Faure
On mardi 4 avril 2023 12:11:18 CEST Nicholas Nethercote wrote: > On Tue, 4 Apr 2023 at 19:24, David Faure wrote: > > But then, with no cache simulation and no call stacks, what's left in > > `cachegrind --cache-sim=no`? > > From the email that started this thread: > &g

Re: [Valgrind-users] RFC: changing Cachegrind default to `--cache-sim=no`

2023-04-04 Thread David Faure
On lundi 3 avril 2023 23:46:46 CEST Nicholas Nethercote wrote: > On Mon, 3 Apr 2023 at 21:36, David Faure wrote: > > But then, what's the difference between `cachegrind --cache-sim=no` > > and `callgrind`? > > > > https://accu.org/journals/overload/20/111/flo

Re: [Valgrind-users] RFC: changing Cachegrind default to `--cache-sim=no`

2023-04-03 Thread David Faure
gives more information about cache hit rates." Wouldn't one want callstacks? (if this means stack traces). I know I must be missing something, thanks for enlightening me. -- David Faure, fa...@kde.org, http://www.davidfaure.fr Working on KDE Frameworks 5 _

Re: [Valgrind-users] Helgrind causing data race warning in mutex_destroy_WRK?

2021-08-17 Thread David Faure
epts.c:398) > ==17922==by 0x57F4143: start_thread (pthread_create.c:477) > > To me it seems that Helgrind itself is causing the warning when calculating > mutex_is_init (hg_intercepts.c:859). Isn't this rather a race between unlocking a mutex and

Re: [Valgrind-users] How to find memory leaks from an running application

2019-06-20 Thread David Faure
then you should give > https://github.com/hyc/mleak/ a try. It is faster than all other memory > leak detectors out there, fast enough to run in production. And you can > send it a periodic signal to get a snapshot of currently allocated memory. Or, for another LD_PRELOAD-based tool with a

Re: [Valgrind-users] Valgrind Finds More Dynamic Allocations than Inte Pin

2019-02-08 Thread David Faure
t; But heaptrack even reports a larger number: 153 MB! > > On Fri, Feb 8, 2019 at 8:09 PM David Faure wrote: > > On vendredi 8 février 2019 16:32:50 CET Ahmad Nouralizadeh wrote: > > > Hi, > > > I wrote a really simple Pin tool to calculate the number of dynamically >

Re: [Valgrind-users] Valgrind Finds More Dynamic Allocations than Inte Pin

2019-02-08 Thread David Faure
ou're on Linux, I recommend using heaptrack for this :-) https://github.com/KDAB/heaptrack This doesn't really answer your question, sorry about that, but you might want to see which of those tools heaptrack agrees with, it might help finding out who is wrong... -- David Faure, fa...@kde.org, http:

[Valgrind-users] Suggestion for vgdb

2018-11-19 Thread David Faure
I understand the architecture correctly, this should be possible to implement, right? -- David Faure | david.fa...@kdab.com | Managing Director KDAB France KDAB (France) S.A.S., a KDAB Group company Tel. France +33 (0)4 90 84 08 53, http://www.kdab.fr KDAB -

Re: [Valgrind-users] helgrind and c++ atomic_flag

2018-09-25 Thread David Faure
ing-list ;-) I admit I'm much less of a helgrind fan since tsan started to work well. -- David Faure, fa...@kde.org, http://www.davidfaure.fr Working on KDE Frameworks 5 ___ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users

Re: [Valgrind-users] Valgrind hangs when generating supression for Qt5 menus

2017-07-14 Thread David Faure
grabbing keyboard/mouse on X11? You can disable this by passing -nograb to the application. > Is there any way to set valgrind to automatically generate suppression code > instead of prompting? Yes, --gen-suppressions=all -- David Faure, fa...@kde.org, http://www.david

Re: [Valgrind-users] Many false positives "Mismatched free() / delete / delete []"

2016-12-22 Thread David Faure
_ALIAS_SYMBOL(ShimCppNew); This is why it didn't happen in smaller testcases, it only happens when including some qtwebengine headers. => No valgrind bug, sorry for the noise. I am now going to yell at the qtwebengine/chromium people for polluting applications with their custom operator new... --

Re: [Valgrind-users] Many false positives "Mismatched free() / delete / delete []"

2016-12-22 Thread David Faure
llocations hits this. I've seen it before in other programs though so it's not specific to that test either. -- David Faure, fa...@kde.org, http://www.davidfaure.fr Working on KDE Frameworks 5 -- Developer Access Program

Re: [Valgrind-users] Many false positives "Mismatched free() / delete / delete []"

2016-12-22 Thread David Faure
QWidget *parent) : QBoxLayout(TopToBottom, parent) { } QBoxLayout::QBoxLayout(Direction dir, QWidget *parent) : QLayout(*new QBoxLayoutPrivate, 0, parent) { d->dir = dir; } -- David Faure, fa...@kde.org, http://www.davidfaure.fr Working o

[Valgrind-users] Many false positives "Mismatched free() / delete / delete []"

2016-12-22 Thread David Faure
? gcc (SUSE Linux) 4.8.5 valgrind-3.13.0.SVN glibc-2.22-3.7.x86_64 `uname -a` = Linux 4.4.36-8-default #1 SMP Fri Dec 9 16:18:38 UTC 2016 (3ec5648) x86_64 x86_64 x86_64 GNU/Linux OpenSuSE Leap 42.2 -- David Faure, fa...@kde.org, http://www.davidfaure.fr Working on KDE Frameworks 5

[Valgrind-users] helgrind: false race positive with static variable in function

2016-03-30 Thread David Faure
es used internally in libstdc++? -- David Faure, fa...@kde.org, http://www.davidfaure.fr Working on KDE Frameworks 5 -- Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Ac

Re: [Valgrind-users] helgrind, clang and thread_local

2016-03-22 Thread David Faure
re this for now. Thanks! -- David Faure, fa...@kde.org, http://www.davidfaure.fr Working on KDE Frameworks 5 -- Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Accel

[Valgrind-users] helgrind, clang and thread_local

2016-03-19 Thread David Faure
ercepts.c:389) ==1218== Address 0x1e1f86f0 is in a rw- anonymous segment Helgrind bug, or is clang silently ignoring thread_local? -- David Faure, fa...@kde.org, http://www.davidfaure.fr Working on KDE Frameworks 5 --

Re: [Valgrind-users] memory barriers support

2014-08-19 Thread David Faure
to describe the happens before relationships. Are such annotations documented somewhere? I'm still trying to find a way to annotate threadsafe-statics so that helgrind doesn't complain about them. -- David Faure, fa...@kde.org, http://www.davidfaure.fr Working on KDE Frameworks 5

Re: [Valgrind-users] helgrind and threadsafe-statics

2014-06-20 Thread David Faure
already encapsulated in a macro, and I just need a way to remove all these false positives in order for helgrind to be usable. -- David Faure, fa...@kde.org, http://www.davidfaure.fr Working on KDE Frameworks 5 -- HPCC

[Valgrind-users] helgrind and threadsafe-statics

2014-06-08 Thread David Faure
==by 0x4C2D151: mythread_wrapper (hg_intercepts.c:233) ==31469==by 0x4E3C0DA: start_thread (pthread_create.c:309) ==31469==by 0x595B90C: clone (clone.S:111) -- David Faure, fa...@kde.org, http://www.davidfaure.fr Working on KDE Frameworks 5 #include pthread.h #include stdio.h // gcc is supposed

Re: [Valgrind-users] Beginner hg question: mapping address to the variable

2014-01-18 Thread David Faure
. -- David Faure, fa...@kde.org, http://www.davidfaure.fr Working on KDE, in particular KDE Frameworks 5 -- CenturyLink Cloud: The Leader in Enterprise Cloud Services. Learn Why More Businesses Are Choosing CenturyLink Cloud

Re: [Valgrind-users] valgrind with shell scripts

2014-01-14 Thread David Faure
Will valgrind evaluate the shell script or my app or both? The shell script. Better modify the shell script itself to call valgrind :) But you can also use the above command with --trace-children=yes and then it will trace all children, including your app. -- David Faure, fa...@kde.org, http

Re: [Valgrind-users] Best valgrind options for finding corrupt memory

2014-01-14 Thread David Faure
for detecting memory corruption? The default options :-) (memcheck tool) -- David Faure, fa...@kde.org, http://www.davidfaure.fr Working on KDE, in particular KDE Frameworks 5 -- CenturyLink Cloud: The Leader in Enterprise

Re: [Valgrind-users] Helgrind 3.9.0: false positive with pthread_mutex_destroy

2013-11-07 Thread David Faure
? This was not a problem with 3.8.1 so appears to be a regression or new bug. ... or a fix, which detects an actual problem in the code :) -- David Faure, fa...@kde.org, http://www.davidfaure.fr Working on KDE, in particular KDE Frameworks 5

Re: [Valgrind-users] Limiting helgrind to finding only write-write conflicts

2013-10-13 Thread David Faure
be missing suppressions for atomic_int (the same way I'm using suppressions for Qt's QAtomicInt) - since on the special case of x86, the two can't be distinguished by helgrind. -- David Faure, fa...@kde.org, http://www.davidfaure.fr Working on KDE, in particular KDE Frameworks 5

Re: [Valgrind-users] FW: Helgrind to-do list

2013-09-28 Thread David Faure
On Friday 27 September 2013 17:51:19 Phil Longstaff wrote: From: David Faure [mailto:fa...@kde.org] Sent: Friday, September 27, 2013 11:18 AM To: Phil Longstaff Cc: valgrind-users@lists.sourceforge.net Subject: Re: [Valgrind-users] FW: Helgrind to-do list On Friday 27 September 2013

Re: [Valgrind-users] FW: Helgrind to-do list

2013-09-27 Thread David Faure
much easier to just drop failed trylocks and only remember successful ones, but yes, one can refine that for the case above, i.e. when the failed-trylock is the last thing in the chain. If anything happens *after* a failed trylock, then one can't store a T1 - anything link. -- David Faure, fa

[Valgrind-users] helgrind: race with no other thread ?

2013-06-22 Thread David Faure
:242) ==11756== valgrind-3.9.0.SVN, freshly updated. -- David Faure, fa...@kde.org, http://www.davidfaure.fr Working on KDE, in particular KDE Frameworks 5 -- This SF.net email is sponsored by Windows: Build

Re: [Valgrind-users] Helgrind data race question

2013-05-16 Thread David Faure
be something else than 10 ... but if you think about a multi-processor system, the write of the value 10 might not get propagated to the cache of the other processor where the read happens, since the system had no reason to perform that synchronisation. -- David Faure, fa...@kde.org, http

Re: [Valgrind-users] Fw: valgrind on armv71 does not show point of allocation and deallocation

2013-04-03 Thread David Faure
On Wednesday 03 April 2013 20:59:23 Ganapathy Vijay wrote: I have compiled this code with the arm linux cross compiler (ofcourse with -g). Did you also disable optimizations? Make sure -O2 isn't in there. Otherwise the call to free() can get inlined, for instance. -- David Faure, fa

Re: [Valgrind-users] Helgrind doesn't handle bit field correctly

2013-03-22 Thread David Faure
to make these separate memory locations. I have no idea how compilers are supposed to implement this though. Maybe like gcc's __sync_fetch_and_{or|and} which is an atomic operation... Anyway -- this requires a (compliant) C++11-enabled compiler. -- David Faure, fa...@kde.org, http

[Valgrind-users] helgrind bug in pthread_cond_destroy (testcase)

2013-03-14 Thread David Faure
@* (hg_intercepts.c:958) ==4741==by 0x400AFC: main (testcase_pthread_cond.cpp:21) ==4741== pthread_cond_destroy 0xffefff390 in helgrind, AFTER DO_ and before CALL_ pthread_cond_destroy(0xffefff390) said 0 -- David Faure, fa...@kde.org, http://www.davidfaure.fr Working on KDE, in particular KDE

Re: [Valgrind-users] Qt5 support in helgrind

2013-01-23 Thread David Faure
for now. Once you have a patch you're satisfied with, I'd be happy to commit it. Please find the patch attached. -- David Faure, fa...@kde.org, http://www.davidfaure.fr Working on KDE, in particular KDE Frameworks 5 Index: hg_intercepts.c

Re: [Valgrind-users] helgrind and atomic operations

2013-01-23 Thread David Faure
7, 8 @@ -403,6 +404,7 @@ _ZN10QAtomicOpsIiE12storeReleaseERii: movq-8(%rbp), %rax movl-12(%rbp), %edx movl%edx, (%rax) + mfence popq%rbp .cfi_def_cfa 7, 8 ret -- David Faure, fa...@kde.org, http://www.davidfaure.fr Working

Re: [Valgrind-users] helgrind and atomic operations

2013-01-19 Thread David Faure
it be OK to ship a qt5.supp file within valgrind, and load it unconditionnally, like xfree-4.supp is currently handled? -- David Faure, fa...@kde.org, http://www.davidfaure.fr Working on KDE, in particular KDE Frameworks 5

Re: [Valgrind-users] helgrind/drd annotations for one statement

2012-12-05 Thread David Faure
Williams, it taught me a lot on all this all works... definitely not a simple topic. -- David Faure, fa...@kde.org, http://www.davidfaure.fr Working on KDE, in particular KDE Frameworks 5 -- LogMeIn Rescue: Anywhere

Re: [Valgrind-users] helgrind/drd annotations for one statement

2012-12-05 Thread David Faure
On Wednesday 05 December 2012 16:52:42 Leif Walsh wrote: Rdunlock happens before wrlock. ... and is supposed to be about reading only, so why would CPUs bother to propagate modified data inside that lock, to other CPUs? -- David Faure, fa...@kde.org, http://www.davidfaure.fr Working on KDE

Re: [Valgrind-users] RFC: more flexible way to show or count as error or suppress leak kinds

2012-11-30 Thread David Faure
On Thursday 29 November 2012 23:35:03 Philippe Waroquiers wrote: On Thu, 2012-11-29 at 08:44 +0100, David Faure wrote: Here are the new command lines args: --show-leak-kinds=kind1,kind2,.. which leak kinds to show? [definite

Re: [Valgrind-users] RFC: more flexible way to show or count as error or suppress leak kinds

2012-11-28 Thread David Faure
for definite? -- David Faure, fa...@kde.org, http://www.davidfaure.fr Working on KDE, in particular KDE Frameworks 5 -- Keep yourself connected to Go Parallel: VERIFY Test and improve your parallel project with help from

Re: [Valgrind-users] helgrind markup for lock-ordering

2012-11-07 Thread David Faure
On Tuesday 06 November 2012 22:56:32 Philippe Waroquiers wrote: On Tue, 2012-11-06 at 13:43 +0100, David Faure wrote: On Monday 05 November 2012 23:19:42 Philippe Waroquiers wrote: On Mon, 2012-11-05 at 18:59 +0100, David Faure wrote: The testcase http://www.davidfaure.fr/2012

Re: [Valgrind-users] helgrind markup for lock-ordering

2012-11-07 Thread David Faure
On Wednesday 07 November 2012 23:00:51 Philippe Waroquiers wrote: On Wed, 2012-11-07 at 10:51 +0100, David Faure wrote: The idea of helgrind is that it detects lock order problems and/or race condition problems *even* if no deadlock happens and/or if no race condition really happened

Re: [Valgrind-users] helgrind markup for lock-ordering

2012-11-06 Thread David Faure
On Monday 05 November 2012 23:19:42 Philippe Waroquiers wrote: On Mon, 2012-11-05 at 18:59 +0100, David Faure wrote: The testcase http://www.davidfaure.fr/2012/qmutex_trylock.cpp (from https://bugs.kde.org/show_bug.cgi?id=243232) shows that an optimization inside Qt leads to a helgrind

Re: [Valgrind-users] helgrind and atomic operations

2012-10-24 Thread David Faure
version of my patch attached -- no re-ENABLE for now, since it doesn't work anyway ;) -- David Faure, fa...@kde.org, http://www.davidfaure.fr Working on KDE, in particular KDE Frameworks 5 #include pthread.h #include stdio.h #include /d/other/inst/include/valgrind/helgrind.h template typename T

Re: [Valgrind-users] closing bracket of destructor

2012-10-02 Thread David Faure
. -- David Faure, fa...@kde.org, http://www.davidfaure.fr Working on KDE, in particular KDE Frameworks 5 -- Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management

Re: [Valgrind-users] Large application SIGSEGV when run in valgrind

2012-10-02 Thread David Faure
at these two lines, say? Unless valgrind is wrong, something funky is being done by that code, so it might help to see what it's doing. -- David Faure, fa...@kde.org, http://www.davidfaure.fr Working on KDE, in particular KDE Frameworks 5

[Valgrind-users] Fwd: Re: helgrind and atomic operations

2012-08-28 Thread David Faure
-- Forwarded Message -- Subject: Re: [Valgrind-users] helgrind and atomic operations Date: Monday 27 August 2012, 15:25:14 From: Marc Mutz marc.m...@kdab.com To: David Faure fa...@kde.org CC: valgrind-users@lists.sourceforge.net [I can't post to valgrind-users, please fwd

Re: [Valgrind-users] helgrind and atomic operations

2012-08-27 Thread David Faure
On Sunday 26 August 2012 12:53:41 Marc Mutz wrote: On Sunday August 26 2012, David Faure wrote: On Sunday 26 August 2012 11:28:06 Julian Seward wrote: On Sunday, August 26, 2012, David Faure wrote: Thiago expects that helgrind can't autodetect this case and that helgrind- macros

Re: [Valgrind-users] helgrind and atomic operations

2012-08-26 Thread David Faure
On Sunday 26 August 2012 01:30:43 David Faure wrote: On Saturday 25 August 2012 22:43:58 Julian Seward wrote: Or maybe Qt really is racey Bingo :) OK, maybe not. Turns out the code runs as intended by the Qt developers. Marc Mutz said The standard says it's racy, but the implementation

Re: [Valgrind-users] helgrind and atomic operations

2012-08-26 Thread David Faure
On Sunday 26 August 2012 11:28:06 Julian Seward wrote: On Sunday, August 26, 2012, David Faure wrote: Thiago expects that helgrind can't autodetect this case and that helgrind- macros markup is needed in Qt, I'm fine with adding that if you guys agree -- after you show me how by modifying

[Valgrind-users] helgrind and atomic operations

2012-08-25 Thread David Faure
presume all this is too low-level for helgrind? I.e. can it actually detect atomic operations and therefore validate Qt's implementation, or should we rather just trust Qt and aim for silencing helgrind whenever it sees QBasicAtomic{Integer,Pointer}? -- David Faure, fa...@kde.org, http