blob: 508e830e71ac5da090216080a209152e35ff97c2 [file] [log] [blame]
/*
* Copyright (C) 2019 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
syntax = "proto2";
option optimize_for = LITE_RUNTIME;
package perfetto.protos;
import "protos/perfetto/metrics/android/batt_metric.proto";
import "protos/perfetto/metrics/android/cpu_metric.proto";
import "protos/perfetto/metrics/android/mem_metric.proto";
import "protos/perfetto/metrics/android/mem_unagg_metric.proto";
import "protos/perfetto/metrics/android/process_growth.proto";
import "protos/perfetto/metrics/android/ion_metric.proto";
import "protos/perfetto/metrics/android/lmk_metric.proto";
import "protos/perfetto/metrics/android/powrails_metric.proto";
import "protos/perfetto/metrics/android/startup_metric.proto";
import "protos/perfetto/metrics/android/heap_profile_callsites.proto";
import "protos/perfetto/metrics/android/package_list.proto";
import "protos/perfetto/metrics/android/unsymbolized_frames.proto";
import "protos/perfetto/metrics/android/java_heap_stats.proto";
// Trace processor metadata (taken from the stats table schema and contents).
// TODO: perhaps add the other columns once we have enum support
message TraceMetadata {
message Entry {
optional string name = 1;
optional uint32 idx = 2;
optional int64 value = 3;
}
repeated Entry error_stats_entry = 1;
optional int64 trace_duration_ns = 2;
optional string trace_uuid = 3;
}
// Root message for all Perfetto-based metrics.
//
// Next id: 18
message TraceMetrics {
reserved 4, 13, 14;
// Battery counters metric on Android.
optional AndroidBatteryMetric android_batt = 5;
// CPU usage per trace, process and thread.
optional AndroidCpuMetric android_cpu = 6;
// Memory metrics on Android (owned by the Android Telemetry team).
optional AndroidMemoryMetric android_mem = 1;
// Memory metrics on Android in unaggregated form. (owned by the Android
// Telemetry team).
// Note: this generates a lot of data so should not be requested unless it
// is clear that this data is necessary.
optional AndroidMemoryUnaggregatedMetric android_mem_unagg = 11;
// Package list.
optional AndroidPackageList android_package_list = 12;
// Per-process memory growth metrics.
optional AndroidProcessGrowth android_process_growth = 10;
// ion buffer memory metrics.
optional AndroidIonMetric android_ion = 9;
// Statistics about low memory kills.
optional AndroidLmkMetric android_lmk = 8;
// Power Rails metrics on Android.
optional AndroidPowerRails android_powrails = 7;
// Startup metrics on Android (owned by the Android Telemetry team).
optional AndroidStartupMetric android_startup = 2;
// Heap profiler callsite statistics.
optional HeapProfileCallsites heap_profile_callsites = 16;
// Trace metadata (applicable to all traces).
optional TraceMetadata trace_metadata = 3;
// Returns stack frames missing symbols.
optional UnsymbolizedFrames unsymbolized_frames = 15;
// If the trace contains a heap graph, output allocation statistics.
optional JavaHeapStats java_heap_stats = 17;
// Demo extensions.
extensions 450 to 499;
// Vendor extensions.
extensions 500 to 1000;
}