Autoroll from main to 27.lts#863
Conversation
…Cobalt Refer to original PR: #10898 Check available CPU memory against the update download size plus a safety buffer of 20MB before running the download, to prevent OOM crash in IN_MEMORY_UPDATES configuration. Issue: 479816505 (cherry picked from commit fbeb924)
Refer to original PR: #11114 The current implementation of experimental features in Cobalt relies on fixed structs. This requires manual updates to multiple layers, including Mojo interfaces and IPC traits, for every new experiment. This change replaces the custom struct with a generic map container, significantly reducing boilerplate. This approach allows developers to add new Starboard experimental features without modifying Chromium code. It introduces a typed key system to maintain safety while providing a flexible pipeline from H5vcc settings to the platform rendering logic. Before: [commit](youtube/cobalt@a85b354) ``` // Changes to define flags and plumbing cobalt/renderer/cobalt_content_renderer_client.cc | 6 ++++++ media/base/ipc/media_param_traits_macros.h | 1 + media/base/starboard/starboard_renderer_config.cc | 2 ++ media/base/starboard/starboard_renderer_config.h | 1 + media/starboard/sbplayer_bridge.cc | 2 ++ starboard/extension/experimental/experimental_features.h | 1 + starboard/shared/starboard/experimental_features.cc | 2 ++ starboard/shared/starboard/experimental_features.h | 1 + 8 files changed, 16 insertions(+) ``` After: [commit](youtube/cobalt@bdb85b4#diff-6098e275e6e35c9e62c6ad61e021a6ebf2a8087b46dfb9082e8f122ed13e3491) ``` // Changes to define flags. No plumbing necessary starboard/shared/starboard/experimental_features.h | 2 ++ 1 files changed, 2 insertions(+) ``` ``` # How to declare flag and use it --- a/starboard/shared/starboard/experimental_features.h +inline constexpr ExperimentalFeatureKey<bool> kMediaEnableAppProvisioning( + "Media.EnableAppProvisioning"); +++ b/starboard/android/shared/player_components_factory.cc @@ -292,6 +292,10 @@ class PlayerComponentsFactory : public PlayerComponents::Factory { const auto& experimental_features = creation_parameters.experimental_features(); + if (experimental_features.GetBool(kMediaEnableAppProvisioning)) { + MediaCapabilitiesCache::GetInstance()->SetAppProvisioningEnabled(true); + SB_LOG(INFO) << "`enable_app_provisioning` is set to true."; + } ``` Issue: 480134029 (cherry picked from commit e78a39c)
…ial heap profile analyzer with unit tests Refer to original PR: #11247 Introduce a new performance tool to analyze memory footprint deltas between heap snapshots. This script processes heaps_v2 JSON traces, aggregates data by subsystem, and provides a differential view of callstacks to identify the root cause of memory regressions. By using dual-attribution and leaf-slicing, the tool filters noise and pinpoints business logic changes that contribute to bloat. It includes unit tests for the parsing and comparison logic. The unittests file is not integrated in cobalt_unittests by purpose, it's more used for local development and should not go into CIs. Example output reports: noted that the data in these reports are not actionable because C27 was launched with account logged out and C26 was launched with account logged in. But the reports demonstrate the formats and structure of the data provided in the trace files. https://paste.googleplex.com/6230188533874688, https://paste.googleplex.com/6034673502388224 Bug: 528397803 (cherry picked from commit 5dfac0b)
Refer to original PR: #11219 Make //starboard:elf_loader_sandbox and <name>_loader targets testonly. This allows to depend on //starboard/android/shared:test_support, so that on AOSP, the elf loader can correctly initialize starboard's FeatureList. See youtube/cobalt#11025 for the motivation. Additionally, scope //cobalt's testonly to !is_starboard, where there are test dependencies. Bug: 495203133 (cherry picked from commit d475bf7)
There was a problem hiding this comment.
Code Review
This pull request refactors the experimental features configuration system in Cobalt and Starboard, replacing a hardcoded struct with a dynamic, map-based ExperimentalFeatures container and strongly typed ExperimentalFeatureKey identifiers. This change simplifies the propagation of H5vcc settings from the renderer to Starboard platform media components and eliminates the need to manually update multiple structs and IPC serialization macros when adding new experiments. Additionally, the PR introduces a memory-buffer feature parameter (kInMemoryUpdatesMemoryBufferParam) to verify sufficient memory during in-memory updates on Starboard, and adds a Python-based heap profiling trace comparison tool (diff_in_process_heaps.py) with corresponding unit tests. There are no review comments provided, so I have no feedback to offer on the review itself.
Automated cherry-pick roll to 27.lts.
Original pull requests: