[tracing] Migrate legacy TRACE_EVENT_BEGIN/END[012] macros [chromium/src : main]

0 views
Skip to first unread message

Etienne Pierre-Doray (Gerrit)

unread,
Jul 2, 2026, 12:00:51 PM (yesterday) Jul 2
to Gabriel Charette, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, devtools...@chromium.org, Dirk Schulze, Kentaro Hara, Hirokazu Honda, Hongchan Choi, Raphael Kubo da Costa, Stephen Chenney, Sean Maher, Thiabaud Engelbrecht, agriev...@chromium.org, android-web...@chromium.org, apavlo...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-reviews-p...@chromium.org, blink-...@chromium.org, cc-...@chromium.org, christia...@chromium.org, chromeos-gfx-...@google.com, chromium-a...@chromium.org, devtools-re...@chromium.org, dom+...@chromium.org, drott+bl...@chromium.org, eme-r...@chromium.org, extension...@chromium.org, fdoray...@chromium.org, feature-me...@chromium.org, feature-v...@chromium.org, fmalit...@chromium.org, fserb...@chromium.org, gab+...@chromium.org, gavin...@chromium.org, hayato...@chromium.org, hiroshig...@chromium.org, jdonnel...@chromium.org, jessemcke...@google.com, kinuko...@chromium.org, kouhei...@chromium.org, lizeb...@chromium.org, loading-rev...@chromium.org, marinacio...@chromium.org, mattreyno...@chromium.org, media-cro...@chromium.org, net-r...@chromium.org, nyquis...@chromium.org, olka+...@chromium.org, omnibox-...@chromium.org, ozone-...@chromium.org, pasko...@chromium.org, roblia...@chromium.org, scheduler...@chromium.org, spang...@chromium.org, subresource-f...@chromium.org, tommyw+w...@chromium.org, torne...@chromium.org, tracing...@chromium.org, twifka...@chromium.org, vaapi-...@chromium.org, video-networking...@google.com, wfh+...@chromium.org, yfriedm...@chromium.org, zol...@webkit.org
Attention needed from Gabriel Charette

Etienne Pierre-Doray added 1 comment

Patchset-level comments
File-level comment, Patchset 5 (Latest):
Etienne Pierre-Doray . resolved

PTAL

Open in Gerrit

Related details

Attention is currently required from:
  • Gabriel Charette
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I57986ea1bba109dbe3a3926137215d34fa546a3a
Gerrit-Change-Number: 8028395
Gerrit-PatchSet: 5
Gerrit-Owner: Etienne Pierre-Doray <etie...@chromium.org>
Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
Gerrit-Reviewer: Gabriel Charette <g...@chromium.org>
Gerrit-CC: Dirk Schulze <dsch...@chromium.org>
Gerrit-CC: Hirokazu Honda <hi...@chromium.org>
Gerrit-CC: Hongchan Choi <hong...@chromium.org>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-CC: Menard, Alexis <alexis...@intel.com>
Gerrit-CC: Michael Wilson <mjwi...@chromium.org>
Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
Gerrit-CC: Sean Maher <sp...@chromium.org>
Gerrit-CC: Stephen Chenney <sche...@chromium.org>
Gerrit-CC: Thiabaud Engelbrecht <thia...@google.com>
Gerrit-Attention: Gabriel Charette <g...@chromium.org>
Gerrit-Comment-Date: Thu, 02 Jul 2026 16:00:39 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Gabriel Charette (Gerrit)

unread,
Jul 2, 2026, 11:11:02 PM (16 hours ago) Jul 2
to Etienne Pierre-Doray, Gabriel Charette, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, devtools...@chromium.org, Dirk Schulze, Kentaro Hara, Hirokazu Honda, Hongchan Choi, Raphael Kubo da Costa, Stephen Chenney, Sean Maher, Thiabaud Engelbrecht, agriev...@chromium.org, android-web...@chromium.org, apavlo...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-reviews-p...@chromium.org, blink-...@chromium.org, cc-...@chromium.org, christia...@chromium.org, chromeos-gfx-...@google.com, chromium-a...@chromium.org, devtools-re...@chromium.org, dom+...@chromium.org, drott+bl...@chromium.org, eme-r...@chromium.org, extension...@chromium.org, fdoray...@chromium.org, feature-me...@chromium.org, feature-v...@chromium.org, fmalit...@chromium.org, fserb...@chromium.org, gab+...@chromium.org, gavin...@chromium.org, hayato...@chromium.org, hiroshig...@chromium.org, jdonnel...@chromium.org, jessemcke...@google.com, kinuko...@chromium.org, kouhei...@chromium.org, lizeb...@chromium.org, loading-rev...@chromium.org, marinacio...@chromium.org, mattreyno...@chromium.org, media-cro...@chromium.org, net-r...@chromium.org, nyquis...@chromium.org, olka+...@chromium.org, omnibox-...@chromium.org, ozone-...@chromium.org, pasko...@chromium.org, roblia...@chromium.org, scheduler...@chromium.org, spang...@chromium.org, subresource-f...@chromium.org, tommyw+w...@chromium.org, torne...@chromium.org, tracing...@chromium.org, twifka...@chromium.org, vaapi-...@chromium.org, video-networking...@google.com, wfh+...@chromium.org, yfriedm...@chromium.org, zol...@webkit.org
Attention needed from Etienne Pierre-Doray

Gabriel Charette voted and added 2 comments

Votes added by Gabriel Charette

Code-Review+1
Owners-Override+1

2 comments

Patchset-level comments
Gabriel Charette . resolved

LGTM w/ comment

File components/sync/engine/commit.cc
Line 172, Patchset 5 (Latest): SyncerError post_result = [&]() {
Gabriel Charette . unresolved

Accidentally dropped `const` ?

Open in Gerrit

Related details

Attention is currently required from:
  • Etienne Pierre-Doray
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement satisfiedReview-Enforcement
Gerrit-Attention: Etienne Pierre-Doray <etie...@chromium.org>
Gerrit-Comment-Date: Fri, 03 Jul 2026 03:10:42 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Etienne Pierre-Doray (Gerrit)

unread,
7:29 AM (7 hours ago) 7:29 AM
to Gabriel Charette, android-bu...@system.gserviceaccount.com, Chromium LUCI CQ, Menard, Alexis, chromium...@chromium.org, devtools...@chromium.org, Dirk Schulze, Kentaro Hara, Hirokazu Honda, Hongchan Choi, Raphael Kubo da Costa, Stephen Chenney, Sean Maher, Thiabaud Engelbrecht, agriev...@chromium.org, android-web...@chromium.org, apavlo...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-reviews-p...@chromium.org, blink-...@chromium.org, cc-...@chromium.org, christia...@chromium.org, chromeos-gfx-...@google.com, chromium-a...@chromium.org, devtools-re...@chromium.org, dom+...@chromium.org, drott+bl...@chromium.org, eme-r...@chromium.org, extension...@chromium.org, fdoray...@chromium.org, feature-me...@chromium.org, feature-v...@chromium.org, fmalit...@chromium.org, fserb...@chromium.org, gab+...@chromium.org, gavin...@chromium.org, hayato...@chromium.org, hiroshig...@chromium.org, jdonnel...@chromium.org, jessemcke...@google.com, kinuko...@chromium.org, kouhei...@chromium.org, lizeb...@chromium.org, loading-rev...@chromium.org, marinacio...@chromium.org, mattreyno...@chromium.org, media-cro...@chromium.org, net-r...@chromium.org, nyquis...@chromium.org, olka+...@chromium.org, omnibox-...@chromium.org, ozone-...@chromium.org, pasko...@chromium.org, roblia...@chromium.org, scheduler...@chromium.org, spang...@chromium.org, subresource-f...@chromium.org, tommyw+w...@chromium.org, torne...@chromium.org, tracing...@chromium.org, twifka...@chromium.org, vaapi-...@chromium.org, video-networking...@google.com, wfh+...@chromium.org, yfriedm...@chromium.org, zol...@webkit.org

Etienne Pierre-Doray voted and added 1 comment

Votes added by Etienne Pierre-Doray

Commit-Queue+2

1 comment

File components/sync/engine/commit.cc
Line 172, Patchset 5: SyncerError post_result = [&]() {
Gabriel Charette . resolved

Accidentally dropped `const` ?

Etienne Pierre-Doray

Done

Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I57986ea1bba109dbe3a3926137215d34fa546a3a
    Gerrit-Change-Number: 8028395
    Gerrit-PatchSet: 6
    Gerrit-Owner: Etienne Pierre-Doray <etie...@chromium.org>
    Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
    Gerrit-Reviewer: Gabriel Charette <g...@chromium.org>
    Gerrit-CC: Dirk Schulze <dsch...@chromium.org>
    Gerrit-CC: Hirokazu Honda <hi...@chromium.org>
    Gerrit-CC: Hongchan Choi <hong...@chromium.org>
    Gerrit-CC: Kentaro Hara <har...@chromium.org>
    Gerrit-CC: Menard, Alexis <alexis...@intel.com>
    Gerrit-CC: Michael Wilson <mjwi...@chromium.org>
    Gerrit-CC: Raphael Kubo da Costa <ku...@igalia.com>
    Gerrit-CC: Sean Maher <sp...@chromium.org>
    Gerrit-CC: Stephen Chenney <sche...@chromium.org>
    Gerrit-CC: Thiabaud Engelbrecht <thia...@google.com>
    Gerrit-Comment-Date: Fri, 03 Jul 2026 11:29:03 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Gabriel Charette <g...@chromium.org>
    satisfied_requirement
    open
    diffy

    Chromium LUCI CQ (Gerrit)

    unread,
    8:07 AM (7 hours ago) 8:07 AM
    to Etienne Pierre-Doray, Gabriel Charette, android-bu...@system.gserviceaccount.com, Menard, Alexis, chromium...@chromium.org, devtools...@chromium.org, Dirk Schulze, Kentaro Hara, Hirokazu Honda, Hongchan Choi, Raphael Kubo da Costa, Stephen Chenney, Sean Maher, Thiabaud Engelbrecht, agriev...@chromium.org, android-web...@chromium.org, apavlo...@chromium.org, blink-revie...@chromium.org, blink-re...@chromium.org, blink-re...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-revi...@chromium.org, blink-rev...@chromium.org, blink-reviews-p...@chromium.org, blink-...@chromium.org, cc-...@chromium.org, christia...@chromium.org, chromeos-gfx-...@google.com, chromium-a...@chromium.org, devtools-re...@chromium.org, dom+...@chromium.org, drott+bl...@chromium.org, eme-r...@chromium.org, extension...@chromium.org, fdoray...@chromium.org, feature-me...@chromium.org, feature-v...@chromium.org, fmalit...@chromium.org, fserb...@chromium.org, gab+...@chromium.org, gavin...@chromium.org, hayato...@chromium.org, hiroshig...@chromium.org, jdonnel...@chromium.org, jessemcke...@google.com, kinuko...@chromium.org, kouhei...@chromium.org, lizeb...@chromium.org, loading-rev...@chromium.org, marinacio...@chromium.org, mattreyno...@chromium.org, media-cro...@chromium.org, net-r...@chromium.org, nyquis...@chromium.org, olka+...@chromium.org, omnibox-...@chromium.org, ozone-...@chromium.org, pasko...@chromium.org, roblia...@chromium.org, scheduler...@chromium.org, spang...@chromium.org, subresource-f...@chromium.org, tommyw+w...@chromium.org, torne...@chromium.org, tracing...@chromium.org, twifka...@chromium.org, vaapi-...@chromium.org, video-networking...@google.com, wfh+...@chromium.org, yfriedm...@chromium.org, zol...@webkit.org

    Chromium LUCI CQ submitted the change with unreviewed changes

    Unreviewed changes

    5 is the latest approved patch-set.
    The change was submitted with unreviewed changes in the following files:

    ```
    The name of the file: components/sync/engine/commit.cc
    Insertions: 1, Deletions: 1.

    @@ -169,7 +169,7 @@
    cycle->SendProtocolEvent(request_event);

    sync_pb::ClientToServerResponse response;
    - SyncerError post_result = [&]() {
    + const SyncerError post_result = [&]() {
    TRACE_EVENT("sync", "PostCommit");
    return SyncerProtoUtil::PostClientToServerMessage(message_, &response,
    cycle, nullptr);
    ```
    ```
    The name of the file: base/profiler/stack_copier_signal.cc
    Insertions: 16, Deletions: 18.

    @@ -252,25 +252,23 @@
    action.sa_sigaction = CopyStackSignalHandler;
    action.sa_flags = SA_RESTART | SA_SIGINFO;
    sigemptyset(&action.sa_mask);
    - {
    - TRACE_EVENT(TRACE_DISABLED_BY_DEFAULT("cpu_profiler.debug"),
    - "StackCopierSignal copy stack");
    - // SIGURG is chosen here because we observe no crashes with this signal
    - // and neither Chrome or the AOSP sets up a special handler for this
    - // signal.
    - struct sigaction original_action = {};
    - ScopedSigaction scoped_sigaction(SIGURG, &action, &original_action);
    - if (!scoped_sigaction.succeeded()) {
    - return false;
    - }
    -
    - if (syscall(SYS_tgkill, getpid(), thread_delegate_->GetThreadId(),
    - SIGURG) != 0) {
    - NOTREACHED();
    - }
    - bool finished_waiting = wait_event.Wait();
    - CHECK(finished_waiting);
    + TRACE_EVENT_BEGIN(TRACE_DISABLED_BY_DEFAULT("cpu_profiler.debug"),
    + "StackCopierSignal copy stack");
    + // SIGURG is chosen here because we observe no crashes with this signal and
    + // neither Chrome or the AOSP sets up a special handler for this signal.
    + struct sigaction original_action = {};
    + ScopedSigaction scoped_sigaction(SIGURG, &action, &original_action);
    + if (!scoped_sigaction.succeeded()) {
    + return false;
    }
    +
    + if (syscall(SYS_tgkill, getpid(), thread_delegate_->GetThreadId(),
    + SIGURG) != 0) {
    + NOTREACHED();
    + }
    + bool finished_waiting = wait_event.Wait();
    + TRACE_EVENT_END(TRACE_DISABLED_BY_DEFAULT("cpu_profiler.debug"));
    + CHECK(finished_waiting);
    // Ideally, an accurate timestamp is captured while the sampled thread is
    // paused. In rare cases, this may fail, in which case we resort to
    // capturing an delayed timestamp here instead.
    ```

    Change information

    Commit message:
    [tracing] Migrate legacy TRACE_EVENT_BEGIN/END[012] macros

    TRACE_EVENT_BEGIN[012](...) -> TRACE_EVENT_BEGIN(...)
    TRACE_EVENT_END[012](cat, name, ...) -> TRACE_EVENT_END(cat, ...)

    TRACE_EVENT_BEGIN requires compile time string or StaticString.
    This CL changes string definitions required to fix this.

    This also converts some _BEGIN/_END pairs to a scoped TRACE_EVENT
    when possible.
    Bug: 432427382
    Change-Id: I57986ea1bba109dbe3a3926137215d34fa546a3a
    Reviewed-by: Gabriel Charette <g...@chromium.org>
    Owners-Override: Gabriel Charette <g...@chromium.org>
    Commit-Queue: Etienne Pierre-Doray <etie...@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1656501}
    Files:
    • M android_webview/common/devtools_instrumentation.h
    • M base/android/sys_utils.cc
    • M base/profiler/stack_copier_signal.cc
    • M base/task/current_thread.cc
    • M base/task/thread_pool/worker_thread.cc
    • M base/test/tracing/trace_event_analyzer_unittest.cc
    • M base/threading/scoped_thread_priority.cc
    • M base/threading/thread_restrictions.cc
    • M base/trace_event/trace_event_unittest.cc
    • M cc/base/devtools_instrumentation.cc
    • M cc/base/devtools_instrumentation.h
    • M cc/benchmarks/benchmark_instrumentation.h
    • M cc/paint/display_item_list.cc
    • M cc/tiles/frame_viewer_instrumentation.cc
    • M cc/tiles/tile_manager.cc
    • M cc/trees/layer_tree_host_impl.cc
    • M cc/trees/layer_tree_impl.cc
    • M chrome/browser/chrome_browser_main.cc
    • M components/omnibox/browser/tab_group_provider.cc
    • M components/paint_preview/common/serialized_recording.cc
    • M components/paint_preview/renderer/paint_preview_recorder_impl.cc
    • M components/sharing_message/sharing_fcm_handler.cc
    • M components/subresource_filter/core/common/indexed_ruleset.cc
    • M components/sync/engine/commit.cc
    • M content/browser/media/forwarding_audio_stream_factory.cc
    • M content/browser/web_package/signed_exchange_signature_verifier.cc
    • M content/common/trace_utils.h
    • M content/services/auction_worklet/auction_v8_helper.cc
    • M device/gamepad/xinput_data_fetcher_win.cc
    • M device/gamepad/xinput_haptic_gamepad_win.cc
    • M device/vr/android/arcore/arcore_impl.cc
    • M device/vr/openxr/openxr_api_wrapper.cc
    • M device/vr/openxr/openxr_render_loop.cc
    • M gpu/command_buffer/service/gpu_persistent_cache.cc
    • M gpu/ipc/service/command_buffer_stub.cc
    • M media/audio/apple/audio_low_latency_input.cc
    • M media/audio/audio_input_device.cc
    • M media/base/audio_fifo.cc
    • M media/base/fake_audio_worker.cc
    • M media/cdm/cdm_adapter.cc
    • M media/gpu/vaapi/vaapi_video_decoder.cc
    • M media/renderers/video_renderer_impl.cc
    • M net/disk_cache/sql/sql_persistent_store_backend.cc
    • M net/disk_cache/sql/sql_shared_cache_index_database.cc
    • M net/filter/filter_source_stream.cc
    • M services/audio/stream_factory.cc
    • M third_party/blink/renderer/bindings/core/v8/script_streamer.cc
    • M third_party/blink/renderer/bindings/core/v8/v8_code_cache.cc
    • M third_party/blink/renderer/bindings/core/v8/v8_script_runner.cc
    • M third_party/blink/renderer/core/css/parser/css_parser_impl.cc
    • M third_party/blink/renderer/core/dom/document.cc
    • M third_party/blink/renderer/core/exported/extension_script_streamer.cc
    • M third_party/blink/renderer/core/exported/web_frame_serializer.cc
    • M third_party/blink/renderer/core/frame/local_frame_ukm_aggregator.cc
    • M third_party/blink/renderer/core/frame/local_frame_view.cc
    • M third_party/blink/renderer/core/html/parser/html_document_parser.cc
    • M third_party/blink/renderer/core/inspector/inspector_trace_events.cc
    • M third_party/blink/renderer/core/layout/layout_view.cc
    • M third_party/blink/renderer/core/paint/paint_layer_painter.cc
    • M third_party/blink/renderer/modules/media/audio/audio_renderer_sink_cache.cc
    • M third_party/blink/renderer/modules/mediastream/web_media_player_ms_compositor.cc
    • M third_party/blink/renderer/modules/webaudio/script_processor_handler.cc
    • M third_party/blink/renderer/modules/webcodecs/audio_encoder.cc
    • M third_party/blink/renderer/modules/webcodecs/decoder_template.cc
    • M third_party/blink/renderer/modules/webcodecs/encoder_base.cc
    • M third_party/blink/renderer/modules/webcodecs/video_encoder.cc
    • M third_party/blink/renderer/modules/webrtc/webrtc_audio_device_impl.cc
    • M third_party/blink/renderer/platform/bindings/runtime_call_stats.cc
    • M third_party/blink/renderer/platform/fonts/web_font_decoder.cc
    • M third_party/blink/renderer/platform/graphics/canvas_hibernation_handler.cc
    • M third_party/blink/renderer/platform/graphics/gpu/xr_frame_transport.cc
    • M third_party/blink/renderer/platform/peerconnection/rtc_video_encoder.cc
    • M ui/ozone/platform/drm/gpu/screen_manager.cc
    Change size: XL
    Delta: 73 files changed, 716 insertions(+), 819 deletions(-)
    Branch: refs/heads/main
    Submit Requirements:
    • requirement satisfiedCode-Review: +1 by Gabriel Charette
    Open in Gerrit
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: merged
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I57986ea1bba109dbe3a3926137215d34fa546a3a
    Gerrit-Change-Number: 8028395
    Gerrit-PatchSet: 7
    Gerrit-Owner: Etienne Pierre-Doray <etie...@chromium.org>
    Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
    Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
    Gerrit-Reviewer: Gabriel Charette <g...@chromium.org>
    open
    diffy
    satisfied_requirement
    Reply all
    Reply to author
    Forward
    0 new messages