Skip to content

tp: Add TrackEvent plugin registry + android_track_event_process table#6158

Open
zezeozue wants to merge 1 commit into
mainfrom
dev/zezeozue/android_process_squashed_final
Open

tp: Add TrackEvent plugin registry + android_track_event_process table#6158
zezeozue wants to merge 1 commit into
mainfrom
dev/zezeozue/android_process_squashed_final

Conversation

@zezeozue
Copy link
Copy Markdown
Member

@zezeozue zezeozue commented Jun 5, 2026

TrackEventParser gains a field-id-keyed plugin registry.

The frameworks/base plugin feeds the process table from process lifecycle events -- start sets name/uid via GetOrCreateProcess, binder-died EndThread()s the pid -- and keeps the framework start/end timestamps in the new __intrinsic_android_track_event_process table (upid, fw_start_ts, fw_end_ts).

Drops the aliased IMPORTANCE_BACKGROUND enumerator, which pbzero's switch-based ToString rejects under -Werror. This field is deprecated in favor of importance_cached anyways.

TrackEventParser gains a field-id-keyed plugin registry.

The frameworks/base plugin feeds the process table from process
lifecycle events -- start sets name/uid via GetOrCreateProcess,
binder-died EndThread()s the pid -- and keeps the framework start/end
timestamps in the new __intrinsic_android_track_event_process table
(upid, fw_start_ts, fw_end_ts).

Drops the aliased IMPORTANCE_BACKGROUND enumerator, which pbzero's
switch-based ToString rejects under -Werror. This field is
deprecated in favor of importance_cached anyways.

Change-Id: I958d9c9707d0f5629a17eb3468beb82a20fbf923
@zezeozue zezeozue requested a review from a team as a code owner June 5, 2026 18:54
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 5, 2026

🎨 Perfetto UI Builds

parser_->AddActiveProcess(ts_, *it);
}
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nit: revert

stats::track_event_dropped_packets_outside_of_range_of_interest);
return;
}
plugins_->ParseFields(blob, ts);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Shouldn't this return something? This feels very very as hoc here. We need to design this a bit better with various sets of callbacks:

  1. there's a layer here if you want to intercept the whole event and do parsing from scratch
  2. then there's another layee which lives purely at the args level

My theory is that you only want 2) right now in which case you should do this in trackeventeventimporter

class TrackEventPlugin {
public:
virtual ~TrackEventPlugin();
virtual void ParseField(uint32_t field_id,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is too opaque. What is allowed, what is not allowed here? This need comments. I would also scope this down and say this is only about args associated with an event. So you can pass the slice id or counter I'd you've inserted.

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.

2 participants