Skip to content

[nfc][opts] Add a few pretty-stack traces to performance diagnostics. #67341

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

Merged

Conversation

zoecarver
Copy link
Contributor

It can be very hard to debug (from a compiler engineers perspective) why the perforamnce diagnostics aren't allowing a certain pattern. Usually this means adding a bunch of random SIL dumps to debug. With these stack traces, you can now just add -Xllvm -swift-diagnostics-assert-on-error=1 and the stack dumps will do the rest.

It can be very hard to debug (from a compiler engineers perspective) why the perforamnce diagnostics aren't allowing a certain pattern. Usually this means adding a bunch of random SIL dumps to debug. With these stack traces, you can now just add `-Xllvm -swift-diagnostics-assert-on-error=1` and the stack dumps will do the rest.
@zoecarver zoecarver requested a review from eeckstein July 17, 2023 19:25
@zoecarver
Copy link
Contributor Author

@swift-ci please smoke test

@zoecarver
Copy link
Contributor Author

@swift-ci please smoke test

Copy link
Contributor

@eeckstein eeckstein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm.
BTW, I always debug this in a debugger where I can see the stack trace.

@zoecarver
Copy link
Contributor Author

@swift-ci please smoke test linux platform

@zoecarver
Copy link
Contributor Author

@swift-ci please smoke test linux

@zoecarver
Copy link
Contributor Author

@swift-ci please smoke test

@zoecarver
Copy link
Contributor Author

@swift-ci please smoke test linux

1 similar comment
@zoecarver
Copy link
Contributor Author

@swift-ci please smoke test linux

@zoecarver zoecarver merged commit 0c2e2d8 into swiftlang:main Jul 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants