btrace, infrun: simplify scheduler-locking replay
When scheduler-locking is set to replay and we're resuming a thread at the
end of its execution history, we check whether anything is replaying in
user_visible_resume_ptid() only to check again in clear_proceed_status()
before we stop replaying the current process.
What really matters is whether the selected thread is replaying or will
start replaying.
Simplify this by removing redundant checks.
Also avoid a redundant pass over all threads to check whether anything is
replaying before stopping replaying. Make record_stop_replaying() handle
the case when we're not replaying gracefully.
Approved-By: Tom Tromey <tom@tromey.com>
2 files changed