minor changes;
Change-Id: I4266d6af1adef66637b3c971fa21c800240a79ef
[ROCm/rocprofiler commit: 9bdd497a51]
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
Copyright (c) 2018 Advanced Micro Devices, Inc. All rights reserved.
|
||||
[MITx11 License]
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
@@ -1,4 +1,25 @@
|
||||
#!/usr/bin/python
|
||||
################################################################################
|
||||
# Copyright (c) 2018 Advanced Micro Devices, Inc. All rights reserved.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
||||
################################################################################
|
||||
|
||||
from sqlitedb import SQLiteDB
|
||||
|
||||
def gen_message(outfile):
|
||||
|
||||
@@ -164,12 +164,11 @@ usage() {
|
||||
echo " --heartbeat <rate sec> - to print progress heartbeats [0 - disabled]"
|
||||
echo ""
|
||||
echo " --stats - generating kernel execution stats, file <output name>.stats.csv"
|
||||
echo " --roctx-trace - to enable rocTX trace"
|
||||
echo " --kfd-trace - to trace KFD, generates API execution stats and JSON file chrome-tracing compatible"
|
||||
echo " --hsa-trace - to trace HSA, generates API execution stats and JSON file chrome-tracing compatible"
|
||||
echo " --sys-trace - to trace HIP/HSA APIs and GPU activity, generates stats and JSON trace chrome-tracing compatible"
|
||||
echo " --hip-trace - to trace HIP, generates API execution stats and JSON file chrome-tracing compatible"
|
||||
echo " Generated files: <output name>.hsa_stats.txt <output name>.json"
|
||||
echo " --hsa-trace - to trace HSA, generates API execution stats and JSON file chrome-tracing compatible"
|
||||
echo " --kfd-trace - to trace KFD, generates API execution stats and JSON file chrome-tracing compatible"
|
||||
echo " Generated files: <output name>.<domain>_stats.txt <output name>.json"
|
||||
echo " Traced API list can be set by input .txt or .xml files."
|
||||
echo " Input .txt:"
|
||||
echo " hsa: hsa_queue_create hsa_amd_memory_pool_allocate"
|
||||
@@ -182,18 +181,26 @@ usage() {
|
||||
echo " --trace-start <on|off> - to enable tracing on start [on]"
|
||||
echo " --trace-period <dealy:length:rate> - to enable trace with initial delay, with periodic sample length and rate"
|
||||
echo " Supported time formats: <number(m|s|ms|us)>"
|
||||
echo ""
|
||||
echo " --roctx-trace - to enable rocTX applicatin code annotation trace; should be use in addition to the trace options above."
|
||||
echo " Will show the application code annotation with rocTX events: roctxMark, roctxRangePush, roctxRangePop in JSON trace"
|
||||
echo " \"Markers and Ranges\" section."
|
||||
echo " Application code needs to be explicitely instrumented using rocTX events APIs."
|
||||
echo " See roctracer documentation on rocTX API details."
|
||||
echo ""
|
||||
echo " --obj-tracking <on|off> - to turn on/off kernels code objects tracking [off]"
|
||||
echo ""
|
||||
echo "Configuration file:"
|
||||
echo " You can set your parameters defaults preferences in the configuration file 'rpl_rc.xml'. The search path sequence: .:${HOME}:<package path>"
|
||||
echo " First the configuration file is looking in the current directory, then in your home, and then in the package directory."
|
||||
echo " Configurable options: 'basenames', 'timestamp', 'ctx-limit', 'heartbeat'."
|
||||
echo " Configurable options: 'basenames', 'timestamp', 'ctx-limit', 'heartbeat', 'obj-tracking'."
|
||||
echo " An example of 'rpl_rc.xml':"
|
||||
echo " <defaults"
|
||||
echo " basenames=off"
|
||||
echo " timestamp=off"
|
||||
echo " ctx-limit=0"
|
||||
echo " heartbeat=0"
|
||||
echo " obj-tracking=off"
|
||||
echo " ></defaults>"
|
||||
echo ""
|
||||
exit 1
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
BIN_DIR=`dirname $0`
|
||||
BIN_DIR=`realpath $BIN_DIR`
|
||||
PKG_DIR=${BIN_DIR%/bin}
|
||||
|
||||
@@ -1,3 +1,25 @@
|
||||
################################################################################
|
||||
# Copyright (c) 2018 Advanced Micro Devices, Inc. All rights reserved.
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
# THE SOFTWARE.
|
||||
################################################################################
|
||||
|
||||
import csv, sqlite3, re, sys
|
||||
from functools import reduce
|
||||
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#!/usr/bin/python
|
||||
|
||||
################################################################################
|
||||
# Copyright (c) 2018 Advanced Micro Devices, Inc. All rights reserved.
|
||||
#
|
||||
|
||||
@@ -27,7 +27,7 @@ THE SOFTWARE.
|
||||
// The goal of the implementation is to provide a HW specific low-level
|
||||
// performance analysis interface for profiling of GPU compute applications.
|
||||
// The profiling includes HW performance counters (PMC) with complex
|
||||
// performance metrics and traces: SQTT, SPM.
|
||||
// performance metrics and traces.
|
||||
//
|
||||
// The library can be used by a tool library loaded by HSA runtime or by
|
||||
// higher level HW independent performance analysis API like PAPI.
|
||||
|
||||
@@ -154,14 +154,6 @@ HsaRsrcFactory::HsaRsrcFactory(bool initialize_hsa) : initialize_hsa_(initialize
|
||||
const uint32_t corr_iters = 1000;
|
||||
CorrelateTime(HsaTimer::TIME_ID_CLOCK_REALTIME, corr_iters);
|
||||
CorrelateTime(HsaTimer::TIME_ID_CLOCK_MONOTONIC, corr_iters);
|
||||
#if 0
|
||||
printf("ROCProfiler time CLOCK_REALTIME: shift(0x%016lx) error(0x%lx)\n",
|
||||
time_shift_[HsaTimer::TIME_ID_CLOCK_REALTIME],
|
||||
time_error_[HsaTimer::TIME_ID_CLOCK_REALTIME]);
|
||||
printf("ROCProfiler time CLOCK_MONOTONIC: shift(0x%016lx) error(0x%lx)\n",
|
||||
time_shift_[HsaTimer::TIME_ID_CLOCK_MONOTONIC],
|
||||
time_error_[HsaTimer::TIME_ID_CLOCK_MONOTONIC]);
|
||||
#endif
|
||||
|
||||
// System timeout
|
||||
timeout_ = (timeout_ns_ == HsaTimer::TIMESTAMP_MAX) ? timeout_ns_ : timer_->ns_to_sysclock(timeout_ns_);
|
||||
|
||||
Reference in New Issue
Block a user