Add ART optimization dimension to reportFullyDrawn
Bug: 170310046
Test: adb shell cmd stats print-logs
adb logcat | grep statsd | grep "(50)"
Change-Id: I1d33ff4639c85d2b1f57f2fef72d883c3eed7f00
Merged-In: I1d33ff4639c85d2b1f57f2fef72d883c3eed7f00
(cherry picked from commit ec2e3ee704)
This commit is contained in:
@@ -3661,6 +3661,12 @@ message AppStartFullyDrawn {
|
||||
|
||||
// App startup time (until call to Activity#reportFullyDrawn()).
|
||||
optional int64 app_startup_time_millis = 6;
|
||||
|
||||
// The compiler filter used when when the package was optimized.
|
||||
optional int32 package_optimization_compilation_filter = 7;
|
||||
|
||||
// The reason why the package was optimized.
|
||||
optional int32 package_optimization_compilation_reason = 8;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -372,6 +372,13 @@ class ActivityMetricsLogger {
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
PackageOptimizationInfo getPackageOptimizationInfo(ArtManagerInternal artManagerInternal) {
|
||||
return artManagerInternal == null || launchedActivityAppRecordRequiredAbi == null
|
||||
? PackageOptimizationInfo.createWithNoInfo()
|
||||
: artManagerInternal.getPackageOptimizationInfo(applicationInfo,
|
||||
launchedActivityAppRecordRequiredAbi, launchedActivityName);
|
||||
}
|
||||
}
|
||||
|
||||
ActivityMetricsLogger(ActivityStackSupervisor supervisor, Looper looper) {
|
||||
@@ -832,14 +839,8 @@ class ActivityMetricsLogger {
|
||||
info.bindApplicationDelayMs);
|
||||
}
|
||||
builder.addTaggedData(APP_TRANSITION_WINDOWS_DRAWN_DELAY_MS, info.windowsDrawnDelayMs);
|
||||
final ArtManagerInternal artManagerInternal = getArtManagerInternal();
|
||||
final PackageOptimizationInfo packageOptimizationInfo =
|
||||
(artManagerInternal == null) || (info.launchedActivityAppRecordRequiredAbi == null)
|
||||
? PackageOptimizationInfo.createWithNoInfo()
|
||||
: artManagerInternal.getPackageOptimizationInfo(
|
||||
info.applicationInfo,
|
||||
info.launchedActivityAppRecordRequiredAbi,
|
||||
info.launchedActivityName);
|
||||
info.getPackageOptimizationInfo(getArtManagerInternal());
|
||||
builder.addTaggedData(PACKAGE_OPTIMIZATION_COMPILATION_REASON,
|
||||
packageOptimizationInfo.getCompilationReason());
|
||||
builder.addTaggedData(PACKAGE_OPTIMIZATION_COMPILATION_FILTER,
|
||||
@@ -958,6 +959,8 @@ class ActivityMetricsLogger {
|
||||
builder.addTaggedData(APP_TRANSITION_PROCESS_RUNNING,
|
||||
info.mProcessRunning ? 1 : 0);
|
||||
mMetricsLogger.write(builder);
|
||||
final PackageOptimizationInfo packageOptimizationInfo =
|
||||
infoSnapshot.getPackageOptimizationInfo(getArtManagerInternal());
|
||||
FrameworkStatsLog.write(
|
||||
FrameworkStatsLog.APP_START_FULLY_DRAWN,
|
||||
info.mLastLaunchedActivity.info.applicationInfo.uid,
|
||||
@@ -967,7 +970,9 @@ class ActivityMetricsLogger {
|
||||
: FrameworkStatsLog.APP_START_FULLY_DRAWN__TYPE__WITHOUT_BUNDLE,
|
||||
info.mLastLaunchedActivity.info.name,
|
||||
info.mProcessRunning,
|
||||
startupTimeMs);
|
||||
startupTimeMs,
|
||||
packageOptimizationInfo.getCompilationReason(),
|
||||
packageOptimizationInfo.getCompilationFilter());
|
||||
|
||||
// Ends the trace started at the beginning of this function. This is located here to allow
|
||||
// the trace slice to have a noticable duration.
|
||||
|
||||
Reference in New Issue
Block a user