syntax = "proto2";

package android.os.statsd.adpf;

import "frameworks/proto_logging/stats/atom_field_options.proto";
import "frameworks/proto_logging/stats/enums/adpf/enums.proto";

option java_package = "com.android.os.adpf";
option java_multiple_files = true;

/**
 * Logs information related to Android Dynamic Performance Framework (ADPF).
 */

message PerformanceHintSessionReported {
    // UID of the package.
    optional int32 package_uid = 1 [(is_uid) = true];

    // Unique ID of the hint session.
    optional int64 session_id = 2;

    // Hint session target duration, in nanoseconds.
    optional int64 target_duration_ns = 3;

    // Number of threads affected by this session.
    optional int32 tid_count = 4;

    // Session tag specifying the type of the session.
    optional android.os.statsd.adpf.AdpfSessionTag session_tag = 5;

    // True if power efficiency mode is enabled.
    // Power Efficiency mode tells whether the threads of a session can be
    // safely scheduled to prefer power efficiency over performance.
    optional bool is_power_efficient = 6;

    // True if graphics pipeline mode us enabled.
    // Graphics Pipeline mode tells whether the threads of a session are on critical path for
    // an application's rendering loop. Depending on the device implementation, session with this
    // mode enable should have higher resource priority.
    optional bool is_graphics_pipeline = 7;
}

message ADPFSystemComponentInfo {
    // True if SurfaceFlinger CPU hint is enabled on the device.
    optional bool surfaceflinger_cpu_hint_enabled = 1;

    // True if HWUI hint is enabled on the device.
    optional bool hwui_hint_enabled = 2;

    // True if FMQ is supported and used on the device.
    optional android.os.statsd.adpf.FmqStatus fmq_supported = 3;
}
