| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 | #!@BASH@# StarPU --- Runtime system for heterogeneous multicore architectures.## Copyright (C) 2008-2011,2013-2014                      Université de Bordeaux# Copyright (C) 2010,2013,2015,2017                      CNRS## StarPU is free software; you can redistribute it and/or modify# it under the terms of the GNU Lesser General Public License as published by# the Free Software Foundation; either version 2.1 of the License, or (at# your option) any later version.## StarPU is distributed in the hope that it will be useful, but# WITHOUT ANY WARRANTY; without even the implied warranty of# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.## See the GNU Lesser General Public License in COPYING.LGPL for more details.#PROGNAME=$0usage(){	echo "Offline tool to draw codelet profile over a traced execution"	echo ""	echo "Usage: $PROGNAME distrib.data codelet_name"	echo ""	echo "Options:"	echo "	-h, --help          display this help and exit"	echo "	-v, --version       output version information and exit"	echo ""	echo "Report bugs to <@PACKAGE_BUGREPORT@>"	exit 1}if [ "$1" = "-v" ] || [ "$1" = "--version" ] ; then    echo "$PROGNAME (@PACKAGE_NAME@) @PACKAGE_VERSION@"    exit 0fiif [ "$1" = "-h" ] || [ "$1" = "--help" ] || [ "$2" = "" ] ; then    usagefiinputfile=$1codelet_name=$2archlist=`< $inputfile grep "^$codelet_name	" | cut -f 2 | sort | uniq | xargs` # extract subfiles from the history filefor arch in $archlistdo		echo "Arch $arch"		grep "^$codelet_name	$arch" $inputfile > $inputfile.$archdone# create the gnuplot filegpfile=$inputfile.gpecho "#!/usr/bin/gnuplot -persist" 		> $gpfileecho "set term postscript eps enhanced color" 	>> $gpfileecho "set logscale x"				>> $gpfile echo "set logscale y"				>> $gpfile echo "set output \"$inputfile.eps\""		>> $gpfileecho "set key top left"				>> $gpfileecho "set xlabel \"Total data size\""		>> $gpfileecho "set ylabel \"Execution time (ms)\""	>> $gpfileecho -n "plot	" 				>> $gpfilefirst=1for arch in $archlistdo		if [ $first = 0 ] 		then			echo -n "  , " >> $gpfile		else			first=0		fi		echo -n " \"$inputfile.$arch\" using 3:5  title \"${codelet_name//_/\\\\_} arch $arch\"" >> $gpfiledone
 |