Skip to content

Commit

Permalink
Optimize dataframe accesses in generate_wildcard_faults
Browse files Browse the repository at this point in the history
  • Loading branch information
berkayurun authored and lukasauer committed May 2, 2023
1 parent f5dfb8a commit 92e027c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions goldenrun.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,17 +219,18 @@ def generate_wildcard_faults(fault, tbexec, tbinfo):
wildcard_range_end_reached = False
wildcard_local_active = False

tbinfo_tb_indexed = tbinfo.set_index("id")
for tb in tbexec["tb"]:
tb_hitcounters_analyzed = False
# Instruction-specific hitcounters
instr_hitcounters = []

# Get and update TB-specific hitcounter
tb_hitcounter = tb_hitcounters.loc[tb, "hitcounter"]
tb_hitcounters.loc[tb, "hitcounter"] += 1
tb_hitcounter = tb_hitcounters.at[tb, "hitcounter"]
tb_hitcounters.at[tb, "hitcounter"] += 1

# Iterate over instructions in the translation block
tb_info_asm = tbinfo.at[tbinfo.index[tbinfo["id"] == tb][0], "assembler"]
tb_info_asm = tbinfo_tb_indexed.at[tb, "assembler"]
tb_info_asm = tb_info_asm.split("[ ")

for i in range(1, len(tb_info_asm)):
Expand Down

0 comments on commit 92e027c

Please sign in to comment.