New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 862151 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit 16 days ago
Closed: Jul 20
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug-Regression

Blocked on:
issue 862351

Blocking:
issue 859249



Sign in to add a comment

120.3 KiB regression in resource_sizes (MonochromePublic.apk) at 573644:573644

Project Member Reported by huangs@google.com, Jul 10

Issue description

Caused by “Add webgl2-compute context support in Blink”

Commit: 8e87c7f1833f49138268496d47db791f273e785b

Link to size graph: https://chromeperf.appspot.com/group_report?keys=agxzfmNocm9tZXBlcmZyFAsSB0Fub21hbHkYgICQ5f6YpQoM4

Debugging size regressions is documented at: https://chromium.googlesource.com/chromium/src/+/master/docs/speed/apk_size_regressions.md#Debugging-Apk-Size-Increase

Based on the graph: 120 KiB of native code.

It looks like this increase was probably unexpected or might be avoidable.
Please have a look and either:

Close as “Won't Fix” with a short justification, or
Land a revert / fix-up.

 
All graphs for this bug:
  https://chromeperf.appspot.com/group_report?bug_id=862151

(For debugging:) Original alerts at time of bug-filing:
  https://chromeperf.appspot.com/group_report?sid=7bf1b1bb307e38f29267e32eb7665ec611c30344ec6a12877d37f8a93cca9525


Bot(s) for this bug's original alert(s):

Android Builder Perf
Owner: jiajia....@intel.com
Status: Assigned (was: Untriaged)
Assigning to jiajia.qin@intel.com because this is the only CL in range:
Add webgl2-compute context support in Blink

This change allows web developers to create a 'webgl2-compute' context
which exposes OpenGL ES 3.1 functionality to WebGL.

Bug: 859249
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: Ibb403435b18698429e0f1942a15d3e9fa5027fd9
Reviewed-on: https://chromium-review.googlesource.com/1081814
Reviewed-by: Rick Byers <rbyers@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Jiajia Qin <jiajia.qin@intel.com>
Cr-Commit-Position: refs/heads/master@{#573644}
To see detailed info, please run:
tools/binary_size/diagnose_bloat.py --cloud 8e87c7f1833f49138268496d47db791f273e785b

******************************Native Diff******************************
Common Metadata:
    apk_file_name=apks/MonochromePublic.apk
    elf_arch=arm
    elf_file_name=lib.unstripped/libmonochrome.so
    gn_args=ffmpeg_branding="Chrome" goma_dir="/b/build/slave/goma_cache/client" is_chrome_branded=true is_debug=false is_official_build=true proprietary_codecs=true strip_absolute_paths_from_debug_symbols=true symbol_level=1 target_os="android" use_goma=true
    linker_name=lld_v1
    map_file_name=lib.unstripped/libmonochrome.so.map.gz
    tool_prefix=third_party/llvm-build/Release+Asserts/bin/llvm-
Old Metadata:
    apk_size=68344648
    elf_build_id=1f457e8eadb6ad76181ff9932710cdb1f18652f5
    elf_mtime=2018-07-10 05:34:24
    git_revision=3fe9d928bd9bf1e4a54db0f5c3d04da12d26ceae
New Metadata:
    apk_size=68469744
    elf_build_id=5240c2f2d72fb313f6912fa809884b2feb9a5d16
    elf_mtime=2018-07-10 05:35:26
    git_revision=8e87c7f1833f49138268496d47db791f273e785b

Section Sizes (Total=122kb (125096 bytes)):
    .bss: 0 bytes (0 bytes) (not included in totals)
    .data: 0 bytes (0 bytes) (0.0%)
    .data.rel.ro: 14.1kb (14480 bytes) (11.6%)
    .dex: 0 bytes (0 bytes) (0.0%)
    .other: 1076 bytes (1076 bytes) (0.9%)
    .pak.nontranslated: 0 bytes (0 bytes) (0.0%)
    .pak.translations: 0 bytes (0 bytes) (0.0%)
    .rel.dyn: 1136 bytes (1136 bytes) (0.9%)
    .rodata: 1280 bytes (1280 bytes) (1.0%)
    .text: 104kb (107104 bytes) (85.6%)

1304 symbols added (+), 47297 changed (~), 77 removed (-), 953468 unchanged (not shown)
Of changed symbols, 1511 grew, 47167 shrank
Number of unique symbols 631195 -> 631580 (+385)
1 paths added, 0 removed, 8085 changed

Showing 48,678 symbols (1,553 -> 1,938 unique) with total pss: 123939 bytes
Histogram of symbols based on PSS:
    (-4096,-2048]: 1    (-16,-8]: 145      (0,1): 458     [16,32): 122     [512,1024): 25
      (-256,-128]: 1     (-8,-4]: 246      [1,2): 60      [32,64): 37     [1024,2048): 1
       (-128,-64]: 3     (-4,-2]: 227      [2,4): 121    [64,128): 14     [2048,4096): 4
        (-64,-32]: 9     (-2,-1]: 247      [4,8): 216   [128,256): 156    [4096,8192): 2
        (-32,-16]: 55     (-1,0): 46233   [8,16): 180   [256,512): 114   [8192,16384): 1
.text=104kb      .rodata=1280 bytes .data.rel.ro=14.1kb     .data=0 bytes    .bss=0 bytes    .dex=0 bytes    .dex.method=0 bytes    .pak.translations=0 bytes    .pak.nontranslated=0 bytes    .other=1076 bytes total=121kb
Number of unique paths: 8089


ection Legend: t=.text, r=.rodata, R=.data.rel.ro, d=.data, b=.bss, x=.dex, m=.dex.method, p=.pak.translations, P=.pak.nontranslated, o=.other
Index | Running Total | Section@Address | Δ PSS (Δ size_without_padding) | Path
------------------------------------------------------------
+ 0)       9732 (7.9%)  R@0x2b78f10  9732 (0->9728)     $root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_webgl2_compute_rendering_context.cc
               blink::installV8WebGL2ComputeRenderingContextTemplate::V8WebGL2ComputeRenderingContextConstants
+ 1)      15212 (12.3%) t@0x2300d88  5480 (0->5480)     $root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_webgl2_compute_rendering_context.cc
               blink::V8WebGL2ComputeRenderingContext::texSubImage2DMethodCallback
+ 2)      20504 (16.5%) t@0x22ff8dc  5292 (0->5292)     $root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_webgl2_compute_rendering_context.cc
               blink::V8WebGL2ComputeRenderingContext::texImage2DMethodCallback
+ 3)      24160 (19.5%) t@0x22f3e68  3656 (0->3656)     $root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_webgl2_compute_rendering_context.cc
               blink::V8WebGL2ComputeRenderingContext::texImage3DMethodCallback
+ 4)      27808 (22.4%) R@0x2b7b540  3648 (0->3648)     $root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_webgl2_compute_rendering_context.cc
               blink::V8WebGL2ComputeRenderingContextMethods
+ 5)      31156 (25.1%) t@0x22f4cb0  3348 (0->3348)     $root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_webgl2_compute_rendering_context.cc
               blink::V8WebGL2ComputeRenderingContext::texSubImage3DMethodCallback
~ 6)      33034 (26.7%) o@0x0        1878 (2019606->2021484) base/trace_event/cfi_backtrace_android.cc
               assets/unwind_cfi_32
+ 7)      34022 (27.5%) t@0x22fbb90  988 (0->988)       $root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_webgl2_compute_rendering_context.cc
               blink::V8WebGL2ComputeRenderingContext::compressedTexSubImage2DMethodCallback
+ 8)      34946 (28.2%) t@0x22febcc  924 (0->924)       $root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_webgl2_compute_rendering_context.cc
               blink::V8WebGL2ComputeRenderingContext::readPixelsMethodCallback
+ 9)      35854 (28.9%) t@0x22fb804  908 (0->908)       $root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_webgl2_compute_rendering_context.cc
               blink::V8WebGL2ComputeRenderingContext::compressedTexImage2DMethodCallback
+ 10)     36554 (29.5%) t@0x2303ab8  700 (0->700)       $root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_webgl2_compute_rendering_context.cc
               blink::V8WebGL2ComputeRenderingContext::uniformMatrix2fvMethodCallback
+ 11)     37254 (30.1%) t@0x2303d74  700 (0->700)       $root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_webgl2_compute_rendering_context.cc
               blink::V8WebGL2ComputeRenderingContext::uniformMatrix3fvMethodCallback
+ 12)     37954 (30.6%) t@0x2304030  700 (0->700)       $root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_webgl2_compute_rendering_context.cc
               blink::V8WebGL2ComputeRenderingContext::uniformMatrix4fvMethodCallback
+ 13)     38622 (31.2%) t@0x22f5db8  668 (0->668)       $root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_webgl2_compute_rendering_context.cc
               blink::V8WebGL2ComputeRenderingContext::compressedTexSubImage3DMethodCallback
+ 14)     39290 (31.7%) t@0x23059f8  668 (0->668)       $root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_webgl2_compute_rendering_context.cc
               blink::WebGL2ComputeRenderingContextV8Internal::compressedTexSubImage3D1Method
+ 15)     39930 (32.2%) t@0x22faf68  640 (0->640)       $root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_webgl2_compute_rendering_context.cc
               blink::V8WebGL2ComputeRenderingContext::bufferDataMethodCallback
+ 16)     40542 (32.7%) t@0x2305544  612 (0->612)       $root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_webgl2_compute_rendering_context.cc
               blink::WebGL2ComputeRenderingContextV8Internal::texSubImage3D7Method
+ 17)     41134 (33.2%) t@0x23057a8  592 (0->592)       $root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_webgl2_compute_rendering_context.cc
               blink::WebGL2ComputeRenderingContextV8Internal::compressedTexImage3D1Method
+ 18)     41718 (33.7%) t@0x22f5b70  584 (0->584)       $root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_webgl2_compute_rendering_context.cc
               blink::V8WebGL2ComputeRenderingContext::compressedTexImage3DMethodCallback
+ 19)     42254 (34.1%) t@0x2305c94  536 (0->536)       $root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_webgl2_compute_rendering_context.cc
               blink::WebGL2ComputeRenderingContextV8Internal::uniform1uiv1Method
+ 20)     42790 (34.5%) t@0x230602c  536 (0->536)       $root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_webgl2_compute_rendering_context.cc
               blink::WebGL2ComputeRenderingContextV8Internal::uniform2uiv1Method
...

~ 48675)   123940 (100.0%) t@0x63918a   ~0 (~0->~0)        third_party/libxslt/src/libxslt/xsltlocale.c
               xsltFreeLocale (num_aliases=17318->17344)
~ 48676)   123940 (100.0%) t@0x63918a   ~0 (~0->~0)        components/services/unzip/unzipper_impl.cc
               zip::WriterDelegate::~WriterDelegate (num_aliases=17318->17344)
~ 48677)   123939 (100.0%) t@0x63918a   ~0 (~0->~0)        third_party/zlib/google/zip_reader.cc
               zip::WriterDelegate::~WriterDelegate (num_aliases=17318->17344)

******************************Resource Sizes Diff******************************
For an explanation of these metrics, see:
https://chromium.googlesource.com/chromium/src/+/master/docs/speed/binary_size/metrics.md#Metrics-for-Android

Specifics:
      +123,218 bytes normalized apk size
      +120,996 bytes main lib size
InstallSize:
      +125,096 bytes APK size
    +125,096.0 bytes Estimated installed size
InstallBreakdown (+122,878 bytes):
        +1,878 bytes unwind_cfi (dev and canary only) size
      +120,996 bytes Native code size
            +4 bytes Package metadata size

Cc: haraken@chromium.org kbr@chromium.org rbyers@chromium.org piman@chromium.org
Blocking: 859249
Cc: yang...@intel.com jiajia....@intel.com yunchao...@intel.com
Components: Blink>WebGL
Owner: kbr@chromium.org
Status: WontFix (was: Assigned)
This is expected due to the introduction of the WebGL 2.0 Compute context. There are necessarily many new API entry points which contain associated native code. Closing as WontFix.

Status: Assigned (was: WontFix)
While it may be expected, I think it's also worth justifying. I'm not familiar with what this API will allow, but on the surface it sounds like it may not be applicable to low-end phones, which right now is a bit focus for Android Chrome.

If most of the increase is from bindings, have you spent any time trying to reduce the size of bindings? For reference, when our team was actively trying to reduce binary size, it would take about a week to reduce by 100kb on average. To add 120kb, it's worth spending several days dedicated to reducing the overhead. Another thing to think about is whether the feature could be carved out into a separate .so file so that it could be delivered only to high-end devices.
OK, we can look into this further.

Are there techniques for reducing the size of Blink's bindings? The API is defined per the WebGL specifications, so I assume that the bindings are simply what is needed, and that there's no variability in how they would work.

Blockedon: 862351
Cc: jbroman@chromium.org
+jbroman's looking into bindings size a bit.

If it turns out that there's no good solution to the size, would it make sense at all to have this be a desktop-only api for some amount of time?
Yes, we'll likely make the API desktop-only for the time being to address this regression.

Project Member

Comment 11 by bugdroid1@chromium.org, Jul 18

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/df3a31b23ff39bf90b64a7f0ec35b74f817319b6

commit df3a31b23ff39bf90b64a7f0ec35b74f817319b6
Author: Jiajia Qin <jiajia.qin@intel.com>
Date: Wed Jul 18 22:45:18 2018

Add gn arg to optionally compile webgl2-compute

This patch conditionally compile the implementation of
WebGL2ComputeRenderingContext only on some platforms.

Add a gn arg support_webgl2_compute_context to control it.

Bug:  862151 
Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: Iadf55fa02174bb0451a9035d6513de5a6b94c051
Reviewed-on: https://chromium-review.googlesource.com/1137987
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#576237}
[modify] https://crrev.com/df3a31b23ff39bf90b64a7f0ec35b74f817319b6/content/child/runtime_features.cc
[modify] https://crrev.com/df3a31b23ff39bf90b64a7f0ec35b74f817319b6/third_party/blink/renderer/bindings/scripts/utilities.py
[modify] https://crrev.com/df3a31b23ff39bf90b64a7f0ec35b74f817319b6/third_party/blink/renderer/config.gni
[modify] https://crrev.com/df3a31b23ff39bf90b64a7f0ec35b74f817319b6/third_party/blink/renderer/core/html/canvas/html_canvas_element.h
[modify] https://crrev.com/df3a31b23ff39bf90b64a7f0ec35b74f817319b6/third_party/blink/renderer/core/offscreencanvas/offscreen_canvas.h
[modify] https://crrev.com/df3a31b23ff39bf90b64a7f0ec35b74f817319b6/third_party/blink/renderer/modules/canvas/htmlcanvas/html_canvas_element_module.idl
[add] https://crrev.com/df3a31b23ff39bf90b64a7f0ec35b74f817319b6/third_party/blink/renderer/modules/canvas/htmlcanvas/html_canvas_element_module_support_webgl2_compute.idl
[modify] https://crrev.com/df3a31b23ff39bf90b64a7f0ec35b74f817319b6/third_party/blink/renderer/modules/canvas/offscreencanvas/offscreen_canvas_module.idl
[add] https://crrev.com/df3a31b23ff39bf90b64a7f0ec35b74f817319b6/third_party/blink/renderer/modules/canvas/offscreencanvas/offscreen_canvas_module_support_webgl2_compute.idl
[modify] https://crrev.com/df3a31b23ff39bf90b64a7f0ec35b74f817319b6/third_party/blink/renderer/modules/modules_idl_files.gni
[modify] https://crrev.com/df3a31b23ff39bf90b64a7f0ec35b74f817319b6/third_party/blink/renderer/modules/modules_initializer.cc
[modify] https://crrev.com/df3a31b23ff39bf90b64a7f0ec35b74f817319b6/third_party/blink/renderer/modules/webgl/BUILD.gn

Status: Fixed (was: Assigned)
Owner: jiajia....@intel.com
Labels: OS-Android

Sign in to add a comment