Loading libs/WindowManager/Shell/src/com/android/wm/shell/docs/debugging.md +5 −7 Original line number Diff line number Diff line Loading @@ -28,13 +28,11 @@ building to check the log state (is enabled) before printing the print format st traces in Winscope) ### Kotlin Kotlin protologging is supported but not as optimized as in Java. The Protolog tool does not yet have support for Kotlin code ([b/168581922](https://b.corp.google.com/issues/168581922)). What this implies is that ProtoLogs are not pre-processed to extract the static strings out when used in Kotlin. So, there is no memory gain when using ProtoLogging in Kotlin. The logs will still be traced to Perfetto, but with a subtly worse performance due to the additional string interning that needs to be done at run time instead of at build time. Kotlin protologging is supported, but with some differences compared to Java. The ProtoLog tool currently does not process Kotlin code. This means that while ProtoLogs in Kotlin will still be traced to Perfetto, they are not pre-processed to extract static strings like in Java. Consequently, using ProtoLogging in Kotlin does not provide the same memory gains as in Java, and log calls may be slightly less performant due to additional string interning at runtime. ### Enabling ProtoLog command line logging Run these commands to enable protologs (in logcat) for WM Core ([list of all core tags](/core/java/com/android/internal/protolog/ProtoLogGroup.java)): Loading Loading
libs/WindowManager/Shell/src/com/android/wm/shell/docs/debugging.md +5 −7 Original line number Diff line number Diff line Loading @@ -28,13 +28,11 @@ building to check the log state (is enabled) before printing the print format st traces in Winscope) ### Kotlin Kotlin protologging is supported but not as optimized as in Java. The Protolog tool does not yet have support for Kotlin code ([b/168581922](https://b.corp.google.com/issues/168581922)). What this implies is that ProtoLogs are not pre-processed to extract the static strings out when used in Kotlin. So, there is no memory gain when using ProtoLogging in Kotlin. The logs will still be traced to Perfetto, but with a subtly worse performance due to the additional string interning that needs to be done at run time instead of at build time. Kotlin protologging is supported, but with some differences compared to Java. The ProtoLog tool currently does not process Kotlin code. This means that while ProtoLogs in Kotlin will still be traced to Perfetto, they are not pre-processed to extract static strings like in Java. Consequently, using ProtoLogging in Kotlin does not provide the same memory gains as in Java, and log calls may be slightly less performant due to additional string interning at runtime. ### Enabling ProtoLog command line logging Run these commands to enable protologs (in logcat) for WM Core ([list of all core tags](/core/java/com/android/internal/protolog/ProtoLogGroup.java)): Loading