Loading system/gd/hci/controller.cc +7 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ #include "common/init_flags.h" #include "hci/hci_layer.h" #include "hci_controller_generated.h" #include "os/metrics.h" namespace bluetooth { namespace hci { Loading Loading @@ -247,6 +248,12 @@ struct Controller::impl { ASSERT_LOG(status == ErrorCode::SUCCESS, "Status 0x%02hhx, %s", status, ErrorCodeText(status).c_str()); local_version_information_ = complete_view.GetLocalVersionInformation(); bluetooth::os::LogMetricBluetoothLocalVersions( local_version_information_.manufacturer_name_, static_cast<uint8_t>(local_version_information_.lmp_version_), local_version_information_.lmp_subversion_, static_cast<uint8_t>(local_version_information_.hci_version_), local_version_information_.hci_revision_); } void read_local_supported_commands_complete_handler(CommandCompleteView view) { Loading system/gd/os/android/metrics.cc +21 −0 Original line number Diff line number Diff line Loading @@ -424,6 +424,27 @@ void LogMetricBluetoothHalCrashReason( } } void LogMetricBluetoothLocalVersions( uint32_t lmp_manufacturer_name, uint8_t lmp_version, uint32_t lmp_subversion, uint8_t hci_version, uint32_t hci_revision) { int ret = stats_write( BLUETOOTH_LOCAL_VERSIONS_REPORTED, lmp_manufacturer_name, lmp_version, lmp_subversion, hci_version, hci_revision); if (ret < 0) { LOG_WARN( "Failed for LogMetricBluetoothLocalVersions, " "lmp_manufacturer_name %d, lmp_version %hhu, lmp_subversion %d, hci_version %hhu, hci_revision %d, error %d", lmp_manufacturer_name, lmp_version, lmp_subversion, hci_version, hci_revision, ret); } } void LogMetricBluetoothCodePathCounterMetrics(int32_t key, int64_t count) { int ret = stats_write(BLUETOOTH_CODE_PATH_COUNTER, key, count); if (ret < 0) { Loading system/gd/os/host/metrics.cc +7 −0 Original line number Diff line number Diff line Loading @@ -103,6 +103,13 @@ void LogMetricA2dpPlaybackEvent(const Address& address, int playback_state, int void LogMetricBluetoothHalCrashReason( const Address& address, uint32_t error_code, uint32_t vendor_error_code) {} void LogMetricBluetoothLocalVersions( uint32_t lmp_manufacturer_name, uint8_t lmp_version, uint32_t lmp_subversion, uint8_t hci_version, uint32_t hci_reversion) {} void LogMetricBluetoothCodePathCounterMetrics(int32_t key, int64_t count) {} } // namespace os } // namespace bluetooth system/gd/os/linux/metrics.cc +7 −0 Original line number Diff line number Diff line Loading @@ -103,6 +103,13 @@ void LogMetricA2dpPlaybackEvent(const Address& address, int playback_state, int void LogMetricBluetoothHalCrashReason( const Address& address, uint32_t error_code, uint32_t vendor_error_code) {} void LogMetricBluetoothLocalVersions( uint32_t lmp_manufacturer_name, uint8_t lmp_version, uint32_t lmp_subversion, uint8_t hci_version, uint32_t hci_revision) {} void LogMetricBluetoothCodePathCounterMetrics(int32_t key, int64_t count) {} } // namespace os Loading system/gd/os/metrics.h +7 −0 Original line number Diff line number Diff line Loading @@ -268,6 +268,13 @@ void LogMetricBluetoothHalCrashReason( uint32_t error_code, uint32_t vendor_error_code); void LogMetricBluetoothLocalVersions( uint32_t lmp_manufacturer_name, uint8_t lmp_version, uint32_t lmp_subversion, uint8_t hci_version, uint32_t hci_revision); void LogMetricBluetoothCodePathCounterMetrics(int32_t key, int64_t count); } // namespace os Loading Loading
system/gd/hci/controller.cc +7 −0 Original line number Diff line number Diff line Loading @@ -24,6 +24,7 @@ #include "common/init_flags.h" #include "hci/hci_layer.h" #include "hci_controller_generated.h" #include "os/metrics.h" namespace bluetooth { namespace hci { Loading Loading @@ -247,6 +248,12 @@ struct Controller::impl { ASSERT_LOG(status == ErrorCode::SUCCESS, "Status 0x%02hhx, %s", status, ErrorCodeText(status).c_str()); local_version_information_ = complete_view.GetLocalVersionInformation(); bluetooth::os::LogMetricBluetoothLocalVersions( local_version_information_.manufacturer_name_, static_cast<uint8_t>(local_version_information_.lmp_version_), local_version_information_.lmp_subversion_, static_cast<uint8_t>(local_version_information_.hci_version_), local_version_information_.hci_revision_); } void read_local_supported_commands_complete_handler(CommandCompleteView view) { Loading
system/gd/os/android/metrics.cc +21 −0 Original line number Diff line number Diff line Loading @@ -424,6 +424,27 @@ void LogMetricBluetoothHalCrashReason( } } void LogMetricBluetoothLocalVersions( uint32_t lmp_manufacturer_name, uint8_t lmp_version, uint32_t lmp_subversion, uint8_t hci_version, uint32_t hci_revision) { int ret = stats_write( BLUETOOTH_LOCAL_VERSIONS_REPORTED, lmp_manufacturer_name, lmp_version, lmp_subversion, hci_version, hci_revision); if (ret < 0) { LOG_WARN( "Failed for LogMetricBluetoothLocalVersions, " "lmp_manufacturer_name %d, lmp_version %hhu, lmp_subversion %d, hci_version %hhu, hci_revision %d, error %d", lmp_manufacturer_name, lmp_version, lmp_subversion, hci_version, hci_revision, ret); } } void LogMetricBluetoothCodePathCounterMetrics(int32_t key, int64_t count) { int ret = stats_write(BLUETOOTH_CODE_PATH_COUNTER, key, count); if (ret < 0) { Loading
system/gd/os/host/metrics.cc +7 −0 Original line number Diff line number Diff line Loading @@ -103,6 +103,13 @@ void LogMetricA2dpPlaybackEvent(const Address& address, int playback_state, int void LogMetricBluetoothHalCrashReason( const Address& address, uint32_t error_code, uint32_t vendor_error_code) {} void LogMetricBluetoothLocalVersions( uint32_t lmp_manufacturer_name, uint8_t lmp_version, uint32_t lmp_subversion, uint8_t hci_version, uint32_t hci_reversion) {} void LogMetricBluetoothCodePathCounterMetrics(int32_t key, int64_t count) {} } // namespace os } // namespace bluetooth
system/gd/os/linux/metrics.cc +7 −0 Original line number Diff line number Diff line Loading @@ -103,6 +103,13 @@ void LogMetricA2dpPlaybackEvent(const Address& address, int playback_state, int void LogMetricBluetoothHalCrashReason( const Address& address, uint32_t error_code, uint32_t vendor_error_code) {} void LogMetricBluetoothLocalVersions( uint32_t lmp_manufacturer_name, uint8_t lmp_version, uint32_t lmp_subversion, uint8_t hci_version, uint32_t hci_revision) {} void LogMetricBluetoothCodePathCounterMetrics(int32_t key, int64_t count) {} } // namespace os Loading
system/gd/os/metrics.h +7 −0 Original line number Diff line number Diff line Loading @@ -268,6 +268,13 @@ void LogMetricBluetoothHalCrashReason( uint32_t error_code, uint32_t vendor_error_code); void LogMetricBluetoothLocalVersions( uint32_t lmp_manufacturer_name, uint8_t lmp_version, uint32_t lmp_subversion, uint8_t hci_version, uint32_t hci_revision); void LogMetricBluetoothCodePathCounterMetrics(int32_t key, int64_t count); } // namespace os Loading