summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/java/com/android/internal/protolog/PerfettoProtoLogImpl.java42
1 files changed, 15 insertions, 27 deletions
diff --git a/core/java/com/android/internal/protolog/PerfettoProtoLogImpl.java b/core/java/com/android/internal/protolog/PerfettoProtoLogImpl.java
index 1fe24551bd0c..14d7d0378e3e 100644
--- a/core/java/com/android/internal/protolog/PerfettoProtoLogImpl.java
+++ b/core/java/com/android/internal/protolog/PerfettoProtoLogImpl.java
@@ -156,38 +156,26 @@ public class PerfettoProtoLogImpl implements IProtoLog {
@Override
public void log(LogLevel level, IProtoLogGroup group, long messageHash, int paramsMask,
@Nullable Object[] args) {
- Trace.traceBegin(Trace.TRACE_TAG_WINDOW_MANAGER, "log");
-
- try {
- if (isProtoEnabled()) {
- long tsNanos = SystemClock.elapsedRealtimeNanos();
- mBackgroundLoggingService.execute(() ->
- logToProto(level, group, messageHash, paramsMask, args, tsNanos));
- }
- if (group.isLogToLogcat()) {
- logToLogcat(group.getTag(), level, messageHash, args);
- }
- } finally {
- Trace.traceEnd(Trace.TRACE_TAG_WINDOW_MANAGER);
+ if (isProtoEnabled()) {
+ long tsNanos = SystemClock.elapsedRealtimeNanos();
+ mBackgroundLoggingService.execute(() ->
+ logToProto(level, group, messageHash, paramsMask, args, tsNanos));
+ }
+ if (group.isLogToLogcat()) {
+ logToLogcat(group.getTag(), level, messageHash, args);
}
}
@Override
public void log(LogLevel logLevel, IProtoLogGroup group, String messageString, Object... args) {
- Trace.traceBegin(Trace.TRACE_TAG_WINDOW_MANAGER, "log");
-
- try {
- if (isProtoEnabled()) {
- long tsNanos = SystemClock.elapsedRealtimeNanos();
- mBackgroundLoggingService.execute(
- () -> logStringMessageToProto(logLevel, group, messageString, args,
- tsNanos));
- }
- if (group.isLogToLogcat()) {
- logToLogcat(group.getTag(), logLevel, messageString, args);
- }
- } finally {
- Trace.traceEnd(Trace.TRACE_TAG_WINDOW_MANAGER);
+ if (isProtoEnabled()) {
+ long tsNanos = SystemClock.elapsedRealtimeNanos();
+ mBackgroundLoggingService.execute(
+ () -> logStringMessageToProto(logLevel, group, messageString, args,
+ tsNanos));
+ }
+ if (group.isLogToLogcat()) {
+ logToLogcat(group.getTag(), logLevel, messageString, args);
}
}