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

Commit a3d7fb03 authored by Pablo Gamito's avatar Pablo Gamito Committed by Android (Google) Code Review
Browse files

Merge changes from topic "update-perfetto-protolog-flag" into main

* changes:
  Update Perfetto Protolog flag name
  Add read only perfetto protolog flag
  Increment protolog version
parents 909d02a3 0203775a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -8,7 +8,7 @@ flag {
}

flag {
    name: "perfetto_protolog"
    name: "perfetto_protolog_tracing"
    namespace: "windowing_tools"
    description: "Migrate protolog to Perfetto"
    bug: "276432490"
+1 −1
Original line number Diff line number Diff line
@@ -61,7 +61,7 @@ public class LegacyProtoLogImpl implements IProtoLog {
    private static final int PER_CHUNK_SIZE = 1024;
    private static final String TAG = "ProtoLog";
    private static final long MAGIC_NUMBER_VALUE = ((long) MAGIC_NUMBER_H << 32) | MAGIC_NUMBER_L;
    static final String PROTOLOG_VERSION = "1.0.0";
    static final String PROTOLOG_VERSION = "2.0.0";
    private static final int DEFAULT_PER_CHUNK_SIZE = 0;

    private final File mLogFile;
+1 −1
Original line number Diff line number Diff line
@@ -98,7 +98,7 @@ public class ProtoLogImpl {
     */
    public static synchronized IProtoLog getSingleInstance() {
        if (sServiceInstance == null) {
            if (android.tracing.Flags.perfettoProtolog()) {
            if (android.tracing.Flags.perfettoProtologTracing()) {
                sServiceInstance =
                        new PerfettoProtoLogImpl(sViewerConfigPath);
            } else {
+1 −1
Original line number Diff line number Diff line
{
  "version": "1.0.0",
  "version": "2.0.0",
  "messages": {
    "7286191062634870297": {
      "message": "Binding proc %s with config %s",
+4 −4
Original line number Diff line number Diff line
@@ -51,7 +51,7 @@ public class ProtoLogController implements ShellCommandHandler.ShellCommandActio
        final ILogger logger = pw::println;
        switch (args[0]) {
            case "status": {
                if (android.tracing.Flags.perfettoProtolog()) {
                if (android.tracing.Flags.perfettoProtologTracing()) {
                    pw.println("(Deprecated) legacy command. Use Perfetto commands instead.");
                    return false;
                }
@@ -59,7 +59,7 @@ public class ProtoLogController implements ShellCommandHandler.ShellCommandActio
                return true;
            }
            case "start": {
                if (android.tracing.Flags.perfettoProtolog()) {
                if (android.tracing.Flags.perfettoProtologTracing()) {
                    pw.println("(Deprecated) legacy command. Use Perfetto commands instead.");
                    return false;
                }
@@ -67,7 +67,7 @@ public class ProtoLogController implements ShellCommandHandler.ShellCommandActio
                return true;
            }
            case "stop": {
                if (android.tracing.Flags.perfettoProtolog()) {
                if (android.tracing.Flags.perfettoProtologTracing()) {
                    pw.println("(Deprecated) legacy command. Use Perfetto commands instead.");
                    return false;
                }
@@ -101,7 +101,7 @@ public class ProtoLogController implements ShellCommandHandler.ShellCommandActio
                return mShellProtoLog.stopLoggingToLogcat(groups, logger) == 0;
            }
            case "save-for-bugreport": {
                if (android.tracing.Flags.perfettoProtolog()) {
                if (android.tracing.Flags.perfettoProtologTracing()) {
                    pw.println("(Deprecated) legacy command");
                    return false;
                }
Loading