Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 59842ce5 authored by Kean Mariotti's avatar Kean Mariotti
Browse files

Extend Perfetto data source parameters

Add policy PERFETTO_DS_BUFFER_EXHAUSTED_POLICY_STALL_AND_DROP

Flag: EXEMPT simply add enum value
Bug: 418676887
Test: presubmit
Change-Id: Iba2ef77ac7309e60a604d09269c8e5c986349eda
parent 5dafa9d6
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -33,6 +33,7 @@ public class DataSourceParams {
    @IntDef(value = {
        PERFETTO_DS_BUFFER_EXHAUSTED_POLICY_DROP,
        PERFETTO_DS_BUFFER_EXHAUSTED_POLICY_STALL_AND_ABORT,
        PERFETTO_DS_BUFFER_EXHAUSTED_POLICY_STALL_AND_DROP
    })
    @Retention(RetentionPolicy.SOURCE)
    public @interface PerfettoDsBufferExhausted {}
@@ -46,6 +47,11 @@ public class DataSourceParams {
    // after a while.
    public static final int PERFETTO_DS_BUFFER_EXHAUSTED_POLICY_STALL_AND_ABORT = 1;

    // If the data source runs out of space when trying to acquire a new chunk,
    // it will stall, retry and eventually drop data if a free chunk is not
    // acquired after a few seconds.
    public static final int PERFETTO_DS_BUFFER_EXHAUSTED_POLICY_STALL_AND_DROP = 2;

    public static DataSourceParams DEFAULTS = new DataSourceParams.Builder().build();

    private DataSourceParams(@PerfettoDsBufferExhausted int bufferExhaustedPolicy,