Skip to content

Commit

Permalink
- fixed bug attempting to clear mmap'ed data while running --cpu-only;
Browse files Browse the repository at this point in the history
  • Loading branch information
jaltmayerpizzorno committed Jun 29, 2021
1 parent cb04356 commit eaaf484
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions scalene/scalene_profiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -1105,9 +1105,10 @@ def should_trace(filename: str) -> bool:

@staticmethod
def clear_mmap_data() -> None:
while Scalene.read_malloc_mmap(): pass
if Scalene.__memcpy_signal_mmap:
while Scalene.read_memcpy_mmap(): pass
if not Scalene.__args.cpu_only:
while Scalene.read_malloc_mmap(): pass
if Scalene.__memcpy_signal_mmap:
while Scalene.read_memcpy_mmap(): pass

@staticmethod
def start() -> None:
Expand Down

0 comments on commit eaaf484

Please sign in to comment.