#!/bin/bash

if [ $# -lt 2 ]
then
  echo ""
  echo "Usage: "
  echo ""
  echo "  $0 <path-to-TAU-data> <threshold>"
  echo ""
  echo "Notes:"
  echo ""
  echo "  * Specify the file as either the path to the TAU profiles, or the"
  echo "    filename of the packed TAU data."
  echo "  * If using gprof data, name the file gprof.out"
  echo ""
  exit 1
fi

working_path=`echo $0 | sed 's/getTopX//'`

# redirect stderr to /dev/null so we don't see garbage from Jython

eval perfexplorer -c perfexplorer_working -n -i ${working_path}topXexclusive.py -p "tauData=$1,threshold=$2" #2> /dev/null
