Skip to content

Conversation

al45tair
Copy link
Contributor

@al45tair al45tair commented Nov 2, 2023

Currently we read many small chunks from the process we're backtracing. If it so happens that it's the local process, that isn't really a big problem, but if it's a remote process, especially on Linux where we have to use the memory server, it's probably a little slow.

Fix by adding a caching layer.

rdar://117681625

…s active.

There's no need for fatalError() to try to generate its own backtraces
when the runtime's backtracer is enabled.  Not only is the code it uses
more fragile but it also doesn't support async or inline frames and it
can't look-up symbols properly either.

rdar://117470489
The Runtime/backtrace test is a test of the fatalError() backtracer,
which gets turned off when we have the new backtracer enabled.  So,
to make this test work, we need to turn off the new backtracer.

rdar://117470489
@al45tair al45tair added 🍒 release cherry pick Flag: Release branch cherry picks swift 5.10 labels Nov 2, 2023
@al45tair al45tair requested a review from a team as a code owner November 2, 2023 16:09
@al45tair
Copy link
Contributor Author

al45tair commented Nov 2, 2023

Explanation: Adds a MemoryReader implementation that provides a page cache; this lets us fetch data from the crashed process in larger chunks on the assumption that we're likely to read more data adjacent to previous fetches and should improve performance, particularly on Linux.
Original PR: #69510
Reviewed by: @mikeash
Resolves: rdar://117681625
Tests: The existing backtracing tests will exercise the implementation.

@al45tair
Copy link
Contributor Author

al45tair commented Nov 2, 2023

@swift-ci Please test

@al45tair
Copy link
Contributor Author

al45tair commented Nov 2, 2023

Oops. Messed up and confused two PRs.

@al45tair al45tair closed this Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks swift 5.10
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant