[tracing] Avoid perfetto track aliasing in ['device/vr/openxr', 'third_party/blink/renderer/modules/xr'] [chromium/src : main]

0 views
Skip to first unread message

Etienne Pierre-Doray (Gerrit)

unread,
May 25, 2026, 11:09:08 AM (8 days ago) May 25
to chromium...@chromium.org, feature-v...@chromium.org, blink-...@chromium.org

Etienne Pierre-Doray has uploaded the change for review

Commit message

[tracing] Avoid perfetto track aliasing in ['device/vr/openxr', 'third_party/blink/renderer/modules/xr']

perfetto::Track::FromPointer is problematic because pointer reuse can
cause track aliasing in perfetto UI, leading to confusing traces (this
was true of legacy TRACE_EVENT_ASYNC as well).

To avoid these, we have the following alternatives:
1- Usin GetNextGlobalTraceId() instead of a pointer id to guarantee
uniqueness. The track will get its name from the first event emitted.
2- Using NamedTrack to scope the pointer to a specific class
(an aliased track would always correctly have the same name). This
is more appropriate when there are several events emitted to the same
track without a clear name. This has the benefit of giving the track
a consistent, explicit name.
3- Replace custom track with "sync" instant events with flows.
This reduces visual clutter and retain information about where
events originated from.

This CL applies a migration to of one #1 or #2.

Questions for the reviewer:
- Design Fit: Is the choice of a dedicated async track (#1/#2)
appropriate, or would is be suitable to emit "sync" events with
flows (#3). As a rule of thumb, async tracks are appropriate to
display a clear async operation (that could be recorded as UMA),
or high level / user visible state.
- Naming: (when applicable) Is the track name I chose appropriate

This CL was uploaded by git cl split.

This CL was uploaded by git cl split.
Bug: 432427382
Change-Id: I097b9492ae1c15a2733de70d74db3fd99e0008b2

Change diff


Change information

Files:
  • M device/vr/openxr/openxr_api_wrapper.cc
  • M third_party/blink/renderer/modules/xr/xr_frame_provider.cc
Change size: S
Delta: 2 files changed, 11 insertions(+), 8 deletions(-)
Open in Gerrit

Related details

Attention set is empty
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: newchange
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I097b9492ae1c15a2733de70d74db3fd99e0008b2
Gerrit-Change-Number: 7871891
Gerrit-PatchSet: 1
Gerrit-Owner: Etienne Pierre-Doray <etie...@chromium.org>
Gerrit-Reviewer: Etienne Pierre-Doray <etie...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy
Reply all
Reply to author
Forward
0 new messages