Merge "Change the trace tag for some dexopt operations to align with ART Services." into udc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
b34892f893
@@ -404,7 +404,7 @@ public final class BackgroundDexOptService {
|
|||||||
"BackgroundDexOptService_" + (isPostBootUpdateJob ? "PostBoot" : "Idle"),
|
"BackgroundDexOptService_" + (isPostBootUpdateJob ? "PostBoot" : "Idle"),
|
||||||
() -> {
|
() -> {
|
||||||
TimingsTraceAndSlog tr =
|
TimingsTraceAndSlog tr =
|
||||||
new TimingsTraceAndSlog(TAG, Trace.TRACE_TAG_PACKAGE_MANAGER);
|
new TimingsTraceAndSlog(TAG, Trace.TRACE_TAG_DALVIK);
|
||||||
tr.traceBegin("jobExecution");
|
tr.traceBegin("jobExecution");
|
||||||
boolean completed = false;
|
boolean completed = false;
|
||||||
boolean fatalError = false;
|
boolean fatalError = false;
|
||||||
@@ -494,6 +494,8 @@ public final class BackgroundDexOptService {
|
|||||||
@GuardedBy("mLock")
|
@GuardedBy("mLock")
|
||||||
private void waitForDexOptThreadToFinishLocked() {
|
private void waitForDexOptThreadToFinishLocked() {
|
||||||
TimingsTraceAndSlog tr = new TimingsTraceAndSlog(TAG, Trace.TRACE_TAG_PACKAGE_MANAGER);
|
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");
|
tr.traceBegin("waitForDexOptThreadToFinishLocked");
|
||||||
try {
|
try {
|
||||||
// Wait but check in regular internal to see if the thread is still alive.
|
// Wait but check in regular internal to see if the thread is still alive.
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
package com.android.server.pm;
|
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.LocalManagerRegistry.ManagerNotFoundException;
|
||||||
import static com.android.server.pm.ApexManager.ActiveApexInfo;
|
import static com.android.server.pm.ApexManager.ActiveApexInfo;
|
||||||
@@ -470,11 +470,11 @@ public final class DexOptHelper {
|
|||||||
|
|
||||||
@DexOptResult
|
@DexOptResult
|
||||||
private int performDexOptTraced(DexoptOptions options) {
|
private int performDexOptTraced(DexoptOptions options) {
|
||||||
Trace.traceBegin(TRACE_TAG_PACKAGE_MANAGER, "dexopt");
|
Trace.traceBegin(TRACE_TAG_DALVIK, "dexopt");
|
||||||
try {
|
try {
|
||||||
return performDexOptInternal(options);
|
return performDexOptInternal(options);
|
||||||
} finally {
|
} 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);
|
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.
|
// Whoever is calling forceDexOpt wants a compiled package.
|
||||||
// Don't use profiles since that may cause compilation to be skipped.
|
// 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);
|
@DexOptResult int res = performDexOptInternalWithDependenciesLI(pkg, packageState, options);
|
||||||
|
|
||||||
Trace.traceEnd(TRACE_TAG_PACKAGE_MANAGER);
|
Trace.traceEnd(TRACE_TAG_DALVIK);
|
||||||
if (res != PackageDexOptimizer.DEX_OPT_PERFORMED) {
|
if (res != PackageDexOptimizer.DEX_OPT_PERFORMED) {
|
||||||
throw new IllegalStateException("Failed to dexopt: " + res);
|
throw new IllegalStateException("Failed to dexopt: " + res);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -386,7 +386,7 @@ public class PackageDexOptimizer {
|
|||||||
options.getCompilationReason());
|
options.getCompilationReason());
|
||||||
// OTAPreopt doesn't have stats so don't report in that case.
|
// OTAPreopt doesn't have stats so don't report in that case.
|
||||||
if (packageStats != null) {
|
if (packageStats != null) {
|
||||||
Trace.traceBegin(Trace.TRACE_TAG_PACKAGE_MANAGER, "dex2oat-metrics");
|
Trace.traceBegin(Trace.TRACE_TAG_DALVIK, "dex2oat-metrics");
|
||||||
try {
|
try {
|
||||||
long sessionId = sRandom.nextLong();
|
long sessionId = sRandom.nextLong();
|
||||||
ArtStatsLogUtils.writeStatsLog(
|
ArtStatsLogUtils.writeStatsLog(
|
||||||
@@ -403,7 +403,7 @@ public class PackageDexOptimizer {
|
|||||||
dexCodeIsa,
|
dexCodeIsa,
|
||||||
path);
|
path);
|
||||||
} finally {
|
} finally {
|
||||||
Trace.traceEnd(Trace.TRACE_TAG_PACKAGE_MANAGER);
|
Trace.traceEnd(Trace.TRACE_TAG_DALVIK);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6690,9 +6690,9 @@ public class PackageManagerService implements PackageSender, TestUtilityService
|
|||||||
}
|
}
|
||||||
|
|
||||||
synchronized (mInstallLock) {
|
synchronized (mInstallLock) {
|
||||||
Trace.traceBegin(TRACE_TAG_PACKAGE_MANAGER, "dump profiles");
|
Trace.traceBegin(Trace.TRACE_TAG_DALVIK, "dump profiles");
|
||||||
mArtManagerService.dumpProfiles(pkg, dumpClassesAndMethods);
|
mArtManagerService.dumpProfiles(pkg, dumpClassesAndMethods);
|
||||||
Trace.traceEnd(TRACE_TAG_PACKAGE_MANAGER);
|
Trace.traceEnd(Trace.TRACE_TAG_DALVIK);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user