Issue metadata
Sign in to add a comment
|
0.023% regression in resource_sizes (MonochromePublic.apk) at 467335:467335 |
||||||||||||||||||||
Issue descriptionenne: the CL "Back PaintRecord with PaintOpBuffer instead of SkPicture" regressed Android binary size by ~17KB. Could you take a look please?
,
Apr 28 2017
Started bisect job https://chromeperf.appspot.com/buildbucket_job_status/8981078010101977104
,
Apr 28 2017
,
Apr 28 2017
Release ContentShell.apk before patch: 37,036,369 bytes Release ContentShell.apk after patch: 37,036,205 bytes I'll try MonochromePublic whatever that is.
,
Apr 28 2017
This regression would be 0.02% by the way.. This is really tracked?
,
Apr 28 2017
,
Apr 28 2017
Hope to share this tip more broadly next week, but to dig in here, you can run: tools/binary_size/diagnose_apk_bloat.py f5a5ed867ba06ae56f8fc299a9eb194471277eec --cloud So long as there is nothing surprising about the symbol diff, we can just say this growth is expected and close as Wont Fix. Output: Section Sizes (Total=16,560 bytes): .bss: 384 bytes (not included in totals) .data: 0 bytes (0.0%) .data.rel.ro: 32 bytes (0.2%) .data.rel.ro.local: 208 bytes (1.3%) .rodata: 0 bytes (0.0%) .text: 16,320 bytes (98.6%) 160 symbols added (+), 131 changed (~), 34 removed (-), 317773 unchanged (not shown) 4 object files added, 1 removed Showing 325 symbols with total size: 16566 bytes .text=15.9kb .rodata=0 bytes other=240 bytes total=16.2kb Number of object files: 60 First columns are: running total, type, size + 1250 t@0x135f84c 1250 third_party/WebKit/Source/platform/platform/GraphicsLayer.o blink::GraphicsLayer::CheckPaintUnderInvalidations - 28 t@0x135b3d0 -1222 third_party/WebKit/Source/platform/platform/GraphicsLayer.o blink::GraphicsLayer::CheckPaintUnderInvalidations + 872 t@0x2e11d4 844 cc/paint/paint/paint_op_buffer.o _GLOBAL__sub_I_paint_op_buffer.cc + 1700 t@0x6e906c 828 cc/paint/paint/record_paint_canvas.o cc::RecordPaintCanvas::clipPath + 2396 t@0x6e8b44 696 cc/paint/paint/record_paint_canvas.o cc::RecordPaintCanvas::saveLayer + 3028 t@0x6e93a8 632 cc/paint/paint/record_paint_canvas.o cc::RecordPaintCanvas::drawDRRect + 3600 t@0x6e7f10 572 cc/paint/paint/record_paint_canvas.o cc::RecordPaintCanvas::drawRoundRect - 3084 t@0x13802e8 -516 third_party/WebKit/Source/platform/platform/DrawingDisplayItem.o blink::BitmapsEqual + 3556 t@0x1384578 472 third_party/WebKit/Source/platform/platform/DrawingDisplayItem.o blink::BitmapsEqual ~ 3148 t@0x13608a0 -408 third_party/WebKit/Source/platform/platform/Image.o blink::Image::DrawPattern + 3556 t@0x6e8694 408 cc/paint/paint/record_paint_canvas.o cc::RecordPaintCanvas::PlaybackPaintRecord + 3956 t@0x6e83f0 400 cc/paint/paint/record_paint_canvas.o cc::RecordPaintCanvas::drawTextBlob + 4346 t@0x1360716 390 third_party/WebKit/Source/platform/platform/Image.o blink::CreatePatternShader + 4726 t@0x6e7c90 380 cc/paint/paint/record_paint_canvas.o cc::RecordPaintCanvas::drawBitmap + 5082 t@0x6e814c 356 cc/paint/paint/record_paint_canvas.o cc::RecordPaintCanvas::Annotate + 5430 t@0x6e8f10 348 cc/paint/paint/record_paint_canvas.o cc::RecordPaintCanvas::drawPicture + 5762 t@0x6e984c 332 cc/paint/paint/record_paint_canvas.o cc::RecordPaintCanvas::drawPosText + 6086 t@0x6e9708 324 cc/paint/paint/record_paint_canvas.o cc::RecordPaintCanvas::drawText + 6406 t@0x6e82b0 320 cc/paint/paint/record_paint_canvas.o cc::RecordPaintCanvas::clipRRect + 6718 t@0x6e6724 312 cc/paint/paint/paint_op_buffer.o cc::PaintOpBuffer::playback const + 7022 t@0x1359b76 304 third_party/WebKit/Source/platform/platform/GraphicsContext.o blink::GraphicsContext::CompositeRecord + 7326 t@0x6e8a14 304 cc/paint/paint/record_paint_canvas.o cc::RecordPaintCanvas::drawPath - 7044 t@0x13568e8 -282 third_party/WebKit/Source/platform/platform/GraphicsContext.o blink::GraphicsContext::CompositeRecord - 6766 t@0x13801d4 -278 third_party/WebKit/Source/platform/platform/DrawingDisplayItem.o blink::RecordToBitmap + 7042 t@0x1384464 276 third_party/WebKit/Source/platform/platform/DrawingDisplayItem.o blink::RecordToBitmap + 7318 t@0x6e744c 276 cc/paint/paint/record_paint_canvas.o cc::RecordPaintCanvas::drawArc + 7594 t@0x6e8580 276 cc/paint/paint/record_paint_canvas.o cc::RecordPaintCanvas::drawDisplayItemList + 7870 t@0x6e8dfc 276 cc/paint/paint/record_paint_canvas.o cc::RecordPaintCanvas::drawRRect + 8142 t@0x6e7a70 272 cc/paint/paint/record_paint_canvas.o cc::RecordPaintCanvas::concat + 8414 t@0x6e7864 272 cc/paint/paint/record_paint_canvas.o cc::RecordPaintCanvas::drawLine + 8686 t@0x6e7b80 272 cc/paint/paint/record_paint_canvas.o cc::RecordPaintCanvas::setMatrix + 8946 t@0x6e7e0c 260 cc/paint/paint/record_paint_canvas.o cc::RecordPaintCanvas::saveLayerAlpha + 9202 t@0x6e709c 256 cc/paint/paint/record_paint_canvas.o cc::RecordPaintCanvas::drawImageRect + 9454 t@0x6e7974 252 cc/paint/paint/record_paint_canvas.o cc::RecordPaintCanvas::clipRect + 9702 t@0x6e6fa4 248 cc/paint/paint/record_paint_canvas.o cc::RecordPaintCanvas::drawCircle + 9950 t@0x6e882c 248 cc/paint/paint/record_paint_canvas.o cc::RecordPaintCanvas::drawImage ~ 9710 t@0x1383f74 -240 third_party/WebKit/Source/platform/platform/CompositingRecorder.o blink::CompositingRecorder::~CompositingRecorder + 9950 t@0x6e719c 240 cc/paint/paint/record_paint_canvas.o cc::RecordPaintCanvas::drawIRect + 10190 t@0x6e728c 240 cc/paint/paint/record_paint_canvas.o cc::RecordPaintCanvas::drawOval + 10430 t@0x6e8924 240 cc/paint/paint/record_paint_canvas.o cc::RecordPaintCanvas::drawRect + 10662 t@0xe3fb50 232 cc/blink/blink/web_display_item_list_impl.o cc_blink::WebDisplayItemListImpl::AppendDrawingItem - 10430 t@0xe3b600 -232 cc/blink/blink/web_display_item_list_impl.o cc_blink::WebDisplayItemListImpl::AppendDrawingItem + 10638 d@0x2c05030 208 cc/paint/paint/record_paint_canvas.o cc::RecordPaintCanvas [vtable] + 10842 t@0x6e7798 204 cc/paint/paint/record_paint_canvas.o cc::RecordPaintCanvas::scale + 11046 t@0x6e76cc 204 cc/paint/paint/record_paint_canvas.o cc::RecordPaintCanvas::translate + 11242 t@0x6e68bc 196 cc/paint/paint/paint_op_buffer.o cc::PaintOpBuffer::playback const + 11434 t@0x6e9648 192 cc/paint/paint/record_paint_canvas.o cc::PaintOpBuffer::push_internal<cc::NoopOp> + 11626 t@0x6e760c 192 cc/paint/paint/record_paint_canvas.o cc::RecordPaintCanvas::rotate + 11810 t@0x6e6bb4 184 cc/paint/paint/record_paint_canvas.o cc::RecordPaintCanvas::GetCanvas [clone .part.20] - 11628 t@0x1366848 -182 third_party/WebKit/Source/platform/platform/PaintRecordPattern.o blink::PaintRecordPattern::Create + 11808 t@0x136acac 180 third_party/WebKit/Source/platform/platform/PaintRecordPattern.o blink::PaintRecordPattern::Create + 11984 t@0x6e6ef4 176 cc/paint/paint/record_paint_canvas.o cc::RecordPaintCanvas::clear + 12156 t@0x6e643c 172 cc/paint/paint/paint_op_buffer.o cc::DrawPathOp::CountSlowPaths const + 12328 t@0x6e737c 172 cc/paint/paint/record_paint_canvas.o cc::RecordPaintCanvas::restore + 12500 t@0x6e7560 172 cc/paint/paint/record_paint_canvas.o cc::RecordPaintCanvas::save + 12668 t@0x6e6e4c 168 cc/paint/paint/record_paint_canvas.o cc::RecordPaintCanvas::drawColor + 12836 t@0x6e61ac 168 cc/paint/paint/paint_op_buffer.o cc::{{lambda ~ 12672 t@0x135b1b8 -164 third_party/WebKit/Source/platform/platform/GraphicsContext.o blink::GraphicsContext::EndRecording + 12836 t@0x6e5b8c 164 cc/paint/paint/paint_op_buffer.o cc::{{lambda + 12998 t@0x1386e88 162 third_party/WebKit/Source/platform/platform/PaintController.o blink::PaintController::AppendDebugDrawingAfterCommit + 13150 t@0x6e6644 152 cc/paint/paint/paint_op_buffer.o cc::PaintOpBuffer::Reset + 13302 t@0x6e5ff8 152 cc/paint/paint/paint_op_buffer.o cc::{{lambda + 13450 t@0x6e5f64 148 cc/paint/paint/paint_op_buffer.o cc::{{lambda - 13314 t@0x1382c30 -136 third_party/WebKit/Source/platform/platform/PaintController.o blink::PaintController::AppendDebugDrawingAfterCommit + 13450 t@0x6e5a7c 136 cc/paint/paint/paint_op_buffer.o cc::{{lambda + 13586 t@0x6e5b04 136 cc/paint/paint/paint_op_buffer.o cc::{{lambda + 13722 t@0x6e5c30 136 cc/paint/paint/paint_op_buffer.o cc::{{lambda + 13858 t@0x6e5cb8 136 cc/paint/paint/paint_op_buffer.o cc::{{lambda + 13990 t@0x6e6274 132 cc/paint/paint/paint_op_buffer.o cc::{{lambda + 14122 t@0x6e6318 132 cc/paint/paint/paint_op_buffer.o cc::{{lambda + 14246 t@0x6e5d40 124 cc/paint/paint/paint_op_buffer.o cc::{{lambda + 14370 t@0x6e5dbc 124 cc/paint/paint/paint_op_buffer.o cc::{{lambda + 14494 t@0x6e5e38 124 cc/paint/paint/paint_op_buffer.o cc::{{lambda + 14618 t@0x6e5eb4 124 cc/paint/paint/paint_op_buffer.o cc::{{lambda ~ 14734 t@0x6e45ec 116 cc/paint/paint/display_item_list.o cc::DisplayItemList::Raster const + 14842 t@0x139f960 108 third_party/WebKit/Source/platform/platform/PluginListBuilder.o WTF::PartitionAllocator::QuantizedSize<blink::PluginInfo> + 14946 t@0x6e6ab8 104 cc/paint/paint/paint_recorder.o cc::PaintRecorder::beginRecording ~ 14842 t@0x39756c -104 cc/cc/picture_image_layer.o cc::PictureImageLayer::PaintContentsToDisplayList ~ 14742 t@0x1f9ff26 -100 third_party/WebKit/Source/core/layout/svg/libsvg_layout.a/LayoutSVGResourcePattern.o blink::LayoutSVGResourcePattern::AsPaintRecord const + 14842 t@0x13775a2 100 third_party/WebKit/Source/platform/platform/SkiaImageFilterBuilder.o blink::SkiaImageFilterBuilder::BuildSourceGraphic - 14742 t@0x13731f2 -100 third_party/WebKit/Source/platform/platform/SkiaImageFilterBuilder.o blink::SkiaImageFilterBuilder::BuildSourceGraphic - 14646 t@0x1355596 -96 third_party/WebKit/Source/platform/platform/GraphicsContext.o blink::GraphicsContext::DrawRecord ~ 14550 t@0x136de8e -96 third_party/WebKit/Source/platform/platform/RecordingImageBufferSurface.o blink::RecordingImageBufferSurface::FinalizeFrameInternal + 14642 t@0x6e6a00 92 cc/paint/paint/paint_record.o cc::ToSkPicture - 14554 d@0x2ca3d68 -88 third_party/WebKit/Source/core/dom/libdom_1.a/DocumentStatisticsCollector.o ._453 ~ 14466 t@0x204f6e8 -88 third_party/WebKit/Source/core/svg/libsvg.a/SVGFEImage.o blink::FEImage::CreateImageFilterForLayoutObject + 14554 t@0x6e6560 88 cc/paint/paint/paint_op_buffer.o cc::DrawImageRectOp::DrawImageRectOp + 14642 t@0x6e6df4 88 cc/paint/paint/record_paint_canvas.o cc::RecordPaintCanvas::getLocalClipBounds const + 14730 t@0x6e6864 88 cc/paint/paint/paint_op_buffer.o cc::{{lambda + 14814 t@0x6e69ac 84 cc/paint/paint/paint_record.o cc::ToSkPicture ~ 14730 t@0xe03d18 -84 printing/printing/pdf_metafile_skia.o printing::PdfMetafileSkia::FinishPage + 14812 t@0x204d68c 82 third_party/WebKit/Source/core/svg/libsvg.a/SVGImage.o cc::MakePaintShaderRecord + 14892 t@0x1359b26 80 third_party/WebKit/Source/platform/platform/GraphicsContext.o blink::GraphicsContext::DrawRecord ~ 14812 t@0x204e974 -80 third_party/WebKit/Source/core/svg/libsvg.a/SVGImage.o blink::SVGImage::ImageForCurrentFrameForContainer ~ 14736 t@0x135b9f4 -76 third_party/WebKit/Source/platform/platform/GraphicsContext.o blink::RecordMarker + 14812 t@0x6e63f0 76 cc/paint/paint/paint_op_buffer.o cc::DrawLineOp::CountSlowPaths const + 14888 t@0x6e60d4 76 cc/paint/paint/paint_op_buffer.o cc::{{lambda + 14960 t@0x6e6120 72 cc/paint/paint/paint_op_buffer.o cc::{{lambda + 15030 t@0x136c170 70 third_party/WebKit/Source/platform/platform/Pattern.o blink::Pattern::CreatePaintRecordPattern - 14960 t@0x1367d08 -70 third_party/WebKit/Source/platform/platform/Pattern.o blink::Pattern::CreatePaintRecordPattern ~ 14892 t@0x13ff9c8 -68 third_party/WebKit/Source/web/web/LinkHighlightImpl.o blink::LinkHighlightImpl::PaintContents + 14960 t@0x6e6168 68 cc/paint/paint/paint_op_buffer.o cc::DrawIRectOp::RasterWithFlags const ~ 15024 d@0x2ca7d38 64 third_party/WebKit/Source/core/dom/libdom_1.a/DocumentStatisticsCollector.o ._454 + 15088 t@0x6e5870 64 cc/paint/paint/paint_flags.o cc::PaintFlags::IsSimpleOpacity const + 15152 t@0x6e6604 64 cc/paint/paint/paint_op_buffer.o cc::PaintOpBuffer::PaintOpBuffer + 15214 t@0x1fdd838 62 third_party/WebKit/Source/core/paint/libpaint_0.a/ClipPathClipper.o blink::ClipPathClipper::DrawClipAsMask + 15276 t@0x135985e 62 third_party/WebKit/Source/platform/platform/GraphicsContext.o blink::CreateEmptyPaintRecord + 15336 t@0x6e6524 60 cc/paint/paint/paint_op_buffer.o cc::DrawImageOp::DrawImageOp + 15396 t@0x6e6d5c 60 cc/paint/paint/record_paint_canvas.o cc::RecordPaintCanvas::getDeviceClipBounds const ~ 15340 t@0x204f8ac -56 third_party/WebKit/Source/core/svg/libsvg.a/SVGFEImage.o blink::FEImage::CreateImageFilter - 15286 t@0x138019c -54 third_party/WebKit/Source/platform/platform/DrawingDisplayItem.o blink::DrawingDisplayItem::AnalyzeForGpuRasterization const ~ 15234 t@0x13521fc -52 third_party/WebKit/Source/platform/platform/Canvas2DLayerBridge.o blink::Canvas2DLayerBridge::FlushRecordingOnly ~ 15182 t@0x13885cc -52 third_party/WebKit/Source/platform/platform/PaintController.o blink::PaintController::CommitNewDisplayItems + 15234 t@0x6e6b20 52 cc/paint/paint/paint_recorder.o cc::PaintRecorder::finishRecordingAsPicture + 15286 t@0x6e6b80 52 cc/paint/paint/record_paint_canvas.o cc::RecordPaintCanvas::~RecordPaintCanvas + 15338 t@0x6e5f30 52 cc/paint/paint/paint_op_buffer.o cc::{{lambda ~ 15286 t@0xe038c0 -52 printing/printing/pdf_metafile_skia.o printing::PdfMetafileSkia::StartPage ~ 15238 r@Group -48 {{no path}} ** merge strings (count=6) ~ 15192 t@0x1351e66 -46 third_party/WebKit/Source/platform/platform/Canvas2DLayerBridge.o blink::Canvas2DLayerBridge::SkipQueuedDrawCommands ~ 15146 t@0x1351c30 -46 third_party/WebKit/Source/platform/platform/Canvas2DLayerBridge.o blink::Canvas2DLayerBridge::StartRecording + 15190 t@0x6e63c4 44 cc/paint/paint/paint_op_buffer.o cc::ClipPathOp::CountSlowPaths const + 15234 t@0x6e58e8 44 cc/paint/paint/paint_image.o cc::PaintImage::PaintImage + 15278 t@0x6e6980 44 cc/paint/paint/paint_op_buffer.o cc::PaintOpBuffer::ShrinkToFit + 15322 t@0x6e6b54 44 cc/paint/paint/record_paint_canvas.o cc::RecordPaintCanvas::~RecordPaintCanvas ~ 15280 t@0x0 -42 {{no path}} ** aggregate padding of diff'ed symbols + 15320 t@0x136abc0 40 third_party/WebKit/Source/platform/platform/PaintRecordPattern.o blink::PaintRecordPattern::PaintRecordPattern - 15280 t@0x136677c -40 third_party/WebKit/Source/platform/platform/PaintRecordPattern.o blink::PaintRecordPattern::PaintRecordPattern + 15320 t@0x6e66fc 40 cc/paint/paint/paint_op_buffer.o cc::PaintOpBuffer::~PaintOpBuffer + 15360 t@0x6e9620 40 cc/paint/paint/record_paint_canvas.o cc::RecordPaintCanvas::RecordPaintCanvas + 15400 t@0x6e6c88 40 cc/paint/paint/record_paint_canvas.o cc::RecordPaintCanvas::imageInfo const ... snip ...
,
Apr 28 2017
I messed up my before/after for content shell. Release ContentShell.apk before patch: 37,029,701 bytes Release ContentShell.apk after patch: 37,036,205 bytes delta: +6504 bytes Release MonochromePublic.apk before patch: 82,034,124 bytes Release MonochromePublic.apk after patch: 82,050,524 bytes delta: +16400 bytes Looking at the symbols there's a lot of lambdas there we could maybe detemplatize I'll look where they are coming from.
,
Apr 28 2017
Moving the non-type-dependent code out of push_internal reduces the binary by 4k, bringing MonochromePublic.apk to 82,046,428 bytes.
,
Apr 28 2017
By: - Moving PaintFlags up to a base PaintOpWithFlags class - Making FooPaintOp::Raster static - Moving the non-type-dependant code out of PaintWithAlpha templates (with a function pointer to FooPaintOp::Raster) - Removing the raster lambdas and replacing with function pointers to FooPaintOp::Raster it brings MonochromePublic.apk to 82,042,332 bytes. That's 8.2k reduced from the original CL.
,
Apr 29 2017
=== Auto-CCing suspected CL author enne@chromium.org === Hi enne@chromium.org, the bisect results pointed to your CL, please take a look at the results. === BISECT JOB RESULTS === Perf regression found with culprit Suspected Commit Author : enne Commit : f5a5ed867ba06ae56f8fc299a9eb194471277eec Date : Wed Apr 26 16:04:12 2017 Subject: Back PaintRecord with PaintOpBuffer instead of SkPicture Bisect Details Configuration: android_nexus7_perf_bisect Benchmark : resource_sizes Metric : MonochromePublic.apk_Specifics/normalized apk size Change : 0.02% | 73751010.0 -> 73767394.0 Revision Result N chromium@467334 73751010 +- 0.0 6 good chromium@467335 73767394 +- 0.0 6 bad <-- To Run This Test src/build/android/resource_sizes.py --chromium-output-directory {CHROMIUM_OUTPUT_DIR} --chartjson {CHROMIUM_OUTPUT_DIR}/apks/MonochromePublic.apk Debug Info https://chromeperf.appspot.com/buildbucket_job_status/8981078010101977104 Is this bisect wrong? https://chromeperf.appspot.com/bad_bisect?try_job_id=5256238327136256 | O O | Visit http://www.chromium.org/developers/speed-infra/perf-bug-faq | X | for more information addressing perf regression bugs. For feedback, | / \ | file a bug with component Speed>Bisection. Thank you!
,
May 2 2017
,
May 3 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/954ca39066bbc77ca7c653c76a02467644c601d2 commit 954ca39066bbc77ca7c653c76a02467644c601d2 Author: danakj <danakj@chromium.org> Date: Wed May 03 21:08:40 2017 cc: Reduce the size of PaintOpBuffer. Step 1: Moves the non-type-dependent code out of push_internal to a helper method. Step 2: Moves PaintFlags up to a base PaintOpWithFlags class. Makes FooPaintOp::Raster static. Moves the non-type-dependant code out of PaintWithAlpha templates (with a function pointer to FooPaintOp::Raster) Removes the Rasterizer::Raster template methods, and the RasterFunction lambdas, replacing them with function pointers to FooPaintOp::Raster directly. These changes reduce MonochromePublic.apk from 82,050,524 bytes to 82,042,332 bytes. Before PaintOpBuffer the apk was at 82,034,124 bytes, so this reduces the binary by 50% of the original growth. R=enne@chromium.org BUG= 716393 , 671433 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel Review-Url: https://codereview.chromium.org/2849563005 Cr-Commit-Position: refs/heads/master@{#469121} [modify] https://crrev.com/954ca39066bbc77ca7c653c76a02467644c601d2/cc/paint/paint_op_buffer.cc [modify] https://crrev.com/954ca39066bbc77ca7c653c76a02467644c601d2/cc/paint/paint_op_buffer.h
,
May 3 2017
ok that CL dropped half the size change, and I can understand the list of symbols posted above (many were removed with that CL). So I'm going to mark fixed and move on.
,
May 9 2017
|
|||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||
Comment 1 by rmcilroy@chromium.org
, Apr 28 2017