-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Backtracing] Implement API per SE-0419 #78516
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@swift-ci Please test |
The first changeset, "Update module maps", is the subject of a separate PR. |
Hmmm. Looks like maybe my change to add |
468f648
to
01e2468
Compare
@swift-ci Please test |
7a1fdfc
to
e360d99
Compare
@swift-ci Please test |
We're going to rename the module to Runtime, and it isn't going to be an implicit import, so we don't need any of this. rdar://124913332
Move the backtracing code into a new Runtime module. This means renaming the Swift Runtime's CMake target because otherwise there will be a name clash. rdar://124913332
b97df1d
to
4a7ca68
Compare
@swift-ci Please test |
Remove a `-disable-implicit-backtracing-module-import` that was added in `Runtimes/Core/CMakeLists.txt`, and also remove the reference to `swiftCxxStdlib` from `RuntimeModule` as that causes the build to fail when attempting to build the static version of `swift-backtrace` on Linux. rdar://124913332
@swift-ci Please test |
1 similar comment
@swift-ci Please test |
We needed to add `--enable-runtime-module` in the Python test scripts. rdar://124913332
Also removed a spurious `print()` that got left in by accident, and disabled the `CodableBacktrace.swift` test on Linux since we need Foundation and we don't have it there. rdar://124913332
@swift-ci Please test |
This is still going to break because of the |
@swift-ci Please test |
If this test fails in CI, we could do with being able to see the output from the test program in full. rdar://124913332
@swift-ci Please test |
If we ended up with a `/` at the beginning of a string segment, we were erroneously not adding to the expansion dictionary when we should have been. rdar://124913332
@swift-ci Please test |
We only want to add the `swift-backtrace` binary dependency when the SDK we're looking at actually has `swift-backtrace` enabled. rdar://124913332
@swift-ci Please test |
It's useful to capture the platform and platform version with the image map. Also, display both the platform and architecture information when generating a crash log. rdar://124913332
Added some explanatory text to the Compact Backtrace Format documentation, and also to the `CMakeLists.txt` for the runtime. Tweaked the conversions for `Backtrace.Address` to truncate, which should result in reasonable behaviour for negative fixed-width integers. Use a constant for the ASCII values for `/` and `\` in the Compact Image Format encoder/decoder. Make the TSD key for `ElfImageCache` non-optional, and call `fatalError()` if we don't get one. rdar://124913332
@swift-ci Please test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me regarding the build system changes.
Implement the API described in SE-0419, in a new module
Runtime
that you can import from your Swift program.Additionally, made symbolicated backtraces approximately 5x faster on Linux.
rdar://124913332