Merge "Change the trace tag for some dexopt operations to align with ART Services." into udc-dev

This commit is contained in:
Martin Stjernholm
2023-02-27 16:54:26 +00:00
committed by Android (Google) Code Review
4 changed files with 12 additions and 10 deletions

View File

@@ -404,7 +404,7 @@ public final class BackgroundDexOptService {
"BackgroundDexOptService_" + (isPostBootUpdateJob ? "PostBoot" : "Idle"),
() -> {
TimingsTraceAndSlog tr =
new TimingsTraceAndSlog(TAG, Trace.TRACE_TAG_PACKAGE_MANAGER);
new TimingsTraceAndSlog(TAG, Trace.TRACE_TAG_DALVIK);
tr.traceBegin("jobExecution");
boolean completed = false;
boolean fatalError = false;
@@ -494,6 +494,8 @@ public final class BackgroundDexOptService {
@GuardedBy("mLock")
private void waitForDexOptThreadToFinishLocked() {
TimingsTraceAndSlog tr = new TimingsTraceAndSlog(TAG, Trace.TRACE_TAG_PACKAGE_MANAGER);
// This tracing section doesn't have any correspondence in ART Service - it never waits for
// cancellation to finish.
tr.traceBegin("waitForDexOptThreadToFinishLocked");
try {
// Wait but check in regular internal to see if the thread is still alive.

View File

@@ -16,7 +16,7 @@
package com.android.server.pm;
import static android.os.Trace.TRACE_TAG_PACKAGE_MANAGER;
import static android.os.Trace.TRACE_TAG_DALVIK;
import static com.android.server.LocalManagerRegistry.ManagerNotFoundException;
import static com.android.server.pm.ApexManager.ActiveApexInfo;
@@ -470,11 +470,11 @@ public final class DexOptHelper {
@DexOptResult
private int performDexOptTraced(DexoptOptions options) {
Trace.traceBegin(TRACE_TAG_PACKAGE_MANAGER, "dexopt");
Trace.traceBegin(TRACE_TAG_DALVIK, "dexopt");
try {
return performDexOptInternal(options);
} finally {
Trace.traceEnd(TRACE_TAG_PACKAGE_MANAGER);
Trace.traceEnd(TRACE_TAG_DALVIK);
}
}
@@ -605,7 +605,7 @@ public final class DexOptHelper {
throw new IllegalArgumentException("Can't dexopt APEX package: " + packageName);
}
Trace.traceBegin(TRACE_TAG_PACKAGE_MANAGER, "dexopt");
Trace.traceBegin(TRACE_TAG_DALVIK, "dexopt");
// Whoever is calling forceDexOpt wants a compiled package.
// Don't use profiles since that may cause compilation to be skipped.
@@ -615,7 +615,7 @@ public final class DexOptHelper {
@DexOptResult int res = performDexOptInternalWithDependenciesLI(pkg, packageState, options);
Trace.traceEnd(TRACE_TAG_PACKAGE_MANAGER);
Trace.traceEnd(TRACE_TAG_DALVIK);
if (res != PackageDexOptimizer.DEX_OPT_PERFORMED) {
throw new IllegalStateException("Failed to dexopt: " + res);
}

View File

@@ -386,7 +386,7 @@ public class PackageDexOptimizer {
options.getCompilationReason());
// OTAPreopt doesn't have stats so don't report in that case.
if (packageStats != null) {
Trace.traceBegin(Trace.TRACE_TAG_PACKAGE_MANAGER, "dex2oat-metrics");
Trace.traceBegin(Trace.TRACE_TAG_DALVIK, "dex2oat-metrics");
try {
long sessionId = sRandom.nextLong();
ArtStatsLogUtils.writeStatsLog(
@@ -403,7 +403,7 @@ public class PackageDexOptimizer {
dexCodeIsa,
path);
} finally {
Trace.traceEnd(Trace.TRACE_TAG_PACKAGE_MANAGER);
Trace.traceEnd(Trace.TRACE_TAG_DALVIK);
}
}

View File

@@ -6690,9 +6690,9 @@ public class PackageManagerService implements PackageSender, TestUtilityService
}
synchronized (mInstallLock) {
Trace.traceBegin(TRACE_TAG_PACKAGE_MANAGER, "dump profiles");
Trace.traceBegin(Trace.TRACE_TAG_DALVIK, "dump profiles");
mArtManagerService.dumpProfiles(pkg, dumpClassesAndMethods);
Trace.traceEnd(TRACE_TAG_PACKAGE_MANAGER);
Trace.traceEnd(Trace.TRACE_TAG_DALVIK);
}
}