Skip to content

Commit 0ff644b

Browse files
committed
hotfix: Remove TODO comments and implement backtrace checks for address line mapping in DXT_POSIX data handling
1 parent 7eb8211 commit 0ff644b

File tree

2 files changed

+10
-19
lines changed

2 files changed

+10
-19
lines changed

drishti/handlers/darshan_util.py

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -432,9 +432,8 @@ def name_records(self) -> Dict[int, str]:
432432

433433
@property
434434
def dxt_posix_df(self) -> Optional[pd.DataFrame]:
435-
# TODO
436-
# if parser.args.backtrace is False:
437-
# return None
435+
if parser.args.backtrace is False:
436+
return None
438437
assert "DXT_POSIX" in self.modules, "Missing DXT_POSIX module"
439438
dxt_posix_df = pd.DataFrame(self.report.records["DXT_POSIX"].to_df())
440439
return dxt_posix_df
@@ -447,10 +446,9 @@ def dxt_posix_read_df(self) -> Optional[pd.DataFrame]:
447446
df = self.dxt_posix_df
448447
assert df is not None, "Should be handled by parser.args.backtrace check"
449448

450-
# TODO
451-
# if "address_line_mapping" not in df:
452-
# parser.args.backtrace = False
453-
# return None
449+
if "address_line_mapping" not in df:
450+
parser.args.backtrace = False
451+
return None
454452

455453
read_id = []
456454
read_rank = []
@@ -506,10 +504,9 @@ def dxt_posix_write_df(self) -> Optional[pd.DataFrame]:
506504
df = self.dxt_posix_df
507505
assert df is not None, "Should be handled by parser.args.backtrace check"
508506

509-
# TODO
510-
# if "address_line_mapping" not in df:
511-
# parser.args.backtrace = False
512-
# return None
507+
if "address_line_mapping" not in df:
508+
parser.args.backtrace = False
509+
return None
513510

514511
write_id = []
515512
write_rank = []

drishti/handlers/handle_darshan.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -212,13 +212,9 @@ def handler():
212212
if "DXT_POSIX" in report.records:
213213
dxt_posix = report.records["DXT_POSIX"].to_df()
214214
dxt_posix = pd.DataFrame(dxt_posix)
215-
if False:
216-
# if "address_line_mapping" not in dxt_posix:
217-
# parser.args.backtrace = False # TODO
218-
print("Upper")
219-
pass
215+
if "address_line_mapping" not in dxt_posix:
216+
parser.args.backtrace = False
220217
else:
221-
print("ENTERED")
222218
read_id = []
223219
read_rank = []
224220
read_length = []
@@ -428,8 +424,6 @@ def handler():
428424

429425

430426
# module.check_small_operation(total_reads, total_reads_small, total_writes, total_writes_small, detected_files, modules, file_map, dxt_posix, dxt_posix_read_data, dxt_posix_write_data)
431-
parser.args.backtrace = True # TODO
432-
433427
module.check_small_operation(
434428
total_reads=darshan_file_obj.io_stats.get_module_ops(ModuleType.POSIX, "read"),
435429
total_reads_small=darshan_file_obj.posix_small_io.read,

0 commit comments

Comments
 (0)