Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,18 @@ PERFETTO_PB_FIELD(perfetto_protos_AndroidJobSchedulerJob,
job_state_flags,
20);

PERFETTO_PB_MSG(perfetto_protos_AndroidProcState);
PERFETTO_PB_FIELD(perfetto_protos_AndroidProcState,
STRING,
const char*,
proc_state,
1);
PERFETTO_PB_FIELD(perfetto_protos_AndroidProcState,
VARINT,
int32_t,
count_of_processes,
2);

PERFETTO_PB_MSG(perfetto_protos_AndroidMessageQueue);
PERFETTO_PB_FIELD(perfetto_protos_AndroidMessageQueue,
STRING,
Expand Down Expand Up @@ -375,4 +387,10 @@ PERFETTO_PB_EXTENSION_FIELD(perfetto_protos_AndroidTrackEvent,
perfetto_protos_AndroidSurfaceFlingerWorkload,
surfaceflinger_workload,
2007);
PERFETTO_PB_EXTENSION_FIELD(perfetto_protos_AndroidTrackEvent,
perfetto_protos_TrackEvent,
MSG,
perfetto_protos_AndroidProcState,
proc_state,
2008);
#endif // INCLUDE_PERFETTO_PUBLIC_PROTOS_TRACE_ANDROID_ANDROID_TRACK_EVENT_PZC_H_
8 changes: 8 additions & 0 deletions protos/perfetto/trace/android/android_track_event.proto
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ message AndroidMessageQueue {
optional uint64 message_delay_ms = 4;
}

// Information about ProcState of process in the system
message ProcState {
Copy link
Member

Choose a reason for hiding this comment

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

This is an ultra generic name. Please make this more specific. At the very least adding an android prefix but I would consider making this even more specific (because it's some sort of aggregate counter not actually an event on every proc state).

Also why are we even having this proto at all? IMO this should be a set of CounterTrack track events which is going to be both far more efficient and will remove the need to do de-interning in the trace processor.

Copy link
Author

Choose a reason for hiding this comment

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

I wasn't sure if this was the correct way to do this, or if this was necessary to do.

I have implemented this as a counter track in the code. If this is a counter track, then does it not need this proto change? I can close the PR then.

Copy link
Member

Choose a reason for hiding this comment

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

If you can do it with Counter tracks, you should. @zezeozue had exactly this convo in #4795 but the opposite was reached because it wasn't possible to emit in one shot.

// Name of the Process State.
optional string proc_state = 1;
// Count of processes in the proc_state
optional int32 count_of_processes = 2;
}

message AndroidJobSchedulerJob {
// Job id.
optional int32 job_id = 1;
Expand Down