3 # Copyright (c) 2010, 2014. The SimGrid Team.
6 # This program is free software; you can redistribute it and/or modify it
7 # under the terms of the license (GNU LGPL) which comes with this package.
11 echo "Usage: $0 {X.trace}"
17 OUTPUT=`echo $TRACE | cut -d\. -f1`.fix.trace
19 cat $TRACE | grep ^% > header
20 DEFEVENTS=`cat header | grep Define | awk '{ print $3 }'`
27 GREP2="-e '^$i ' $GREP2"
29 GREP="/^%\ /d; /^%E/d; $GREP"
31 cat $TRACE | eval grep $GREP2 > types
32 /bin/sed -e "$GREP" $TRACE > events
33 cat events | sort -n -k 2 -s > events.sorted
34 cat header types events.sorted > $OUTPUT
35 rm types events events.sorted header
37 echo "output: $OUTPUT"