Skip to content

[State] Add protos to describe state tracks and events [1/4]#6068

Open
etiennep-chromium wants to merge 13 commits into
mainfrom
dev/etiennep/state_proto_changes
Open

[State] Add protos to describe state tracks and events [1/4]#6068
etiennep-chromium wants to merge 13 commits into
mainfrom
dev/etiennep/state_proto_changes

Conversation

@etiennep-chromium
Copy link
Copy Markdown
Contributor

@etiennep-chromium etiennep-chromium commented May 29, 2026

Based on https://github.com/google/perfetto/blob/rfcs/0023-updatable-track-event.md

[1/4]: This PR adds state track and events proto, with no support, but minimal changes to make the build succeed.

For reference, this is the full implementation: #6068

Declare sibling_merge_behavior, sibling_merge_key, upid, and utid fields
inside track_descriptor.proto to support Trace Processor sibling track
merging and nested parent collapsible folders.

TAG=agy
CONV=abdcb83c-cd5a-4600-9a3b-de726c377bbf
…tate_proto_changes

# Conflicts:
#	python/perfetto/protos/perfetto/trace/perfetto_trace_pb2.py
#	python/perfetto/protos/perfetto/trace/perfetto_trace_pb2.pyi
TAG=agy
CONV=abdcb83c-cd5a-4600-9a3b-de726c377bbf
…e design

TAG=agy
CONV=abdcb83c-cd5a-4600-9a3b-de726c377bbf
Extract StateDescriptor from track_descriptor.proto and declare it inside
a new dedicated modular protobuf file state_descriptor.proto. Recompile
and regenerate all Bazel, Android BP, C, and Python build descriptors.

TAG=agy
CONV=abdcb83c-cd5a-4600-9a3b-de726c377bbf
@etiennep-chromium etiennep-chromium force-pushed the dev/etiennep/state_proto_changes branch from 6ba6972 to a5abc46 Compare May 29, 2026 18:16
@etiennep-chromium etiennep-chromium marked this pull request as ready for review May 29, 2026 18:30
@etiennep-chromium etiennep-chromium requested a review from a team as a code owner May 29, 2026 18:30
@LalitMaganti LalitMaganti requested a review from primiano May 29, 2026 18:44
@LalitMaganti
Copy link
Copy Markdown
Member

LG but Primiano should also comment.

// Represents the state value for a state track.
message State {
// The built-in string state value.
optional string string_value = 1;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Come to think of it we might want to intern this, so either

  • we add string_value_iid
  • we reuse TrackEvent::name and TrackEvent::name_iid
    WDYT?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(I went with option 2)

@etiennep-chromium etiennep-chromium changed the title [SDK] Add protos to describe state tracks and events [State] Add protos to describe state tracks and events [1/4] Jun 1, 2026
Comment thread protos/perfetto/trace/extensions.json
Comment thread protos/perfetto/trace/extensions.json Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants