pthread_rwlock_timedwrlock \
pthread_spin_lock \
pthread_yield \
+ pthread_setname_np \
readlinkat \
semtimedop \
signalfd \
[test x$ac_cv_func_pthread_mutex_timedlock = xyes])
AM_CONDITIONAL([HAVE_PTHREAD_SPINLOCK],
[test x$ac_cv_func_pthread_spin_lock = xyes])
+AM_CONDITIONAL([HAVE_PTHREAD_SETNAME_NP],
+ [test x$ac_cv_func_pthread_setname_np = xyes])
if test x$VGCONF_PLATFORM_PRI_CAPS = xMIPS32_LINUX \
-o x$VGCONF_PLATFORM_PRI_CAPS = xMIPS64_LINUX ; then
<file>drd_pthread_intercepts.c</file>
<line>...</line>
</frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>start_thread</fn>
- </frame>
</stack>
<auxwhat>Address 0x........ is at offset 0 from 0x.........</auxwhat>
<allocation_context>
wrap8.stdout.exp2 wrap8.stderr.exp2 \
writev1.stderr.exp writev1.vgtest \
xml1.stderr.exp xml1.stdout.exp xml1.vgtest xml1.stderr.exp-s390x-mvc \
- threadname.vgtest threadname.stdout.exp threadname.stderr.exp \
- threadname_xml.vgtest threadname_xml.stdout.exp \
- threadname_xml.stderr.exp
+ threadname.vgtest threadname.stderr.exp \
+ threadname_xml.vgtest threadname_xml.stderr.exp
check_PROGRAMS = \
accounting \
wcs \
xml1 \
wrap1 wrap2 wrap3 wrap4 wrap5 wrap6 wrap7 wrap7so.so wrap8 \
- writev1 \
- threadname
+ writev1
if DWARF4
check_PROGRAMS += dw4
check_PROGRAMS += stpncpy
endif
+if HAVE_PTHREAD_SETNAME_NP
+check_PROGRAMS += threadname
+endif
+
AM_CFLAGS += $(AM_FLAG_M3264_PRI)
AM_CXXFLAGS += $(AM_FLAG_M3264_PRI)
#! /bin/sh
+dir=`dirname $0`
+
./filter_stderr "$@" |
+$dir/../../tests/filter_xml_frames |
sed "s/<tid>[0-9]*<\/tid>/<tid>...<\/tid>/" |
sed "s/<pid>[0-9]*<\/pid>/<pid>...<\/pid>/" |
sed "s/<ppid>[0-9]*<\/ppid>/<ppid>...<\/ppid>/" |
-//#define _GNU_SOURCE
+#define _GNU_SOURCE
#include <stdio.h>
#include <pthread.h>
#include <string.h>
prog: threadname
+prereq: test -e ./threadname
vgopts: -q
<file>threadname.c</file>
<line>...</line>
</frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>start_thread</fn>
- <dir>...</dir>
- <file>pthread_create.c</file>
- <line>...</line>
- </frame>
</stack>
<auxwhat>Address 0x........ is 0 bytes after a block of size 2 alloc'd</auxwhat>
<stack>
<file>threadname.c</file>
<line>...</line>
</frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>start_thread</fn>
- <dir>...</dir>
- <file>pthread_create.c</file>
- <line>...</line>
- </frame>
</stack>
</error>
<file>threadname.c</file>
<line>...</line>
</frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>start_thread</fn>
- <dir>...</dir>
- <file>pthread_create.c</file>
- <line>...</line>
- </frame>
</stack>
<auxwhat>Address 0x........ is 0 bytes after a block of size 3 alloc'd</auxwhat>
<stack>
<file>threadname.c</file>
<line>...</line>
</frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>start_thread</fn>
- <dir>...</dir>
- <file>pthread_create.c</file>
- <line>...</line>
- </frame>
</stack>
</error>
<file>threadname.c</file>
<line>...</line>
</frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>start_thread</fn>
- <dir>...</dir>
- <file>pthread_create.c</file>
- <line>...</line>
- </frame>
</stack>
<auxwhat>Address 0x........ is 0 bytes after a block of size 4 alloc'd</auxwhat>
<stack>
<file>threadname.c</file>
<line>...</line>
</frame>
- <frame>
- <ip>0x........</ip>
- <obj>...</obj>
- <fn>start_thread</fn>
- <dir>...</dir>
- <file>pthread_create.c</file>
- <line>...</line>
- </frame>
</stack>
</error>
prog: threadname
+prereq: test -e ./threadname
vgopts: --xml=yes --xml-fd=2 --log-file=/dev/null
stderr_filter: filter_xml
filter_numbers \
filter_stderr_basic \
filter_sink \
+ filter_xml_frames \
platform_test \
vg_regtest
--- /dev/null
+#! /usr/bin/env perl
+
+# Remove <frame>.....</frame> containing an <obj> poining to
+# some system library.
+
+use strict;
+use warnings;
+
+my $in_frame = 0;
+my $frame = "";
+my $ignore_frame = 0;
+
+while (my $line = <>)
+{
+ if (! $in_frame) {
+ if ($line =~ /<frame>/) {
+ $frame = $line;
+ $in_frame = 1;
+ $ignore_frame = 0
+ } else {
+ print $line;
+ }
+ next;
+ }
+
+# We're in a frame
+ $frame .= $line;
+ if ($line =~ /<\/frame>/) {
+ if (! $ignore_frame) {
+ print $frame;
+ }
+ $in_frame = 0;
+ } else {
+# The may require tweaking; currently /lib and /usr/lib are matched
+ $ignore_frame = 1 if ($line =~ /<obj>\/lib/);
+ $ignore_frame = 1 if ($line =~ /<obj>\/usr\/lib/);
+ }
+}
+
+exit 0;