Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[debug] Lazily update frames of all threads in all-stop mode
A re-make of d1678ad. The changed bits: ```diff @@ -181,7 +196,17 @@ export class DebugThread extends DebugThreadData implements TreeElement { return [...result.values()]; } protected clearFrames(): void { + // Clear all frames this._frames.clear(); + + // Cancel all request promises + this.pendingFetchCancel.cancel(); + this.pendingFetchCancel = new CancellationTokenSource(); + + // Empty all current requests + this.pendingFetch = Promise.resolve([]); + this._pendingFetchCount = 0; + this.updateCurrentFrame(); } protected updateCurrentFrame(): void { ``` So what's the difference? Well, if you got multiple stops fast enough, pending frames would be blocking the refresh from happening. Since `updateFrames` was being called from one more place (when switching thread), it forced me to avoid pointless lookups as to not error (GDB complains when you're trying to fetch something that has already been fetched). This new behavior that avoids pointless refreshes didn't take speed into account, and could potentially block an entirely new fetch. To fix this, I cancel all frame fetches when clearing frames (which is done when updating a thread in all-stop mode). Signed-off-by: Samuel Frylmark <samuel.frylmark@ericsson.com>
- Loading branch information