|
From: Florian K. <br...@ac...> - 2011-09-06 15:36:46
|
On 09/05/2011 04:35 PM, Julian Seward wrote: > >> The full callchain on s390 is something like >> pthread_create-->do_clone-->clone instead of pthread_create-->clone. >> As you can see, newer version of gcc even create multiple clones of >> do_clone (for partial inlining etc). the cleanest solution seems to me >> to change the --num-callers=3 in the vgtest to --num-callers=1. >> Otherwise I have to add at least 2 expect files to these tests. >> >> Opinions? > > I can't see any alternative to adding more expect files. Perhaps we can filter the output better. If I run helgrind/tests/locked_vs_unlocked1 with --num-callers=8 I see output like this. ==2080== Thread #3 was created ==2080== at 0x412B688: clone (clone.S:111) ==2080== by 0x40474BB: pthread_create@@GLIBC_2.1 (createthread.c:256) ==2080== by 0x402B51C: pthread_create_WRK (hg_intercepts.c:255) ==2080== by 0x402B5F5: pthread_create@* (hg_intercepts.c:286) ==2080== by 0x8048653: main (locked_vs_unlocked1.c:34) One could argue that the part of the back trace underneath pthread_create_WRK isn't really all that interesting for testing purposes. So if we filtered the above to yield ==2080== Thread #3 was created ==2080== by 0x402B51C: pthread_create_WRK (hg_intercepts.c:255) ==2080== by 0x402B5F5: pthread_create@* (hg_intercepts.c:286) ==2080== by 0x8048653: main (locked_vs_unlocked1.c:34) wouldn't that be good enough? It would get rid of the noise Christian mentioned and we wouldn't need different expect files (or could at least cut down on the number of those). Such a filter could take a list of function names and/or a list of file names and throw away all those back trace lines that do not match either a function or a file from those lists. That should be doable if perl is allowed in fiter scripts (which I presume is the case). Florian |