Commit 460770cd authored by leon@uji.es's avatar leon@uji.es
Browse files

Cruzaitos

parent b7e5ba94
......@@ -693,6 +693,7 @@ def main():
'fault_models': [int(i) for i in str(conf.get('DEFAULT', 'faultModel')).split(',')],
'max_time': float(kernel_info_dict['max_time']) * float(conf.get('DEFAULT', 'maxWaitTimes')),
'end_time': float(kernel_info_dict['max_time_kernel']),
'max_regs': int(kernel_info_dict['max_regs']),
'iterations': each_thread_iterations,
'benchmark_binary': benchmark_binary,
'benchmark_args': conf.get('DEFAULT', 'benchmarkArgs'),
......@@ -718,7 +719,7 @@ def main():
for thread in gpus_threads:
thread.join()
ret += thread.exit_code
#ret += thread.exit_code
os.system("rm -f {}/bin/*".format(current_path))
if exit_injector:
......@@ -727,7 +728,7 @@ def main():
cf.printf("Fault injection finished, results can be found in {}".format(csv_file))
########################################################################
return res
return ret
########################################################################
# Main #
########################################################################
......
import os
import re
import gdb
import time
import common_functions as cf
def exit_handler(event):
global nosalir
nosalir=False
......@@ -18,8 +20,42 @@ Handler that will put a breakpoint on the kernel after
signal
"""
def selectrd():
linea= cf.execute_command(gdb=gdb, to_execute="x/1i $pc")
print (linea)#+"-"+str(len(linea))+"-"+linea[0])
print ("============")
lista=re.findall(r"R(\d+)", linea[0])
#Si no hay nexti
listareg=[" R{} ".format(x) for x in lista]
strlistareg="info registers "
for x in listareg:
strlistareg+=x;
print (strlistareg)
valores= cf.execute_command(gdb=gdb, to_execute=strlistareg)
print("===========VALORES==========")
regs={}
for x in valores:
print(x)
m = re.match(r".*R(\d+).*0x([0-9a-fA-F]+).*", x)
if m:
regs[m.group(1)]=m.group(2)
print (str(m.group(0))+" "+str(m.group(1)))
#Loop----
gdb.execute("nexti")
linea= cf.execute_command(gdb=gdb, to_execute="x/1i $pc")
valores= cf.execute_command(gdb=gdb, to_execute=strlistareg)
regdst={}
for x in valores:
print(x)
m = re.match(r".*R(\d+).*0x([0-9a-fA-F]+).*", x)
if m:
if (regs[m.group(1)]!=m.group(2))
regdst.add(m.group(1))
print (type(lista))
print(lista)
def set_event(event):
global trun,ocurrencias,t
if (isinstance(event, gdb.BreakpointEvent)):
......@@ -47,10 +83,16 @@ def main():
# Connecting to a stop signal event
gdb.events.stop.connect(set_event)
gdb.execute("file ~/rodinia_3.1/cuda/lud/cuda/lud_cuda")
gdb.execute("set arg -s 10000")
gdb.execute("break lud_cuda")
#gdb.execute("file ~/rodinia_3.1/cuda/lud/cuda/lud_cuda")
#gdb.execute("set arg -s 10000")
#gdb.execute("break lud_cuda")
gdb.execute("file codes/mmElem/matrixMul")
gdb.execute("set arg -wA=16384 -hA=16384 -hB=16384 -wB=16384")
gdb.execute("set cuda break_on_launch application")
gdb.execute('r')
selectrd()
nosalir=True
while nosalir:
gdb.execute("finish")
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment