-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Finish lazy stack trace support by implementing async* support and fixing line numbers #39525
Comments
Note: This is a follow-up to #37668 |
Bug: #39525 Change-Id: I53cd334243649901ea8e0f9799d9f41c126e3627 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126729 Commit-Queue: Clement Skau <cskau@google.com> Reviewed-by: Martin Kustermann <kustermann@google.com>
…ync. Bug: #39525 Change-Id: I1e23a726bf0fbff2c02891e25c714ea599330c47 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128666 Commit-Queue: Clement Skau <cskau@google.com> Reviewed-by: Martin Kustermann <kustermann@google.com>
CodeSourceMapBuilder::NoteDescriptor(..) would previously only emit CSM entries if its stack_traces_only_ flag was set, which FlowGraphCompiler would only do if compiled in PRODUCT mode: runtime/vm/compiler/backend/flow_graph_compiler.cc:162 Bug: #39525 Change-Id: I78c56a18a5a95ef3c8c37a2d7eae6ab612e6674f Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127464 Commit-Queue: Clement Skau <cskau@google.com> Reviewed-by: Martin Kustermann <kustermann@google.com>
This should address the regression introduced by https://dart-review.googlesource.com/c/sdk/+/124988 Bug: #39525 Change-Id: Id163b649bdd0363297c186559fa84ff87f908e4b Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129062 Reviewed-by: Clement Skau <cskau@google.com> Reviewed-by: Martin Kustermann <kustermann@google.com> Commit-Queue: Clement Skau <cskau@google.com>
This reverts commit 886615d. Reason for revert: There was an unexpected slowdown in some async benchmarks, e.g. Calls.AwaitAsyncCall. Will revert for now and investigate next year. Original change's description: > [SDK] Switch to is_sync to identify sync/async running. > > This should address the regression introduced by https://dart-review.googlesource.com/c/sdk/+/124988 > > Bug: #39525 > Change-Id: Id163b649bdd0363297c186559fa84ff87f908e4b > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129062 > Reviewed-by: Clement Skau <cskau@google.com> > Reviewed-by: Martin Kustermann <kustermann@google.com> > Commit-Queue: Clement Skau <cskau@google.com> TBR=kustermann@google.com,cskau@google.com Change-Id: I5cda795cbccc01f22e0f8192473c171a4e9fca4b No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: #39525 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129285 Reviewed-by: Martin Kustermann <kustermann@google.com> Commit-Queue: Martin Kustermann <kustermann@google.com>
…d of requiring AOT runtime to pass same flags as in compiler) We already do this for "use-bare-instructions" and "dwarf-stack-traces". This CL does the same for "causal-async-stacks" and "lazy-async-stacks". Issue #39525 Change-Id: I44136299858b3b72e8a3a176234f5051d6b61c1d Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130364 Reviewed-by: Teagan Strickland <sstrickl@google.com> Commit-Queue: Martin Kustermann <kustermann@google.com>
Fixes an issue where stack['asyncCausalFrames'] would be populated in if --lazy-async-stacks was set. The field should be filled iff the stack contains an async function - regardless of whether it's sync-async. Bug: #39525 Change-Id: Ia68f113402962c07a1e9a38ea9320b44140241e4 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132820 Commit-Queue: Clement Skau <cskau@google.com> Reviewed-by: Martin Kustermann <kustermann@google.com>
For `foo() async* {}` frames we find the "caller" by finding out what closure is registered as listener on the _AsyncStreamController. There can be two cases: a) The caller does a regular `foo().listen((_) {})`: The stack trace will have the closure as the caller and unwinding stops. b) The caller uses 'await for (... foo())': In this case the listener will be a StreamIterator. This CL changes our unwinding code to get the awaiter of `await it.moveNext()`. Bug: #39525 Change-Id: I13f76025a15682aaf55fd968088fc2059982d842 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132841 Commit-Queue: Clement Skau <cskau@google.com> Reviewed-by: Martin Kustermann <kustermann@google.com>
…c-stacks. With this fix, all 'service' target tests now pass with --lazy-async-stacks on by default for {dartk,dartkp,dartkb-mixed}-{debug,product,release}. Bug: #39525 Change-Id: I2c21f6d2f054fdbb261eb8dfbf422b3950cf9648 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132903 Commit-Queue: Clement Skau <cskau@google.com> Reviewed-by: Martin Kustermann <kustermann@google.com>
- Handle bytecode for e.g. dartkb-simarm64 does not have source position. - Use existing GetCallerSp() instead of working across frames. - Nit: Adds clarifying comments to test. - Nit: Updates name of non-async-stack test to clarify flags used. Tested: - CQ with --lazy-async-stacks on by default. - vm/dart/causal_stacks and language_2/vm/causal_async_exception_stack_test with current flags. Bug: #39525 Change-Id: Ie6581a734cdcafbd4fb641bd86bffc03ed241532 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/133063 Commit-Queue: Clement Skau <cskau@google.com> Reviewed-by: Martin Kustermann <kustermann@google.com>
As for the Testing locally I see My understanding of what is happening is that the optimizing causes certain frames to disappear - specifically I see a diff optcounter and non-optcounter showing |
[Co-assigning mkustermann who mentioned he might look into the last item on the check list.] |
In terms of functionality, there's no more actual work planned on the lazy async stacks. So I'll close this issue. There's still some non-feature work to do, mainly to get our embedders opted in and later on change the default. |
The cl/122644 adds the
--lazy-async-stacks
. After the CL lands we still have to do two follow up changesasync*
functionsdartk-optcounter-linux-release-x64
The support for
async*
should be analogous toasync
:_AsyncStarStreamController :controller
pragma("vm:entry-point")
annotations to used fieldsThe metadata should be available via:
/cc @mraleph
The text was updated successfully, but these errors were encountered: