diff options
author | Luigi Semenzato <semenzato@chromium.org> | 2018-09-21 18:10:53 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-09-26 10:32:14 -0700 |
commit | 98bc2a6d4b6c83b6dcae8fe50101aef1b75d1a13 (patch) | |
tree | dbcd375e8d5e9bd27d33d391afe1882f17bfdd5e | |
parent | 536735c009117dc648808dfe47e55284deca8fa0 (diff) | |
download | system_api-98bc2a6d4b6c83b6dcae8fe50101aef1b75d1a13.tar.gz |
system_api: add anomaly event service interface
This also adds new event types to the metrics event protobuf,
and adds generation of C++ sources for use by the anomaly
collector.
BUG=chromium:729335
TEST=compiles, links, and runs with anomaly_collector
Change-Id: I330d9103752c9db58c6db824f69e25d5cc6bd180
Reviewed-on: https://chromium-review.googlesource.com/1239736
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Luigi Semenzato <semenzato@chromium.org>
Reviewed-by: Luigi Semenzato <semenzato@chromium.org>
-rw-r--r-- | dbus/metrics_event/metrics_event.proto | 9 | ||||
-rw-r--r-- | dbus/service_constants.h | 8 | ||||
-rw-r--r-- | system_api.gyp | 23 |
3 files changed, 38 insertions, 2 deletions
diff --git a/dbus/metrics_event/metrics_event.proto b/dbus/metrics_event/metrics_event.proto index 48fd473..c1a2762 100644 --- a/dbus/metrics_event/metrics_event.proto +++ b/dbus/metrics_event/metrics_event.proto @@ -8,13 +8,18 @@ option optimize_for = LITE_RUNTIME; package metrics_event; -// Content of MetricsEvent signals emitted by Chrome. +// Content of signals emitted by Chrome (the ChromeEvent signal in the +// MetricsEventService) and the anomaly_collector daemon (the AnomalyEvent +// signal in the AnomalyEventService) to report events of interest for +// measurements. message Event { // Event types. enum Type { TAB_DISCARD = 0; - OOM_KILL = 1; + OOM_KILL = 1; // obsolete---use OOM_KILL_BROWSER instead TAB_SWITCH = 2; + OOM_KILL_BROWSER = 3; + OOM_KILL_KERNEL = 4; } // The type of the event being signaled. diff --git a/dbus/service_constants.h b/dbus/service_constants.h index 37b50fa..9de9dc6 100644 --- a/dbus/service_constants.h +++ b/dbus/service_constants.h @@ -1187,4 +1187,12 @@ constexpr char kOpenFileMethod[] = "OpenFile"; } // namespace arc +namespace anomaly_collector { +const char kAnomalyEventServiceName[] = "org.chromium.AnomalyEventService"; +const char kAnomalyEventServicePath[] = "/org/chromium/AnomalyEventService"; +const char kAnomalyEventServiceInterface[] = + "org.chromium.AnomalyEventServiceInterface"; +const char kAnomalyEventSignalName[] = "AnomalyEvent"; +} // namespace anomaly_collector + #endif // SYSTEM_API_DBUS_SERVICE_CONSTANTS_H_ diff --git a/system_api.gyp b/system_api.gyp index f227307..a29cf4a 100644 --- a/system_api.gyp +++ b/system_api.gyp @@ -192,6 +192,29 @@ ] }, { + 'target_name': 'system_api-metrics_event-protos-gen', + 'type': 'none', + 'variables': { + 'proto_in_dir': 'dbus/metrics_event', + 'proto_out_dir': 'include/metrics_event/proto_bindings', + }, + 'sources': [ + '<(proto_in_dir)/metrics_event.proto', + ], + 'includes': ['../../platform2/common-mk/protoc.gypi'], + }, + { + 'target_name': 'system_api-metrics_event-protos', + 'type': 'static_library', + 'standalone_static_library': 1, + 'dependencies': [ + 'system_api-metrics_event-protos-gen', + ], + 'sources': [ + '<(SHARED_INTERMEDIATE_DIR)/include/metrics_event/proto_bindings/metrics_event.pb.cc', + ] + }, + { 'target_name': 'system_api-smbprovider-protos-gen', 'type': 'none', 'variables': { |