3 # Copyright (c) 2010-2019. The SimGrid Team. All rights reserved.
5 # This program is free software; you can redistribute it and/or modify it
6 # under the terms of the license (GNU LGPL) which comes with this package.
10 echo "Usage: $0 {X.trace}"
16 OUTPUT=$( echo $TRACE | cut -d\. -f1 ).fix.trace
18 grep ^% < $TRACE > header
19 DEFEVENTS=$(grep Define < header | awk '{ print $3 }')
26 GREP2="-e '^$i ' $GREP2"
28 GREP="/^%\ /d; /^% /d; /^%E/d; $GREP"
30 grep $GREP2 < $TRACE > types
31 /bin/sed -e "$GREP" $TRACE > events
32 sort -n -k 2 -s < events > events.sorted
33 cat header types events.sorted > $OUTPUT
34 rm types events events.sorted header
36 echo "output: $OUTPUT"