Issue metadata
Sign in to add a comment
|
CanvasEarth benchmark has ~90% performance regression on ChromeOS R66 image
Reported by
lingyun....@intel.com,
Mar 1 2018
|
||||||||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Platform: 10326.0.0 (Official Build) dev-channel reef-unibuild test Steps to reproduce the problem: 1. Run CanvasEarth benchmark using R66-10326.0.0 (platform version)/66.0.3326.0 (browser version) image on board reef 2. Get the average fps as the reported result What is the expected behavior? CanvasEarth is an HTML5 benchmark whose purpose is to test the average FPS of the HTML5 Canvas 2D context by rendering a rotating Earth. On board reef, the expected result should be ~33 fps. What went wrong? The actual result is only ~3 fps. Did this work before? Yes R66-10325.0.0 (platform version)/65.0.3325.5 (browser version) Chrome version: 66.0.3326.0 Channel: dev OS Version: 10326.0.0 Flash Version: 28.0.0.144
,
Mar 1 2018
@khushalsagar, could you please give any comments?
,
Mar 1 2018
Do you still see this on the latest canary? I can see that its constantly locking/unlocking the image which was known to be a perf hit and was fixed in https://chromium-review.googlesource.com/c/chromium/src/+/884881.
,
Mar 1 2018
Thanks for the comment, khushalsagar@ I tried the latest canary image 10440.0.0 (platform version)/66.0.3355.0 (browser version) and the result is 3.8 fps, regression still exists.
,
Mar 1 2018
I'll take a look. Can you attach the traces from canary if possible?
,
Mar 1 2018
Sure, do you have any specific trace categories required?
,
Mar 1 2018
cc,gpu is good.
,
Mar 1 2018
Trace from canary attached with cc and gpu categories.
,
Mar 1 2018
Could you also provide a link to the benchmark on which I can repro this?
,
Mar 1 2018
I've attached a simplified version, which can also reproduce the issue at my side. You may put it in Apache directory and access it from browser.
,
Mar 2 2018
I tried opening index.html directly in the browser and that doesn't work for some reason. The canvas just renders black.
,
Mar 2 2018
It's because that the img file was blocked by CORS policy. Would you please try to open browser with '--disable-web-security --user-data-dir' and open index.html directly or put files in Apache server directory and then access from browser localhost.
,
Mar 2 2018
Great. That worked and I can repro it. Looking now.
,
Mar 2 2018
Its using a record shader which when decoded by ScopedRasterFlags creates a new SkPictureShader each time and thrashes skia's cache. For every op, we rasterize the picture repeatedly. ericrk@, we had discussed this in the context of OOP raster. And mostly narrowed down on caching the resulting SkPicture.
,
Mar 12 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/058b6774e4b0191372be43b68bf5aaa2418b829e commit 058b6774e4b0191372be43b68bf5aaa2418b829e Author: Khushal <khushalsagar@chromium.org> Date: Mon Mar 12 19:40:13 2018 cc: Disable decoding of PaintRecord shaders in cc. For PaintRecord backed shaders, skia performs the rasterization of the shader's record at the required scale before tiling. In order to decode images in these records using cc's decode cache, we create a temporary SkPicture with images replaced with decodes from cc's cache and use that in a new SkPictureShader each time the PaintShader is rasterized. Skia internally maintains a cache of rasterized pictures used in these shaders, keyed on the SkPictureShader's uniqueID. Since a new SkPictureShader is created for each raster call, we don't get a cache hit in skia and end up re-rasterizing the shader's record. The ideal solution for this would be to maintain a PaintShaderCache which caches rasterized records. But given the rarity of these cases, its not worth duplicating skia's picture cache. However, if any of the images in these records are animated, they must go through cc's decode stack to update them and use cached animation frames. The change ensures that we only decode shaders in cc if they have animated images. Note that the performance hit of re-rasterization of records in these cases will still exist. R=chrishtr@chromium.org, enne@chromium.org, ericrk@chromium.org Bug: 817640 Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel Change-Id: Ibd1f3db9902f21fca20c99be1cf9e36b54cd7085 Reviewed-on: https://chromium-review.googlesource.com/952529 Commit-Queue: Khushal <khushalsagar@chromium.org> Reviewed-by: Eric Karl <ericrk@chromium.org> Reviewed-by: enne <enne@chromium.org> Reviewed-by: Chris Harrelson <chrishtr@chromium.org> Reviewed-by: Antoine Labour <piman@chromium.org> Cr-Commit-Position: refs/heads/master@{#542570} [modify] https://crrev.com/058b6774e4b0191372be43b68bf5aaa2418b829e/cc/paint/discardable_image_map.cc [modify] https://crrev.com/058b6774e4b0191372be43b68bf5aaa2418b829e/cc/paint/discardable_image_map.h [modify] https://crrev.com/058b6774e4b0191372be43b68bf5aaa2418b829e/cc/paint/discardable_image_map_unittest.cc [modify] https://crrev.com/058b6774e4b0191372be43b68bf5aaa2418b829e/cc/paint/paint_op_buffer_unittest.cc [modify] https://crrev.com/058b6774e4b0191372be43b68bf5aaa2418b829e/cc/paint/paint_shader.h [modify] https://crrev.com/058b6774e4b0191372be43b68bf5aaa2418b829e/cc/paint/paint_shader_unittest.cc [modify] https://crrev.com/058b6774e4b0191372be43b68bf5aaa2418b829e/cc/paint/scoped_raster_flags.cc [modify] https://crrev.com/058b6774e4b0191372be43b68bf5aaa2418b829e/cc/paint/scoped_raster_flags_unittest.cc [modify] https://crrev.com/058b6774e4b0191372be43b68bf5aaa2418b829e/cc/trees/layer_tree_host_unittest.cc [modify] https://crrev.com/058b6774e4b0191372be43b68bf5aaa2418b829e/third_party/WebKit/LayoutTests/SlowTests [modify] https://crrev.com/058b6774e4b0191372be43b68bf5aaa2418b829e/third_party/WebKit/LayoutTests/platform/linux/virtual/gpu-rasterization/images/color-profile-svg-fill-text-expected.png [modify] https://crrev.com/058b6774e4b0191372be43b68bf5aaa2418b829e/third_party/WebKit/LayoutTests/platform/mac-mac10.10/virtual/gpu-rasterization/images/color-profile-svg-fill-text-expected.png [modify] https://crrev.com/058b6774e4b0191372be43b68bf5aaa2418b829e/third_party/WebKit/LayoutTests/platform/mac/images/cross-fade-background-size-expected.png [modify] https://crrev.com/058b6774e4b0191372be43b68bf5aaa2418b829e/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/cross-fade-background-size-expected.png [modify] https://crrev.com/058b6774e4b0191372be43b68bf5aaa2418b829e/third_party/WebKit/LayoutTests/platform/mac/virtual/gpu-rasterization/images/color-profile-background-image-space-expected.png [modify] https://crrev.com/058b6774e4b0191372be43b68bf5aaa2418b829e/third_party/WebKit/LayoutTests/platform/mac/virtual/gpu-rasterization/images/color-profile-svg-expected.png [modify] https://crrev.com/058b6774e4b0191372be43b68bf5aaa2418b829e/third_party/WebKit/LayoutTests/platform/mac/virtual/gpu-rasterization/images/color-profile-svg-fill-text-expected.png [modify] https://crrev.com/058b6774e4b0191372be43b68bf5aaa2418b829e/third_party/WebKit/LayoutTests/platform/mac/virtual/gpu-rasterization/images/cross-fade-background-size-expected.png [modify] https://crrev.com/058b6774e4b0191372be43b68bf5aaa2418b829e/third_party/WebKit/LayoutTests/platform/win/images/cross-fade-background-size-expected.png [modify] https://crrev.com/058b6774e4b0191372be43b68bf5aaa2418b829e/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/cross-fade-background-size-expected.png [modify] https://crrev.com/058b6774e4b0191372be43b68bf5aaa2418b829e/third_party/WebKit/LayoutTests/platform/win/virtual/gpu-rasterization/images/color-profile-background-image-space-expected.png [modify] https://crrev.com/058b6774e4b0191372be43b68bf5aaa2418b829e/third_party/WebKit/LayoutTests/platform/win/virtual/gpu-rasterization/images/color-profile-svg-expected.png [modify] https://crrev.com/058b6774e4b0191372be43b68bf5aaa2418b829e/third_party/WebKit/LayoutTests/platform/win/virtual/gpu-rasterization/images/color-profile-svg-fill-text-expected.png [modify] https://crrev.com/058b6774e4b0191372be43b68bf5aaa2418b829e/third_party/WebKit/LayoutTests/platform/win/virtual/gpu-rasterization/images/cross-fade-background-size-expected.png
,
Mar 12 2018
+govind@. I'll verify in canary tomorrow and request a merge to 66.
,
Mar 12 2018
+ josafat@ (Chrome OS M66 TPM)
,
Mar 12 2018
,
Mar 13 2018
The NextAction date has arrived: 2018-03-13
,
Mar 13 2018
,
Mar 14 2018
Issue 788075 has been merged into this issue.
,
Mar 14 2018
Your change meets the bar and is auto-approved for M66. Please go ahead and merge the CL to branch 3359 manually. Please contact milestone owner if you have questions. Owners: cmasso@(Android), cmasso@(iOS), josafat@(ChromeOS), abdulsyed@(Desktop) For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Mar 14 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/ec45f4d2599aee0c6d0f75ddd90ae1a475193a1c commit ec45f4d2599aee0c6d0f75ddd90ae1a475193a1c Author: Khushal <khushalsagar@chromium.org> Date: Wed Mar 14 23:12:12 2018 cc: Disable decoding of PaintRecord shaders in cc. For PaintRecord backed shaders, skia performs the rasterization of the shader's record at the required scale before tiling. In order to decode images in these records using cc's decode cache, we create a temporary SkPicture with images replaced with decodes from cc's cache and use that in a new SkPictureShader each time the PaintShader is rasterized. Skia internally maintains a cache of rasterized pictures used in these shaders, keyed on the SkPictureShader's uniqueID. Since a new SkPictureShader is created for each raster call, we don't get a cache hit in skia and end up re-rasterizing the shader's record. The ideal solution for this would be to maintain a PaintShaderCache which caches rasterized records. But given the rarity of these cases, its not worth duplicating skia's picture cache. However, if any of the images in these records are animated, they must go through cc's decode stack to update them and use cached animation frames. The change ensures that we only decode shaders in cc if they have animated images. Note that the performance hit of re-rasterization of records in these cases will still exist. R=chrishtr@chromium.org, enne@chromium.org, ericrk@chromium.org TBR=khushalsagar@chromium.org (cherry picked from commit 058b6774e4b0191372be43b68bf5aaa2418b829e) Bug: 817640 Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel Change-Id: Ibd1f3db9902f21fca20c99be1cf9e36b54cd7085 Reviewed-on: https://chromium-review.googlesource.com/952529 Commit-Queue: Khushal <khushalsagar@chromium.org> Reviewed-by: Eric Karl <ericrk@chromium.org> Reviewed-by: enne <enne@chromium.org> Reviewed-by: Chris Harrelson <chrishtr@chromium.org> Reviewed-by: Antoine Labour <piman@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#542570} Reviewed-on: https://chromium-review.googlesource.com/963608 Reviewed-by: Khushal <khushalsagar@chromium.org> Cr-Commit-Position: refs/branch-heads/3359@{#252} Cr-Branched-From: 66afc5e5d10127546cc4b98b9117aff588b5e66b-refs/heads/master@{#540276} [modify] https://crrev.com/ec45f4d2599aee0c6d0f75ddd90ae1a475193a1c/cc/paint/discardable_image_map.cc [modify] https://crrev.com/ec45f4d2599aee0c6d0f75ddd90ae1a475193a1c/cc/paint/discardable_image_map.h [modify] https://crrev.com/ec45f4d2599aee0c6d0f75ddd90ae1a475193a1c/cc/paint/discardable_image_map_unittest.cc [modify] https://crrev.com/ec45f4d2599aee0c6d0f75ddd90ae1a475193a1c/cc/paint/paint_op_buffer_unittest.cc [modify] https://crrev.com/ec45f4d2599aee0c6d0f75ddd90ae1a475193a1c/cc/paint/paint_shader.h [modify] https://crrev.com/ec45f4d2599aee0c6d0f75ddd90ae1a475193a1c/cc/paint/paint_shader_unittest.cc [modify] https://crrev.com/ec45f4d2599aee0c6d0f75ddd90ae1a475193a1c/cc/paint/scoped_raster_flags.cc [modify] https://crrev.com/ec45f4d2599aee0c6d0f75ddd90ae1a475193a1c/cc/paint/scoped_raster_flags_unittest.cc [modify] https://crrev.com/ec45f4d2599aee0c6d0f75ddd90ae1a475193a1c/cc/trees/layer_tree_host_unittest.cc [modify] https://crrev.com/ec45f4d2599aee0c6d0f75ddd90ae1a475193a1c/third_party/WebKit/LayoutTests/SlowTests [modify] https://crrev.com/ec45f4d2599aee0c6d0f75ddd90ae1a475193a1c/third_party/WebKit/LayoutTests/platform/linux/virtual/gpu-rasterization/images/color-profile-svg-fill-text-expected.png [modify] https://crrev.com/ec45f4d2599aee0c6d0f75ddd90ae1a475193a1c/third_party/WebKit/LayoutTests/platform/mac/images/cross-fade-background-size-expected.png [modify] https://crrev.com/ec45f4d2599aee0c6d0f75ddd90ae1a475193a1c/third_party/WebKit/LayoutTests/platform/mac/virtual/exotic-color-space/images/cross-fade-background-size-expected.png [modify] https://crrev.com/ec45f4d2599aee0c6d0f75ddd90ae1a475193a1c/third_party/WebKit/LayoutTests/platform/mac/virtual/gpu-rasterization/images/color-profile-background-image-space-expected.png [modify] https://crrev.com/ec45f4d2599aee0c6d0f75ddd90ae1a475193a1c/third_party/WebKit/LayoutTests/platform/mac/virtual/gpu-rasterization/images/color-profile-svg-expected.png [modify] https://crrev.com/ec45f4d2599aee0c6d0f75ddd90ae1a475193a1c/third_party/WebKit/LayoutTests/platform/mac/virtual/gpu-rasterization/images/cross-fade-background-size-expected.png [modify] https://crrev.com/ec45f4d2599aee0c6d0f75ddd90ae1a475193a1c/third_party/WebKit/LayoutTests/platform/win/images/cross-fade-background-size-expected.png [modify] https://crrev.com/ec45f4d2599aee0c6d0f75ddd90ae1a475193a1c/third_party/WebKit/LayoutTests/platform/win/virtual/exotic-color-space/images/cross-fade-background-size-expected.png [modify] https://crrev.com/ec45f4d2599aee0c6d0f75ddd90ae1a475193a1c/third_party/WebKit/LayoutTests/platform/win/virtual/gpu-rasterization/images/color-profile-background-image-space-expected.png [modify] https://crrev.com/ec45f4d2599aee0c6d0f75ddd90ae1a475193a1c/third_party/WebKit/LayoutTests/platform/win/virtual/gpu-rasterization/images/color-profile-svg-expected.png [modify] https://crrev.com/ec45f4d2599aee0c6d0f75ddd90ae1a475193a1c/third_party/WebKit/LayoutTests/platform/win/virtual/gpu-rasterization/images/cross-fade-background-size-expected.png
,
Mar 14 2018
|
|||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||
Comment 1 by lingyun....@intel.com
, Mar 1 2018230 KB
230 KB View Download
286 KB
286 KB View Download
3.0 MB
3.0 MB Download
2.7 MB
2.7 MB Download