Summary: | [GTK][WPE] Current-context enforcement in ANGLE is expensive | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Zan Dobersek <zan> | ||||||||||
Component: | New Bugs | Assignee: | Zan Dobersek <zan> | ||||||||||
Status: | RESOLVED FIXED | ||||||||||||
Severity: | Normal | CC: | alex, aperez, benjamin, cdumez, cmarcelo, dino, ews-watchlist, kondapallykalyan, mcatanzaro, webkit-bug-importer | ||||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||||
Version: | WebKit Nightly Build | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
See Also: | https://bugs.webkit.org/show_bug.cgi?id=254286 | ||||||||||||
Bug Depends on: | |||||||||||||
Bug Blocks: | 237649 | ||||||||||||
Attachments: |
|
Description
Zan Dobersek
2022-05-13 11:32:35 PDT
Created attachment 459407 [details]
WIP patch
Testing on equal WebGL load, this is the difference: Current current-context handling, through ANGLE: > CPU utilization of the WebProcess: > 2,629.68 msec task-clock # 0.657 CPUs utilized > Percentage of CPU utilization spent under and inside makeContextCurrent(): > 4.82% 0.57% WPEWebProcess libWPEWebKit-1.0.so.3.17.0 [.] WebCore::GraphicsContextGLANGLE::makeContextCurrent With a check on a thread-local variable with the tls_model("initial-exec") attribute, as implemented in the WIP patch: > CPU utilization of the WebProcess: > 17,924.20 msec task-clock # 0.597 CPUs utilized > Percentage of CPU utilization spent under and inside makeContextCurrent(): > 0.86% 0.66% WPEWebProcess libWPEWebKit-1.0.so.3.17.0 [.] WebCore::GraphicsContextGLANGLE::makeContextCurrent Created attachment 459445 [details]
Patch
Created attachment 459446 [details]
Patch
Comment on attachment 459446 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=459446&action=review > Source/WebCore/ChangeLog:34 > + 'ELF Handling For Thread-Local Storage' paper by Ulrich Drepper. Reading this was good for a quick-ish summary for me: https://maskray.me/blog/2021-02-14-all-about-thread-local-storage Created attachment 459481 [details]
Patch for landing
Comment on attachment 459481 [details] Patch for landing Clearing flags on attachment: 459481 Committed r294290 (250632@trunk): <https://commits.webkit.org/250632@trunk> All reviewed patches have been landed. Closing bug. Note this code has been deleted at some point. Not sure if that is OK or not, but TLS_MODEL_INITIAL_EXEC is no longer used anywhere. |