Loading cmds/statsd/Android.bp +2 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ cc_library_host_shared { ], shared_libs: [ "libmetricprotos", "libplatformprotos", ], Loading @@ -37,6 +38,7 @@ cc_library_host_shared { }, export_shared_lib_headers: [ "libmetricprotos", "libplatformprotos", ] Loading cmds/statsd/Android.mk +8 −5 Original line number Diff line number Diff line Loading @@ -84,8 +84,7 @@ statsd_common_aidl_includes := \ $(LOCAL_PATH)/../../core/java statsd_common_static_libraries := \ libhealthhalutils \ libplatformprotos \ libhealthhalutils statsd_common_shared_libraries := \ libbase \ Loading Loading @@ -234,7 +233,9 @@ LOCAL_SRC_FILES := \ LOCAL_STATIC_LIBRARIES := \ $(statsd_common_static_libraries) \ libgmock libgmock \ libmetricprotos \ libplatformprotos LOCAL_PROTOC_OPTIMIZE_TYPE := full Loading @@ -254,6 +255,7 @@ include $(CLEAR_VARS) LOCAL_MODULE := statsdprotolite LOCAL_SRC_FILES := \ src/metrics_constants/metrics_constants.proto \ src/stats_log.proto \ src/statsd_config.proto \ src/perfetto/perfetto_config.proto \ Loading Loading @@ -301,7 +303,6 @@ LOCAL_PROTOC_FLAGS := \ LOCAL_SHARED_LIBRARIES := $(statsd_common_shared_libraries) \ libprotobuf-cpp-full LOCAL_STATIC_JAVA_LIBRARIES := \ platformprotoslite Loading @@ -319,7 +320,9 @@ LOCAL_CFLAGS += -Wno-varargs LOCAL_AIDL_INCLUDES := $(statsd_common_aidl_includes) LOCAL_STATIC_LIBRARIES := \ $(statsd_common_static_libraries) $(statsd_common_static_libraries) \ libmetricprotos \ libplatformprotos LOCAL_SHARED_LIBRARIES := $(statsd_common_shared_libraries) \ libgtest_prod \ Loading cmds/statsd/src/atoms.proto +13 −2 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ import "frameworks/base/core/proto/android/server/enums.proto"; import "frameworks/base/core/proto/android/telecomm/enums.proto"; import "frameworks/base/core/proto/android/telephony/enums.proto"; import "frameworks/base/core/proto/android/view/enums.proto"; import "frameworks/base/proto/src/metrics_constants.proto"; /** * The master atom class. This message defines all of the available Loading Loading @@ -121,8 +122,7 @@ message Atom { ANROccurred anr_occurred = 79; WTFOccurred wtf_occurred = 80; LowMemReported low_mem_reported = 81; GenericAtom generic_atom = 82; } // Pulled events will start at field 10000. Loading Loading @@ -2012,3 +2012,14 @@ message BinderCalls { // Maximum parcel request size of one API call. optional int64 max_request_size_bytes = 11; } /** * An atom for generic metrics logging. Available from Android Q. * One has to add an enum to frameworks/base/proto/src/metrics_constants.proto * to extend another metric. */ message GenericAtom { // Type of event. Previously it only indicated visual elements but now it // is expanded to describe any type of event. optional com_android_internal_logging.MetricsEvent.View view = 1; } cmds/statsd/src/metrics_constants/metrics_constants.proto 0 → 120000 +1 −0 Original line number Diff line number Diff line ../../../../proto/src/metrics_constants.proto No newline at end of file proto/Android.bp +30 −0 Original line number Diff line number Diff line Loading @@ -17,3 +17,33 @@ java_library_static { }, }, } cc_library { name: "libmetricprotos", host_supported: true, proto: { export_proto_headers: true, include_dirs: ["external/protobuf/src"], }, cflags: [ "-Wall", "-Werror", "-Wno-unused-parameter", ], srcs: ["src/metrics_constants.proto"], target: { host: { proto: { type: "full", }, }, android: { proto: { type: "lite", }, shared: { enabled: false, }, }, }, } Loading
cmds/statsd/Android.bp +2 −0 Original line number Diff line number Diff line Loading @@ -25,6 +25,7 @@ cc_library_host_shared { ], shared_libs: [ "libmetricprotos", "libplatformprotos", ], Loading @@ -37,6 +38,7 @@ cc_library_host_shared { }, export_shared_lib_headers: [ "libmetricprotos", "libplatformprotos", ] Loading
cmds/statsd/Android.mk +8 −5 Original line number Diff line number Diff line Loading @@ -84,8 +84,7 @@ statsd_common_aidl_includes := \ $(LOCAL_PATH)/../../core/java statsd_common_static_libraries := \ libhealthhalutils \ libplatformprotos \ libhealthhalutils statsd_common_shared_libraries := \ libbase \ Loading Loading @@ -234,7 +233,9 @@ LOCAL_SRC_FILES := \ LOCAL_STATIC_LIBRARIES := \ $(statsd_common_static_libraries) \ libgmock libgmock \ libmetricprotos \ libplatformprotos LOCAL_PROTOC_OPTIMIZE_TYPE := full Loading @@ -254,6 +255,7 @@ include $(CLEAR_VARS) LOCAL_MODULE := statsdprotolite LOCAL_SRC_FILES := \ src/metrics_constants/metrics_constants.proto \ src/stats_log.proto \ src/statsd_config.proto \ src/perfetto/perfetto_config.proto \ Loading Loading @@ -301,7 +303,6 @@ LOCAL_PROTOC_FLAGS := \ LOCAL_SHARED_LIBRARIES := $(statsd_common_shared_libraries) \ libprotobuf-cpp-full LOCAL_STATIC_JAVA_LIBRARIES := \ platformprotoslite Loading @@ -319,7 +320,9 @@ LOCAL_CFLAGS += -Wno-varargs LOCAL_AIDL_INCLUDES := $(statsd_common_aidl_includes) LOCAL_STATIC_LIBRARIES := \ $(statsd_common_static_libraries) $(statsd_common_static_libraries) \ libmetricprotos \ libplatformprotos LOCAL_SHARED_LIBRARIES := $(statsd_common_shared_libraries) \ libgtest_prod \ Loading
cmds/statsd/src/atoms.proto +13 −2 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ import "frameworks/base/core/proto/android/server/enums.proto"; import "frameworks/base/core/proto/android/telecomm/enums.proto"; import "frameworks/base/core/proto/android/telephony/enums.proto"; import "frameworks/base/core/proto/android/view/enums.proto"; import "frameworks/base/proto/src/metrics_constants.proto"; /** * The master atom class. This message defines all of the available Loading Loading @@ -121,8 +122,7 @@ message Atom { ANROccurred anr_occurred = 79; WTFOccurred wtf_occurred = 80; LowMemReported low_mem_reported = 81; GenericAtom generic_atom = 82; } // Pulled events will start at field 10000. Loading Loading @@ -2012,3 +2012,14 @@ message BinderCalls { // Maximum parcel request size of one API call. optional int64 max_request_size_bytes = 11; } /** * An atom for generic metrics logging. Available from Android Q. * One has to add an enum to frameworks/base/proto/src/metrics_constants.proto * to extend another metric. */ message GenericAtom { // Type of event. Previously it only indicated visual elements but now it // is expanded to describe any type of event. optional com_android_internal_logging.MetricsEvent.View view = 1; }
cmds/statsd/src/metrics_constants/metrics_constants.proto 0 → 120000 +1 −0 Original line number Diff line number Diff line ../../../../proto/src/metrics_constants.proto No newline at end of file
proto/Android.bp +30 −0 Original line number Diff line number Diff line Loading @@ -17,3 +17,33 @@ java_library_static { }, }, } cc_library { name: "libmetricprotos", host_supported: true, proto: { export_proto_headers: true, include_dirs: ["external/protobuf/src"], }, cflags: [ "-Wall", "-Werror", "-Wno-unused-parameter", ], srcs: ["src/metrics_constants.proto"], target: { host: { proto: { type: "full", }, }, android: { proto: { type: "lite", }, shared: { enabled: false, }, }, }, }