Adding rocprofilerv2

Change-Id: Ic0cc280ba207d2b8f6ccae1cd4ac3184152fc1ad


[ROCm/rocprofiler commit: 8032adb64f]
Tento commit je obsažen v:
Ammar ELWazir
2023-02-03 12:31:39 -06:00
rodič b23a2f3029
revize de4abd0d0f
263 změnil soubory, kde provedl 607729 přidání a 307 odebrání
+4
Zobrazit soubor
@@ -0,0 +1,4 @@
configure_file(run_asan_tests.sh ${PROJECT_BINARY_DIR}/tests/memorytests COPYONLY)
configure_file(suppr.txt ${PROJECT_BINARY_DIR}/tests/memorytests COPYONLY)
configure_file(test_mem.py ${PROJECT_BINARY_DIR}/tests/memorytests COPYONLY)
configure_file(input.txt ${PROJECT_BINARY_DIR}/tests/memorytests COPYONLY)
+1
Zobrazit soubor
@@ -0,0 +1 @@
pmc: SQ_WAVES GRBM_COUNT GRBM_GUI_ACTIVE SQ_INSTS_VALU
+9
Zobrazit soubor
@@ -0,0 +1,9 @@
#!/bin/bash
CURRENT_DIR="$( dirname -- "$0"; )";
export PATH=$rocmtoolsdir:$PATH
echo -e "Running Memory Leaks Check From ${CURRENT_DIR}"
LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libasan.so.6 ASAN_OPTIONS=detect_leaks=1 LSAN_OPTIONS=suppressions=$CURRENT_DIR/suppr.txt ${CURRENT_DIR}/../../rocprofv2 -i $CURRENT_DIR/input.txt $1 > /tmp/rocprofv2-temp 2> $2
echo -e "Log with all detected leaks is available at build/memleaks.log"
eval python3 $CURRENT_DIR/test_mem.py $2
+4
Zobrazit soubor
@@ -0,0 +1,4 @@
leak:amd_comgr
leak:hsa-runtime
leak:amdhip
leak:python
+22
Zobrazit soubor
@@ -0,0 +1,22 @@
import sys
file = open(sys.argv[1], 'r')
Lines = file.readlines()
count = 0
flag = 0
print("Leaks Detected:")
for line in Lines:
if "object(s) allocated from" in line:
flag = 0
if "rocprofiler/src" in line and flag == 0:
print(line)
count+=1
flag = 1
if count == 0:
print("No Leaks were found!")
else:
print("Warning: Found (" + str(count) + ") Memory Leaks related to rocprofiler project!")