1syntax = "proto2";
2
3package android.os.statsd.adpf;
4
5import "frameworks/proto_logging/stats/atom_field_options.proto";
6
7option java_package = "com.android.os.adpf";
8option java_multiple_files = true;
9
10enum AdpfSessionTag {
11    // This tag is used to mark uncategorized hint sessions.
12    OTHER = 0;
13    // This tag is used to mark the SurfaceFlinger hint session.
14    SURFACEFLINGER = 1;
15    // This tag is used to mark hint sessions created by HWUI.
16    HWUI = 2;
17    // This tag is used to mark hint sessions created by applications that are
18    // categorized as games.
19    GAME = 3;
20    // This tag is used to mark the hint session is created by the application.
21    // If an applications is categorized as game, then GAME should be used
22    // instead.
23    APP = 4;
24}
25
26/**
27 * Logs information related to Android Dynamic Performance Framework (ADPF).
28 */
29
30message PerformanceHintSessionReported {
31    // UID of the package.
32    optional int32 package_uid = 1 [(is_uid) = true];
33
34    // Unique ID of the hint session.
35    optional int64 session_id = 2;
36
37    // Hint session target duration, in nanoseconds.
38    optional int64 target_duration_ns = 3;
39
40    // Number of threads affected by this session.
41    optional int32 tid_count = 4;
42
43    // Session tag specifying the type of the session.
44    optional AdpfSessionTag session_tag = 5;
45}
46
47message ADPFSystemComponentInfo {
48    // True if SurfaceFlinger CPU hint is enabled on the device.
49    optional bool surfaceflinger_cpu_hint_enabled = 1;
50
51    // True if HWUI hint is enabled on the device.
52    optional bool hwui_hint_enabled = 2;
53}
54