commit | 331266377d03b51dc3e2cf2c26b896e21f8f0391 | [log] [tgz] |
---|---|---|
author | Alexandr Ilin <alexilin@chromium.org> | Wed Nov 14 14:48:17 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Wed Nov 14 14:48:17 2018 |
tree | 9bbb5ddc4d05fb37e5811ecdd336689d1950d2cf | |
parent | 65644ef9859380e742f3a5d91c627e3b3e942183 [diff] |
Constexpr-eliminate GetCategoryGroupEnabled calls for popular categories This CL allows to avoid the cost of calling GetCategoryGroupEnabled() in TRACE_EVENT macros for popular categories, in a way that doesn't require more macros, nor changing all the call sites. The idea is to put all popular categories into a static global array so an address of a category state may be determined at compile-time through a call to a constexpr function. This CL makes it impossible to use non constant expressions as a category name in the tracing macros. All the call sites that don't satisfy this requirement have to be converted. Hopefully, there aren't a lot of such callers. This change reduces the code size generated from each trace macro by ~16 bytes, check the full report here: https://docs.google.com/document/d/1piIq_yi2fsqOEKObx0tFHeunMyX7hp2ZdAGKK6t0k80/edit?usp=sharing. The total Android apk size savings are ~60 KiB. Bug: 702718, 708990 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;master.tryserver.blink:linux_trusty_blink_rel Change-Id: I9f7b48fd4ee614996feaabda3e5495fd9b786c3a Reviewed-on: https://chromium-review.googlesource.com/c/1251361 Commit-Queue: Alexandr Ilin <alexilin@chromium.org> Reviewed-by: Scott Violet <sky@chromium.org> Reviewed-by: Primiano Tucci <primiano@chromium.org> Reviewed-by: Tibor Goldschwendt <tiborg@chromium.org> Reviewed-by: Frank Liberato <liberato@chromium.org> Reviewed-by: vmpstr <vmpstr@chromium.org> Reviewed-by: Sami Kyöstilä <skyostil@chromium.org> Reviewed-by: David Turner <digit@chromium.org> Cr-Commit-Position: refs/heads/master@{#607975}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .