Step 1: extract traces for LWP 23839
for d in f.*; do
echo $d; awk '/\(LWP 23839/,/^$/' $d;
done > all.f
Step 2: aggregate stacks for LWP 23839. This is a slight variant of standard PMP.
cat all.f | awk 'BEGIN { s = ""; } /^Thread/ { print s; s = ""; } /^\#/ { x=index($2, "0x"); if (x == 1) { n=$4 } else { n=$2 }; if (s != "" ) { s = s "," n} else { s = n } } END { print s }' - | sort | uniq -c | sort -r -n -k 1,1
No comments:
Post a Comment