7 # Replace pthread_create with pthread_create@* which is expected on Linux
8 s/pthread_create \(hg_intercepts.c:/pthread_create@* \(hg_intercepts.c:/g;
10 # ditto pthread_cond_destroy
11 s/pthread_cond_destroy \(hg_intercepts.c:/pthread_cond_destroy@* \(hg_intercepts.c:/g;
13 # ditto pthread_cond_timedwait
14 s/pthread_cond_timedwait \(hg_intercepts.c:/pthread_cond_timedwait@* \(hg_intercepts.c:/g;
17 [" by 0x\.{8}: pthread_create_WRK \(hg_intercepts.c:[0-9]{3,4}\)",
18 " by 0x.{8}: pthread_create\@\* \(hg_intercepts.c:[0-9]{3,4}\)",
19 " by 0x........: pthread_create@* \(hg_intercepts.c:...\)"
23 foreach my $item (@regex) {
24 my $just_saw_first_line;
28 if ($just_saw_first_line and not /^$item->[1]/) {
32 $just_saw_first_line = /^$item->[0]/;
37 # because of optimization, there's one less line in the callstack when VG is built with clang
38 # not this is a host difference, not a client one
39 #s/(0x........: pthread_create_WRK \(hg_intercepts.c:433\)\n)(?! by 0x........: pthread_create@\* \(hg_intercepts.c:472\))/$1 by 0x........: pthread_create@* (hg_intercepts.c:...)\n/;
40 #s/$ by 0x\.{8}: pthread_create_WRK \(hg_intercepts.c:[0-9]{3,4}\).(?! by 0x\.{8}: pthread_create@\* \(hg_intercepts.c:[0-9]{3,4}\))^/ by 0x........: pthread_create_WRK \(hg_intercepts.c:...\)\n by 0x........: pthread_create@* \(hg_intercepts.c:...\)\n/s;
42 #s/0x\.{8}: pthread_destroy_WRK \(hg_intercepts.c:[0-9]+\).(?! by 0x[0-9A-F]+: pthread_destroy@\* \(hg_intercepts.c:[0-9]+\))/0x........: pthread_destroy_WRK \(hg_intercepts.c:...\)\n by 0x........: pthread_destroy@* \(hg_intercepts.c:...\)\n/gms;
44 #s/0x\.{8}: pthread_cond_timedwait_WRK \(hg_intercepts.c:\.{3,4}\).(?! by 0x[0-9A-F]+: pthread_cond_timedwait@\* \(hg_intercepts.c:\.{3,4}\))/0x........: pthread_cond_timedwait_WRK \(hg_intercepts.c:...\)\n by 0x........: pthread_cond_timedwait@* \(hg_intercepts.c:...\)\n/gms;
46 #s/0x\.{8}: mutex_lock_WRK \(hg_intercepts.c:[0-9]+\).(?! by 0x\.{8}: pthread_mutex_lock \(hg_intercepts.c:[0-9]+\))/0x........: mutex_lock_WRK \(hg_intercepts.c:...\)\n by 0x........: pthread_mutex_lock \(hg_intercepts.c:...\)\n/gms;
48 #s/0x\.{8}: mutex_unlock_WRK \(hg_intercepts.c:.[0-9]+\).(?! by 0x\.{8}: pthread_mutex_unlock \(hg_intercepts.c:.[0-9]+\))/0x........: mutex_unlock_WRK \(hg_intercepts.c:...\)\n by 0x........: pthread_mutex_unlock \(hg_intercepts.c:...\)\n/gms;
50 #s/0x\.{8}: pthread_cond_wait_WRK \(hg_intercepts.c:.[0-9]+\).(?! by 0x\.{8}: pthread_cond_wait \(hg_intercepts.c:.[0-9]+\))/0x........: pthread_cond_wait_WRK (hg_intercepts.c:...)\n by 0x........: pthread_cond_wait (hg_intercepts.c:...)\n/gms;
52 #s/0x\.{8}: pthread_cond_signal_WRK \(hg_intercepts.c:[0-9]+\).(?! by 0x\.{8}: pthread_cond_signal \(hg_intercepts.c:....\))/0x........: pthread_cond_signal_WRK (hg_intercepts.c:...)\n by 0x........: pthread_cond_signal (hg_intercepts.c:...)\n/gms;
54 #s/0x\.{8}: sem_init_WRK \(hg_intercepts.c:.[0-9]+\).(?! by 0x\.{8}: sem_init \(hg_intercepts.c:.[0-9]+\))/0x........: sem_init_WRK (hg_intercepts.c:...)\n by 0x........: sem_init (hg_intercepts.c:...)\n/gms;
56 #s/0x\.{8}: sem_wait_WRK \(hg_intercepts.c:[0-9]+\).(?! by 0x\.{8}: sem_wait \(hg_intercepts.c:....\))/0x........: sem_wait_WRK (hg_intercepts.c:...)\n by 0x........: sem_wait (hg_intercepts.c:...)\n/gms;
58 #s/0x\.{8}: sem_post_WRK \(hg_intercepts.c:[0-9]+\).(?! by 0x\.{8}: sem_post \(hg_intercepts.c:.[0-9]+\))/0x........: sem_post_WRK (hg_intercepts.c:...)\n by 0x........: sem_post (hg_intercepts.c:...)\n/gms;
60 #s/0x\.{8}: sem_destroy_WRK \(hg_intercepts.c:[0-9]+\).(?! by 0x\.{8}: sem_destroy \(hg_intercepts.c:....\))/0x........: sem_destroy_WRK (hg_intercepts.c:...)\n by 0x........: sem_destroy (hg_intercepts.c:...)\n/gms;