From 0e818cf92594cd31ca8ebe64cf1692d2c82c6fb2 Mon Sep 17 00:00:00 2001 From: Jack He Date: Sun, 20 Jan 2019 23:16:45 -0800 Subject: Metrics: Log HCI timeout event over stats log Fixes: 121213292 Bug: 111812273 Test: make, test drive with statsd Change-Id: I9bab0078a1e45c9811fd63f4c5aef9f4704ac555 --- system/common/metrics.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'system/common/metrics.cc') diff --git a/system/common/metrics.cc b/system/common/metrics.cc index 976b5cfa5d..40606d32d9 100644 --- a/system/common/metrics.cc +++ b/system/common/metrics.cc @@ -597,6 +597,16 @@ void LogLinkLayerConnectionEvent(const RawAddress* address, } } +void LogHciTimeoutEvent(uint32_t hci_cmd) { + int ret = + android::util::stats_write(android::util::BLUETOOTH_HCI_TIMEOUT_REPORTED, + static_cast(hci_cmd)); + if (ret < 0) { + LOG(WARNING) << __func__ << ": failed for opcode " << loghex(hci_cmd) + << ", error " << ret; + } +} + } // namespace common } // namespace bluetooth -- cgit v1.2.3-59-g8ed1b