Skip to content

Constellation can now optionally report memory usage when the page is loaded.#37151

Merged
jdm merged 2 commits intoservo:mainfrom
Narfinger:ohos-memory-reporting
May 30, 2025
Merged

Constellation can now optionally report memory usage when the page is loaded.#37151
jdm merged 2 commits intoservo:mainfrom
Narfinger:ohos-memory-reporting

Conversation

@Narfinger
Copy link
Copy Markdown
Contributor

@Narfinger Narfinger commented May 27, 2025

The constellation can now tell the memory reporter to report the memory to a trace file when a page is loaded.
Additionally, we amend the memory reporter to allow a simple message where it will report the memory to a tracing provider (at the moment only OHOS/hitrace is supported but easy extension is possible).

I am not sure if this is the right approach or if the embedder should decide to have the memory reporting done.

Testing: This does not change functionality of any of the rendering.

@Narfinger Narfinger force-pushed the ohos-memory-reporting branch from 3857ac3 to 93afb3b Compare May 27, 2025 10:56
@Narfinger Narfinger marked this pull request as ready for review May 27, 2025 11:40
@jschwe
Copy link
Copy Markdown
Member

jschwe commented May 27, 2025

Maybe it would be nicer to request the report from the embedder, and then dump the reports from servoshell. It's not like the reports are timing sensitive.
I guess we could also consider dumping the report to a file, if that makes parsing easier, or allows us to log information more flexibly.

@Narfinger Narfinger force-pushed the ohos-memory-reporting branch from 93afb3b to 61e5947 Compare May 28, 2025 07:28
@Narfinger Narfinger requested a review from jschwe as a code owner May 28, 2025 07:28
@Narfinger Narfinger force-pushed the ohos-memory-reporting branch 2 times, most recently from b39e943 to 519e176 Compare May 28, 2025 07:29
@Narfinger Narfinger marked this pull request as draft May 28, 2025 13:26
The embedder can now tell the memory reporter to report the memory back to it. We also report the memory on LoadPage::Complete if hitrace is enabled.

Testing: This does not change functionality of any of the rendering.

Signed-off-by: Narfinger <[email protected]>
@Narfinger Narfinger force-pushed the ohos-memory-reporting branch from 519e176 to 1df00bc Compare May 30, 2025 08:14
@Narfinger Narfinger marked this pull request as ready for review May 30, 2025 08:15
@Narfinger
Copy link
Copy Markdown
Contributor Author

Refactored the code according to suggestions.

Copy link
Copy Markdown
Member

@jdm jdm left a comment

Choose a reason for hiding this comment

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

Nice!

Signed-off-by: Narfinger <[email protected]>
@jdm jdm added this pull request to the merge queue May 30, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 30, 2025
@jdm jdm added this pull request to the merge queue May 30, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 30, 2025
@jdm jdm added this pull request to the merge queue May 30, 2025
Merged via the queue into servo:main with commit 13a980f May 30, 2025
21 checks passed
vlindhol added a commit to vlindhol/servo that referenced this pull request Jun 1, 2025
* main: (510 commits)
  DevTools: Fix empty `debugger > source` panel (servo#37197)
  dom: implement signal abort on controller and signal (servo#37192)
  build(deps): bump parking_lot from 0.12.3 to 0.12.4 (servo#37199)
  layout: Split overflow calculation after fragment tree construction (servo#37203)
  build(deps): bump parking_lot_core from 0.9.10 to 0.9.11 (servo#37202)
  build(deps): bump lock_api from 0.4.12 to 0.4.13 (servo#37201)
  build(deps): bump cc from 1.2.24 to 1.2.25 (servo#37198)
  Constellation can now optionally report memory usage when the page is loaded. (servo#37151)
  Implement Input `type=text` UA Shadow DOM (servo#37065)
  constellation: Wait for canvas thread to shut down before shutting down system font service (servo#37182)
  Add slot default display style test (servo#37189)
  Send synthetic keydown/keyup at ime_insert_text (servo#37175)
  script: Let canvas serialization to image fail gracefully (servo#37184)
  Implement basics of link preloading (servo#37036)
  compositor: Add an initial RefreshDriver (servo#37169)
  pixels: Add limitation to max image total bytes length (servo#37172)
  Chore: Remove unused variable in `transition-zero-duration-with-delay.html` (servo#37179)
  build(deps): bump ohos-ime from 0.2.0 to 0.3.0 (servo#37180)
  Add a user agent style for the `<slot>` element (servo#37174)
  build(deps): bump hitrace from 0.1.4 to 0.1.5 (servo#37170)
  ...
@Narfinger Narfinger deleted the ohos-memory-reporting branch June 2, 2025 08:02
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.

3 participants