Loading apct-tests/perftests/core/src/android/os/TracePerfTest.java +2 −2 Original line number Diff line number Diff line Loading @@ -127,14 +127,14 @@ public class TracePerfTest { public void testInstantPerfettoWithArgs() { PerfettoTrace.instant(FOO_CATEGORY, "testInstantP") .addArg("foo", "bar") .addFlow(1) .setFlow(1) .emit(); BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); while (state.keepRunning()) { PerfettoTrace.instant(FOO_CATEGORY, "testInstantP") .addArg("foo", "bar") .addFlow(1) .setFlow(1) .emit(); } } Loading boot/boot-image-profile-extra.txt +6 −2 Original line number Diff line number Diff line Loading @@ -45,11 +45,15 @@ HSPLandroid/os/MessageQueue$OnFileDescriptorEventListener;->* HSPLandroid/os/MessageQueue$StackNodeType;->* HSPLandroid/os/MessageQueue$StateNode;->* HSPLandroid/os/MessageQueue$TimedParkStateNode;->* # For now, compile all methods in PerfettoTrace and PerfettoTrackEventExtra. # Similar to the existing Trace APIs, these new APIs can impact the performance # of many subsystems including MessageQueue. This also keeps benchmark # comparisons between both APIs fair. HSPLandroid/os/PerfettoTrace$Category;->* HSPLandroid/os/PerfettoTrace;->* HSPLandroid/os/PerfettoTrackEventExtra;->* HSPLandroid/os/PerfettoTrackEventExtra$BuilderImpl;->* HSPLandroid/os/PerfettoTrackEventExtra$NoOpBuilder;->* HSPLandroid/os/PerfettoTrackEventExtra$Builder;->* HSPLandroid/os/PerfettoTrackEventExtra$ArgBool;->* HSPLandroid/os/PerfettoTrackEventExtra$ArgInt64;->* HSPLandroid/os/PerfettoTrackEventExtra$ArgDouble;->* Loading core/java/android/os/PerfettoTrace.java +0 −20 Original line number Diff line number Diff line Loading @@ -232,10 +232,6 @@ public final class PerfettoTrace { * @param eventName The event name to appear in the trace. */ public static PerfettoTrackEventExtra.Builder instant(Category category, String eventName) { if (!category.isEnabled()) { return PerfettoTrackEventExtra.noOpBuilder(); } return PerfettoTrackEventExtra.builder().init(PERFETTO_TE_TYPE_INSTANT, category) .setEventName(eventName); } Loading @@ -247,10 +243,6 @@ public final class PerfettoTrace { * @param eventName The event name to appear in the trace. */ public static PerfettoTrackEventExtra.Builder begin(Category category, String eventName) { if (!category.isEnabled()) { return PerfettoTrackEventExtra.noOpBuilder(); } return PerfettoTrackEventExtra.builder().init(PERFETTO_TE_TYPE_SLICE_BEGIN, category) .setEventName(eventName); } Loading @@ -261,10 +253,6 @@ public final class PerfettoTrace { * @param category The perfetto category. */ public static PerfettoTrackEventExtra.Builder end(Category category) { if (!category.isEnabled()) { return PerfettoTrackEventExtra.noOpBuilder(); } return PerfettoTrackEventExtra.builder().init(PERFETTO_TE_TYPE_SLICE_END, category); } Loading @@ -275,10 +263,6 @@ public final class PerfettoTrace { * @param value The value of the counter. */ public static PerfettoTrackEventExtra.Builder counter(Category category, long value) { if (!category.isEnabled()) { return PerfettoTrackEventExtra.noOpBuilder(); } return PerfettoTrackEventExtra.builder().init(PERFETTO_TE_TYPE_COUNTER, category) .setCounter(value); } Loading @@ -302,10 +286,6 @@ public final class PerfettoTrace { * @param value The value of the counter. */ public static PerfettoTrackEventExtra.Builder counter(Category category, double value) { if (!category.isEnabled()) { return PerfettoTrackEventExtra.noOpBuilder(); } return PerfettoTrackEventExtra.builder().init(PERFETTO_TE_TYPE_COUNTER, category) .setCounter(value); } Loading core/java/android/os/PerfettoTrackEventExtra.java +302 −297 File changed.Preview size limit exceeded, changes collapsed. Show changes core/tests/coretests/src/android/os/PerfettoTraceTest.java +2 −2 Original line number Diff line number Diff line Loading @@ -108,8 +108,8 @@ public class PerfettoTraceTest { PerfettoTrace.Session session = new PerfettoTrace.Session(true, traceConfig.toByteArray()); PerfettoTrace.instant(FOO_CATEGORY, "event") .addFlow(2) .addTerminatingFlow(3) .setFlow(2) .setTerminatingFlow(3) .addArg("long_val", 10000000000L) .addArg("bool_val", true) .addArg("double_val", 3.14) Loading Loading
apct-tests/perftests/core/src/android/os/TracePerfTest.java +2 −2 Original line number Diff line number Diff line Loading @@ -127,14 +127,14 @@ public class TracePerfTest { public void testInstantPerfettoWithArgs() { PerfettoTrace.instant(FOO_CATEGORY, "testInstantP") .addArg("foo", "bar") .addFlow(1) .setFlow(1) .emit(); BenchmarkState state = mPerfStatusReporter.getBenchmarkState(); while (state.keepRunning()) { PerfettoTrace.instant(FOO_CATEGORY, "testInstantP") .addArg("foo", "bar") .addFlow(1) .setFlow(1) .emit(); } } Loading
boot/boot-image-profile-extra.txt +6 −2 Original line number Diff line number Diff line Loading @@ -45,11 +45,15 @@ HSPLandroid/os/MessageQueue$OnFileDescriptorEventListener;->* HSPLandroid/os/MessageQueue$StackNodeType;->* HSPLandroid/os/MessageQueue$StateNode;->* HSPLandroid/os/MessageQueue$TimedParkStateNode;->* # For now, compile all methods in PerfettoTrace and PerfettoTrackEventExtra. # Similar to the existing Trace APIs, these new APIs can impact the performance # of many subsystems including MessageQueue. This also keeps benchmark # comparisons between both APIs fair. HSPLandroid/os/PerfettoTrace$Category;->* HSPLandroid/os/PerfettoTrace;->* HSPLandroid/os/PerfettoTrackEventExtra;->* HSPLandroid/os/PerfettoTrackEventExtra$BuilderImpl;->* HSPLandroid/os/PerfettoTrackEventExtra$NoOpBuilder;->* HSPLandroid/os/PerfettoTrackEventExtra$Builder;->* HSPLandroid/os/PerfettoTrackEventExtra$ArgBool;->* HSPLandroid/os/PerfettoTrackEventExtra$ArgInt64;->* HSPLandroid/os/PerfettoTrackEventExtra$ArgDouble;->* Loading
core/java/android/os/PerfettoTrace.java +0 −20 Original line number Diff line number Diff line Loading @@ -232,10 +232,6 @@ public final class PerfettoTrace { * @param eventName The event name to appear in the trace. */ public static PerfettoTrackEventExtra.Builder instant(Category category, String eventName) { if (!category.isEnabled()) { return PerfettoTrackEventExtra.noOpBuilder(); } return PerfettoTrackEventExtra.builder().init(PERFETTO_TE_TYPE_INSTANT, category) .setEventName(eventName); } Loading @@ -247,10 +243,6 @@ public final class PerfettoTrace { * @param eventName The event name to appear in the trace. */ public static PerfettoTrackEventExtra.Builder begin(Category category, String eventName) { if (!category.isEnabled()) { return PerfettoTrackEventExtra.noOpBuilder(); } return PerfettoTrackEventExtra.builder().init(PERFETTO_TE_TYPE_SLICE_BEGIN, category) .setEventName(eventName); } Loading @@ -261,10 +253,6 @@ public final class PerfettoTrace { * @param category The perfetto category. */ public static PerfettoTrackEventExtra.Builder end(Category category) { if (!category.isEnabled()) { return PerfettoTrackEventExtra.noOpBuilder(); } return PerfettoTrackEventExtra.builder().init(PERFETTO_TE_TYPE_SLICE_END, category); } Loading @@ -275,10 +263,6 @@ public final class PerfettoTrace { * @param value The value of the counter. */ public static PerfettoTrackEventExtra.Builder counter(Category category, long value) { if (!category.isEnabled()) { return PerfettoTrackEventExtra.noOpBuilder(); } return PerfettoTrackEventExtra.builder().init(PERFETTO_TE_TYPE_COUNTER, category) .setCounter(value); } Loading @@ -302,10 +286,6 @@ public final class PerfettoTrace { * @param value The value of the counter. */ public static PerfettoTrackEventExtra.Builder counter(Category category, double value) { if (!category.isEnabled()) { return PerfettoTrackEventExtra.noOpBuilder(); } return PerfettoTrackEventExtra.builder().init(PERFETTO_TE_TYPE_COUNTER, category) .setCounter(value); } Loading
core/java/android/os/PerfettoTrackEventExtra.java +302 −297 File changed.Preview size limit exceeded, changes collapsed. Show changes
core/tests/coretests/src/android/os/PerfettoTraceTest.java +2 −2 Original line number Diff line number Diff line Loading @@ -108,8 +108,8 @@ public class PerfettoTraceTest { PerfettoTrace.Session session = new PerfettoTrace.Session(true, traceConfig.toByteArray()); PerfettoTrace.instant(FOO_CATEGORY, "event") .addFlow(2) .addTerminatingFlow(3) .setFlow(2) .setTerminatingFlow(3) .addArg("long_val", 10000000000L) .addArg("bool_val", true) .addArg("double_val", 3.14) Loading