From 1d55085060a383a56263a530c9cfb6c738bfbbae Mon Sep 17 00:00:00 2001 From: Evgeny Date: Thu, 8 Nov 2018 03:54:09 -0600 Subject: [PATCH] cosmetic changes Change-Id: Ie9c730305c8a882e250f28cc60d640c70d899572 --- bin/rpl_run.sh | 11 +++++------ bin/tblextr.py | 4 ++-- test/tool/tool.cpp | 7 ++++--- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/bin/rpl_run.sh b/bin/rpl_run.sh index f575e1ba25..ef97968d0d 100755 --- a/bin/rpl_run.sh +++ b/bin/rpl_run.sh @@ -27,7 +27,6 @@ BIN_DIR=`dirname $0` BIN_DIR=`cd $BIN_DIR; pwd` RUN_DIR=`pwd` TMP_DIR="/tmp" -DATA_PATH=$TMP_DIR DATA_DIR="rpl_data_${time_stamp}_$$" PKG_DIR=`echo $BIN_DIR | sed "s/\/bin\/*//"` @@ -200,6 +199,7 @@ if [ -z "$1" ] ; then fi INPUT_FILE="" +DATA_PATH="-" OUTPUT_DIR="-" output="" csv_output="" @@ -215,8 +215,7 @@ while [ 1 ] ; do elif [ "$1" = "-o" ] ; then output="$2" elif [ "$1" = "-d" ] ; then - OUTPUT_DIR="$2" - DATA_PATH=$OUTPUT_DIR + DATA_PATH=$2 elif [ "$1" = "-t" ] ; then TMP_DIR="$2" if [ "$OUTPUT_DIR" = "-" ] ; then @@ -287,8 +286,8 @@ else input_base=`basename $input_base` fi -if [ "$OUTPUT_DIR" = "--" ] ; then - fatal "Bad output dir '$OUTPUT_DIR'" +if [ "$DATA_PATH" = "-" ] ; then + DATA_PATH=$TMP_DIR fi if [ -n "$output" ] ; then @@ -309,9 +308,9 @@ echo "RPL: input file '$INPUT_FILE'" input_list="" RES_DIR="" if [ "$input_type" = "xml" ] ; then + OUTPUT_DIR=$DATA_PATH input_list=$INPUT_FILE elif [ "$input_type" = "txt" -o "$input_type" = "none" ] ; then - OUTPUT_DIR="-" RES_DIR=$DATA_PATH/$DATA_DIR if [ -e $RES_DIR ] ; then error "Rundir '$RES_DIR' exists" diff --git a/bin/tblextr.py b/bin/tblextr.py index 6a0f8eb2b7..87ecadd53f 100755 --- a/bin/tblextr.py +++ b/bin/tblextr.py @@ -45,7 +45,7 @@ def parse_res(infile): if not os.path.isfile(infile): fatal("Error: input file '" + infile + "' not found") inp = open(infile, 'r') - beg_pattern = re.compile("^dispatch\[(\d*)\], queue_index\(\d*\), kernel_name\(\"([^\"]*)\"\)") + beg_pattern = re.compile("^dispatch\[(\d*)\],.* kernel-name\(\"([^\"]*)\"\)") ts_pattern = re.compile(", time\((\d*),(\d*),(\d*),(\d*)\)") var_pattern = re.compile("^\s*([^\s]*)\s+\((\d*)\)") @@ -55,7 +55,7 @@ def parse_res(infile): m = var_pattern.match(record) if m: - if not dispatch_number in var_table: fatal("Error: dispatch number not unique '" + str(dispatch_number) + "'") + if not dispatch_number in var_table: fatal("Error: dispatch number not found '" + str(dispatch_number) + "'") var = m.group(1) val = m.group(2) var_table[dispatch_number][m.group(1)] = m.group(2) diff --git a/test/tool/tool.cpp b/test/tool/tool.cpp index ac9b7a28cd..0db9e290f7 100644 --- a/test/tool/tool.cpp +++ b/test/tool/tool.cpp @@ -413,12 +413,13 @@ bool dump_context_entry(context_entry_t* entry) { FILE* file_handle = entry->file_handle; const std::string nik_name = (to_truncate_names == 0) ? entry->data.kernel_name : filtr_kernel_name(entry->data.kernel_name); - fprintf(file_handle, "dispatch[%u], queue_index(%lu), kernel_name(\"%s\")", + fprintf(file_handle, "dispatch[%u], gpu-id(%u), queue-id(%u), queue-index(%lu), kernel-name(\"%s\")", index, + HsaRsrcFactory::Instance().GetAgentInfo(entry->agent)->dev_index, + entry->data.queue_id, entry->data.queue_index, nik_name.c_str()); - if (record) fprintf(file_handle, ", gpu-id(%u), time(%lu,%lu,%lu,%lu)", - HsaRsrcFactory::Instance().GetAgentInfo(entry->agent)->dev_index, + if (record) fprintf(file_handle, ", time(%lu,%lu,%lu,%lu)", record->dispatch, record->begin, record->end,