Skip to content

Commit 19be949

Browse files
committed
workaround for cutter injecting spurious events
1 parent 8acb8bb commit 19be949

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pypop/prv.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,11 @@ def profile_openmp_regions(self, no_progress=False):
285285
region_ends = thread_events.index[thread_events["value"] == 0]
286286

287287
# Now sanity check regions and try to repair issues caused by missing events:
288+
# Cut traces seem to have an extra end event injected by the cutter trying to
289+
# be "helpful" If this seems to be the case try trimming the end and post a
290+
# warning
291+
if len(region_ends) == len(region_starts) + 1:
292+
region_ends = region_ends[:-1]
288293

289294
# First region start should be earlier than first region end
290295
if region_ends[0] <= region_starts[0]:

0 commit comments

Comments
 (0)