New issue
Advanced search Search tips

Issue 781460 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug



Sign in to add a comment

Building the ProcAddress map takes 200ms at Chrome GPU process startup

Project Member Reported by wittman@chromium.org, Nov 3 2017

Issue description

Data from the UMA Sampling Profiler shows that building the ProcAddress map requires over 200ms during GPU process startup. This is in canary release 64.0.3255.0 on 64 bit Chrome on Windows.

180ms of this time is spent solely in ProcAddressMap::_Try_emplace<std::string>.

Code here: https://cs.chromium.org/chromium/src/third_party/angle/src/libGLESv2/entry_points_egl.cpp?rcl=d255123c63c331bc32402eeeb3ecd18d6b18e97d&l=1808

Flame graph showing this code path in 64.0.3255.0:
https://uma.googleplex.com/p/chrome/callstacks?sid=6ed6b9578489e5ecff6fef64311a10a0
 
Cc: piman@chromium.org
Components: Internals>GPU>ANGLE
Ping... do we have someone who can look at this issue? This seems like an enormous inefficiency on the critical path for GPU process startup.
Cc: geoffl...@chromium.org
Owner: jmad...@chromium.org
It doesn't seem too difficult to fix. We could pretty easily replace the std::map with a switch. Can take a look.
Sorry, that doesn't make sense... let me think about it a bit more.
Project Member

Comment 4 by bugdroid1@chromium.org, Nov 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/angle/angle/+/5ad52994ba18937eae281c735d240fa193fa395a

commit 5ad52994ba18937eae281c735d240fa193fa395a
Author: Jamie Madill <jmadill@chromium.org>
Date: Tue Nov 14 19:46:54 2017

Add generator for EGL proc table.

This should improve ANGLE startup time by avoiding creating a large
std::map filled with the entry points.

BUG= chromium:781460 

Change-Id: I20cfdb10b99844d0f60759dda73b729991dc60fe
Reviewed-on: https://chromium-review.googlesource.com/768209
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>

[modify] https://crrev.com/5ad52994ba18937eae281c735d240fa193fa395a/src/libANGLE/PackedGLEnums_autogen.h
[add] https://crrev.com/5ad52994ba18937eae281c735d240fa193fa395a/src/libGLESv2/proc_table_autogen.cpp
[modify] https://crrev.com/5ad52994ba18937eae281c735d240fa193fa395a/src/libGLESv2.gypi
[modify] https://crrev.com/5ad52994ba18937eae281c735d240fa193fa395a/scripts/run_code_generation.py
[modify] https://crrev.com/5ad52994ba18937eae281c735d240fa193fa395a/src/libGLESv2/entry_points_egl.cpp
[modify] https://crrev.com/5ad52994ba18937eae281c735d240fa193fa395a/src/tests/egl_tests/EGLSanityCheckTest.cpp
[add] https://crrev.com/5ad52994ba18937eae281c735d240fa193fa395a/src/libGLESv2/gen_proc_table.py
[modify] https://crrev.com/5ad52994ba18937eae281c735d240fa193fa395a/src/libANGLE/PackedGLEnums_autogen.cpp
[add] https://crrev.com/5ad52994ba18937eae281c735d240fa193fa395a/src/libGLESv2/proc_table.h
[add] https://crrev.com/5ad52994ba18937eae281c735d240fa193fa395a/src/libGLESv2/proc_table_data.json

Project Member

Comment 5 by bugdroid1@chromium.org, Nov 14 2017

The following revision refers to this bug:
  https://skia.googlesource.com/skia/+/af71accc86e85f8ea17c516f26364e33480bcb6b

commit af71accc86e85f8ea17c516f26364e33480bcb6b
Author: angle-deps-roller@chromium.org <angle-deps-roller@chromium.org>
Date: Tue Nov 14 21:21:14 2017

Roll skia/third_party/externals/angle2/ e8afa9025..7caa80e75 (2 commits)

https://chromium.googlesource.com/angle/angle.git/+log/e8afa90250dd..7caa80e75989

$ git log e8afa9025..7caa80e75 --date=short --no-merges --format='%ad %ae %s'
2017-11-14 oetuaho Edit tests to reference temporary variables
2017-11-14 jmadill Add generator for EGL proc table.

Created with:
  roll-dep skia/third_party/externals/angle2
BUG= 781460 


The AutoRoll server is located here: https://angle-skia-roll.skia.org

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.


CQ_INCLUDE_TRYBOTS=skia.primary:Perf-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE,Perf-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE,Perf-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE,Perf-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE,Perf-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE,Perf-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-ANGLE,Test-Win10-Clang-AlphaR2-GPU-RadeonR9M470X-x86_64-Debug-All-ANGLE,Test-Win10-MSVC-Golo-GPU-QuadroP400-x86_64-Debug-All-ANGLE,Test-Win10-Clang-NUC5i7RYH-GPU-IntelIris6100-x86_64-Debug-All-ANGLE,Test-Win10-Clang-NUC6i5SYK-GPU-IntelIris540-x86_64-Debug-All-ANGLE,Test-Win10-Clang-NUCD34010WYKH-GPU-IntelHD4400-x86_64-Debug-All-ANGLE,Test-Win10-Clang-ShuttleC-GPU-GTX960-x86_64-Debug-All-ANGLE,Build-Debian9-GCC-x86_64-Release-ANGLE
TBR=brianosman@google.com

Change-Id: Idb5127b2ed6df791c60141a9af21498ba2e241d4
Reviewed-on: https://skia-review.googlesource.com/71414
Reviewed-by: angle-deps-roller . <angle-deps-roller@chromium.org>
Commit-Queue: angle-deps-roller . <angle-deps-roller@chromium.org>

[modify] https://crrev.com/af71accc86e85f8ea17c516f26364e33480bcb6b/DEPS

Project Member

Comment 6 by bugdroid1@chromium.org, Nov 14 2017

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

commit de25397606d8da17d0be6b4fcfbbb20b572b6b9e
Author: angle-deps-roller@chromium.org <angle-deps-roller@chromium.org>
Date: Tue Nov 14 22:29:42 2017

Roll src/third_party/angle/ e8afa9025..fb7685f40 (3 commits)

https://chromium.googlesource.com/angle/angle.git/+log/e8afa90250dd..fb7685f4035e

$ git log e8afa9025..fb7685f40 --date=short --no-merges --format='%ad %ae %s'
2017-11-13 geofflang Validate texture parameters for >0 after rounding.
2017-11-14 oetuaho Edit tests to reference temporary variables
2017-11-14 jmadill Add generator for EGL proc table.

Created with:
  roll-dep src/third_party/angle
BUG= 783574 , 781460 


The AutoRoll server is located here: https://angle-chromium-roll.skia.org

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.


CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_optional_gpu_tests_rel;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
TBR=ynovikov@chromium.org

Change-Id: I8b015a2c4790a858a094ec96d20268f92db9dd72
Reviewed-on: https://chromium-review.googlesource.com/769767
Reviewed-by: angle-deps-roller . <angle-deps-roller@chromium.org>
Commit-Queue: angle-deps-roller . <angle-deps-roller@chromium.org>
Cr-Commit-Position: refs/heads/master@{#516465}
[modify] https://crrev.com/de25397606d8da17d0be6b4fcfbbb20b572b6b9e/DEPS

Project Member

Comment 7 by bugdroid1@chromium.org, Nov 15 2017

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

commit ef39aea5a536f491a6cd5aa852ce15e44ce7972f
Author: skia-deps-roller@chromium.org <skia-deps-roller@chromium.org>
Date: Wed Nov 15 00:42:21 2017

Roll src/third_party/skia/ 76589f9b9..6f8fca75d (5 commits)

https://skia.googlesource.com/skia.git/+log/76589f9b9bec..6f8fca75d8f4

$ git log 76589f9b9..6f8fca75d --date=short --no-merges --format='%ad %ae %s'
2017-11-14 angle-deps-roller Roll skia/third_party/externals/angle2/ 7caa80e75..fb7685f40 (1 commit)
2017-11-14 scroggo Fix webp bug compositing alpha frames on opaque
2017-11-14 angle-deps-roller Roll skia/third_party/externals/angle2/ e8afa9025..7caa80e75 (2 commits)
2017-11-14 mtklein remove Win2016 NativeFonts bots
2017-11-14 brianosman Viewer: backspace jumps directly to the slide picker

Created with:
  roll-dep src/third_party/skia
BUG= 783574 , 781460 


The AutoRoll server is located here: https://autoroll.skia.org

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff, who should
be CC'd on the roll, and stop the roller if necessary.


CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel;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
TBR=brianosman@chromium.org

Change-Id: I9d7ae992684a93f89539d38b7cabb80aa146f8ee
Reviewed-on: https://chromium-review.googlesource.com/769673
Reviewed-by: Skia Deps Roller <skia-deps-roller@chromium.org>
Commit-Queue: Skia Deps Roller <skia-deps-roller@chromium.org>
Cr-Commit-Position: refs/heads/master@{#516524}
[modify] https://crrev.com/ef39aea5a536f491a6cd5aa852ce15e44ce7972f/DEPS

Cc: wittman@chromium.org
wittman@ this should go out in the next Canary. Please let us know in the next few weeks if you see an improvement.
Great! We should have results the day following the canary release. I will take a look and check back.
Status: Fixed (was: Assigned)
Excellent, thanks for the verification Alexei. It also looks like total GPU startup time is down, so that's some evidence the gained time didn't migrate elsewhere. Going to close this out, though I might make one minor refactoring change.
Labels: Performance-Browser
Bulk adding Performance-Browser label for bugs identified with the UMA Sampling Profiler.

Sign in to add a comment