Skip to content

Commit

Permalink
Merge branch 'fixprofwaits' into 'master'
Browse files Browse the repository at this point in the history
Fix Profiler Waits

See merge request StanfordLegion/legion!1339
  • Loading branch information
rainmakereuab committed Jun 22, 2024
2 parents 1790d57 + 678aefd commit dbd7448
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tools/legion_prof.py
Original file line number Diff line number Diff line change
Expand Up @@ -1190,6 +1190,8 @@ def add_wait_interval(self,
end: int
) -> None:
self.wait_intervals.append(WaitInterval(start, ready, end))
# Keep these sorted
self.wait_intervals.sort(key=lambda w: w.start)

@typecheck
def active_time(self) -> int:
Expand Down
4 changes: 4 additions & 0 deletions tools/legion_prof_rs/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -762,6 +762,8 @@ impl Proc {
*call_stop,
*call_stop,
));
// Keep the wait intervals sorted by starting time
next_entry.waiters.wait_intervals.sort_by_key(|w| w.start);
found = true;
break;
} else {
Expand All @@ -775,6 +777,8 @@ impl Proc {
*call_stop,
*call_stop,
));
// Keep the wait intervals sorted by starting time
task_entry.waiters.wait_intervals.sort_by_key(|w| w.start);
}
// Update the operation info for the calls
let call_entry = self.entries.get_mut(&call_uid).unwrap();
Expand Down

0 comments on commit dbd7448

Please sign in to comment.