-
Notifications
You must be signed in to change notification settings - Fork 6k
Handle deprecation of Dart_TimelineEvent Embedder API #42497
Conversation
@@ -116,8 +116,10 @@ class Pipeline { | |||
|
|||
ProducerContinuation(const Continuation& continuation, size_t trace_id) | |||
: continuation_(continuation), trace_id_(trace_id) { | |||
TRACE_EVENT_ASYNC_BEGIN0_WITH_FLOW_IDS("flutter", "PipelineItem", | |||
trace_id_, /*flow_id_count=*/1, | |||
/*flow_ids=*/&trace_id_); | |||
TRACE_FLOW_BEGIN("flutter", "PipelineItem", trace_id_); |
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.
This doesn't do anything because flow events don't bind to async events in Chrome's trace format.
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.
This needs a test, and it looks like CI isn't happy.
What's a case where we'd ever want more than 1 flow ID? It looks like it's always either 1 or 0. Can we just make the API take a single parameter and assume the count is always 1 if it's not nullptr?
I haven't landed the Dart CL yet, because it will break Dart SDK into Flutter Engine rolls. I'd like to get this PR approved first, and then I'll be able to include these changes with the rolling of the embedder API changes. CI will only pass when these changes are included with the rolling of the embedder API changes. I'm not sure how to write a test for this, do you have an example I can follow?
engine/shell/common/animator.cc Line 71 in adca97c
engine/shell/common/animator.cc Line 264 in adca97c
|
If we can in any way avoid the need for a manual roll we should. It makes things like reverts/relands much harder, and ends up making the release process more complicated. Can we avoid that here? |
(Thanks for the pointer about multiple flow ids) |
I think a manual roll has to be done here, because on the Dart side we are adding new required parameters to the We can make the number of Engine changes included in the manual roll smaller though. There aren't many direct calls to |
Why can't we deprecate the old method and create a new one? |
I just discussed this with @bkonyi. We would prefer not to go through the extra deprecation / cleanup process since this function is only used in a couple of places in the Engine. Let us know if you still strongly desire to avoid the manual roll. |
@derekxu16 @bkonyi It looks like there's a straightforward way to do a soft transition for this API, so that's what we should do. Manual rolls are for emergencies or cases where a soft transition is impossible. |
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!). If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
I'll be able to test this in https://github.com/flutter/engine/blob/main/testing/dart/observatory/tracing_test.dart once https://dart-review.googlesource.com/c/sdk/+/303022 lands. I need that CL to land because it will allow me to decode Perfetto-format trace protos and check that flow IDs are present in them. That CL is currently blocked for the reasons described here: https://dart-review.googlesource.com/c/sdk/+/303022/comment/d77751a4_f9e8fea8. I'll revist this PR once that CL lands. |
3505e9e
to
f1ee191
Compare
The Linux linux_unopt check is failing because it's detecting a leak. I think it's because We have a test in the VM that passes flow ID arguments to |
This pull request executed golden file tests, but it has not been updated in a while (20+ days). Test results from Gold expire after as many days, so this pull request will need to be updated with a fresh commit in order to get results from Gold. |
(From offline discussion - we leak the VM by default, the tester should not need to leak the VM, setting it to not leak the VM makes ASAN happy) |
This PR changes usages of Dart_TimelineEvent to Dart_RecordTimelineEvent as Dart_TimelineEvent was deprecated in https://dart-review.googlesource.com/c/sdk/+/308721
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.
LGTM as long as bots are happy - I rekicked one that seemed like an infra failure.
…sions) (#131830) Manual roll requested by [email protected] flutter/engine@9304c00...4c1157b 2023-08-03 [email protected] Revert Android Hardware Texture PRs (flutter/engine#44310) 2023-08-03 [email protected] Roll Dart SDK from 87df1bbcea5e to 3b9af2825d47 (2 revisions) (flutter/engine#44308) 2023-08-03 [email protected] Roll Fuchsia Mac SDK from Hx7ap5qcoqRIknnnG... to WwFjJuQF_rpToCYPJ... (flutter/engine#44306) 2023-08-03 [email protected] Check whether the lookup of android.hardware.HardwareBuffer found a class (flutter/engine#44304) 2023-08-02 [email protected] [Impeller] Add placeholder filter input. (flutter/engine#44290) 2023-08-02 [email protected] Roll ANGLE from 6c1bab070220 to 6a09e41ce6ea (1 revision) (flutter/engine#44300) 2023-08-02 [email protected] Roll Skia from fd5bd67d532f to c0956a252f30 (1 revision) (flutter/engine#44296) 2023-08-02 [email protected] [iOS] Fix use-after-free in setBinaryMessenger (flutter/engine#44294) 2023-08-02 [email protected] Add Search Web to selection controls on iOS (flutter/engine#43324) 2023-08-02 [email protected] Improve logging in the clang-tidy script (flutter/engine#44228) 2023-08-02 [email protected] Roll ANGLE from 335c6b86d70b to 6c1bab070220 (1 revision) (flutter/engine#44291) 2023-08-02 [email protected] Roll Skia from 25f5a32367ad to fd5bd67d532f (2 revisions) (flutter/engine#44289) 2023-08-02 [email protected] Be sure to clear exceptions after a failed JNI lookup (flutter/engine#44293) 2023-08-02 [email protected] Handle deprecation of Dart_TimelineEvent Embedder API (flutter/engine#42497) 2023-08-02 [email protected] Roll Skia from ccc17f784e5d to 25f5a32367ad (4 revisions) (flutter/engine#44283) 2023-08-02 [email protected] Roll ANGLE from 01ee134bb223 to 335c6b86d70b (2 revisions) (flutter/engine#44287) 2023-08-02 [email protected] Roll Skia from 7104d0e8863f to ccc17f784e5d (2 revisions) (flutter/engine#44279) 2023-08-02 [email protected] [ios][autocorrection]disable auto-correction highlight in iOS 17 (flutter/engine#44176) 2023-08-02 [email protected] Reland Introduce TextureRegistry.ImageTexture and HardwareBufferExternalTextureGL (flutter/engine#44278) 2023-08-02 [email protected] Roll Dart SDK from afbaf4216fc8 to 87df1bbcea5e (1 revision) (flutter/engine#44276) 2023-08-02 [email protected] Roll Skia from 93764a98b866 to 7104d0e8863f (4 revisions) (flutter/engine#44273) 2023-08-02 [email protected] [Impeller] Fix leak of wrapped TextureMTL objects in the Metal embedder API (flutter/engine#44245) 2023-08-02 [email protected] Revert "Listen to window notifications to update application lifecycle" (flutter/engine#44275) 2023-08-02 [email protected] Roll Skia from 514c66ce0471 to 93764a98b866 (1 revision) (flutter/engine#44270) Also rolling transitive DEPS: fuchsia/sdk/core/mac-amd64 from Hx7ap5qcoqRI to WwFjJuQF_rpT If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Please CC [email protected],[email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
This PR changes usages of `Dart_TimelineEvent` to `Dart_RecordTimelineEvent` as `Dart_TimelineEvent` was deprecated in https://dart-review.googlesource.com/c/sdk/+/308721.
This PR changes usages of
Dart_TimelineEvent
toDart_RecordTimelineEvent
asDart_TimelineEvent
was deprecated in https://dart-review.googlesource.com/c/sdk/+/308721.