Loading system/btif/src/bluetooth.cc +2 −1 Original line number Diff line number Diff line Loading @@ -908,6 +908,7 @@ static void dump(int fd, const char** arguments) { SDP_Dumpsys(fd); DumpsysRecord(fd); L2CA_Dumpsys(fd); DumpsysBtm(fd); bluetooth::shim::Dump(fd, arguments); power_telemetry::GetInstance().Dumpsys(fd); log::debug("Finished bluetooth dumpsys"); Loading system/main/shim/acl.cc +0 −21 Original line number Diff line number Diff line Loading @@ -1203,26 +1203,6 @@ void DumpsysAcl(int fd) { } #undef DUMPSYS_TAG using Record = common::TimestampedEntry<std::string>; const std::string kTimeFormat("%Y-%m-%d %H:%M:%S"); #define DUMPSYS_TAG "shim::btm" void DumpsysBtm(int fd) { LOG_DUMPSYS_TITLE(fd, DUMPSYS_TAG); if (btm_cb.history_ != nullptr) { std::vector<Record> history = btm_cb.history_->Pull(); for (auto& record : history) { time_t then = record.timestamp / 1000; struct tm tm; localtime_r(&then, &tm); auto s2 = common::StringFormatTime(kTimeFormat, tm); LOG_DUMPSYS(fd, " %s.%03u %s", s2.c_str(), static_cast<unsigned int>(record.timestamp % 1000), record.entry.c_str()); } } } #undef DUMPSYS_TAG #define DUMPSYS_TAG "shim::stack" void DumpsysNeighbor(int fd) { LOG_DUMPSYS(fd, "Stack information %lc%lc", kRunicBjarkan, kRunicHagall); Loading Loading @@ -1263,7 +1243,6 @@ void DumpsysNeighbor(int fd) { void shim::Acl::Dump(int fd) const { DumpsysNeighbor(fd); DumpsysAcl(fd); DumpsysBtm(fd); } shim::Acl::Acl(os::Handler* handler, const acl_interface_t& acl_interface, Loading system/stack/btm/btm_main.cc +23 −3 Original line number Diff line number Diff line Loading @@ -27,9 +27,9 @@ #include <memory> #include <string> #include "btm_int_types.h" #include "internal_include/bt_target.h" #include "os/log.h" #include "common/strings.h" #include "main/shim/dumpsys.h" #include "stack/btm/btm_int_types.h" #include "stack/include/security_client_callbacks.h" #include "types/raw_address.h" Loading Loading @@ -96,3 +96,23 @@ void BTM_LogHistory(const std::string& tag, const tBLE_BD_ADDR& ble_bd_addr, } bluetooth::common::TimestamperInMilliseconds timestamper_in_milliseconds; using Record = common::TimestampedEntry<std::string>; const std::string kTimeFormat("%Y-%m-%d %H:%M:%S"); #define DUMPSYS_TAG "shim::btm" void DumpsysBtm(int fd) { LOG_DUMPSYS_TITLE(fd, DUMPSYS_TAG); if (btm_cb.history_ != nullptr) { std::vector<Record> history = btm_cb.history_->Pull(); for (auto& record : history) { time_t then = record.timestamp / 1000; struct tm tm; localtime_r(&then, &tm); auto s2 = common::StringFormatTime(kTimeFormat, tm); LOG_DUMPSYS(fd, " %s.%03u %s", s2.c_str(), static_cast<unsigned int>(record.timestamp % 1000), record.entry.c_str()); } } } #undef DUMPSYS_TAG system/stack/include/btm_client_interface.h +2 −0 Original line number Diff line number Diff line Loading @@ -156,3 +156,5 @@ struct btm_client_interface_t { }; struct btm_client_interface_t& get_btm_client_interface(); void DumpsysBtm(int fd); system/test/mock/mock_main_shim_acl.cc +0 −3 Original line number Diff line number Diff line Loading @@ -39,8 +39,6 @@ void DumpsysL2cap(int /* fd */) { inc_func_call_count(__func__); } void DumpsysAcl(int /* fd */) { inc_func_call_count(__func__); } void DumpsysBtm(int /* fd */) { inc_func_call_count(__func__); } void DumpsysNeighbor(int /* fd */) { inc_func_call_count(__func__); } void shim::Acl::Dump(int /* fd */) const { inc_func_call_count(__func__); } Loading Loading @@ -101,7 +99,6 @@ bluetooth::hci::AddressWithType shim::Acl::GetConnectionPeerAddress(uint16_t /* std::optional<uint8_t> shim::Acl::GetAdvertisingSetConnectedTo(const RawAddress& /* remote_bda */) { inc_func_call_count(__func__); return std::nullopt; ; } void shim::Acl::OnLeLinkDisconnected(HciHandle /* handle */, hci::ErrorCode /* reason */) { Loading Loading
system/btif/src/bluetooth.cc +2 −1 Original line number Diff line number Diff line Loading @@ -908,6 +908,7 @@ static void dump(int fd, const char** arguments) { SDP_Dumpsys(fd); DumpsysRecord(fd); L2CA_Dumpsys(fd); DumpsysBtm(fd); bluetooth::shim::Dump(fd, arguments); power_telemetry::GetInstance().Dumpsys(fd); log::debug("Finished bluetooth dumpsys"); Loading
system/main/shim/acl.cc +0 −21 Original line number Diff line number Diff line Loading @@ -1203,26 +1203,6 @@ void DumpsysAcl(int fd) { } #undef DUMPSYS_TAG using Record = common::TimestampedEntry<std::string>; const std::string kTimeFormat("%Y-%m-%d %H:%M:%S"); #define DUMPSYS_TAG "shim::btm" void DumpsysBtm(int fd) { LOG_DUMPSYS_TITLE(fd, DUMPSYS_TAG); if (btm_cb.history_ != nullptr) { std::vector<Record> history = btm_cb.history_->Pull(); for (auto& record : history) { time_t then = record.timestamp / 1000; struct tm tm; localtime_r(&then, &tm); auto s2 = common::StringFormatTime(kTimeFormat, tm); LOG_DUMPSYS(fd, " %s.%03u %s", s2.c_str(), static_cast<unsigned int>(record.timestamp % 1000), record.entry.c_str()); } } } #undef DUMPSYS_TAG #define DUMPSYS_TAG "shim::stack" void DumpsysNeighbor(int fd) { LOG_DUMPSYS(fd, "Stack information %lc%lc", kRunicBjarkan, kRunicHagall); Loading Loading @@ -1263,7 +1243,6 @@ void DumpsysNeighbor(int fd) { void shim::Acl::Dump(int fd) const { DumpsysNeighbor(fd); DumpsysAcl(fd); DumpsysBtm(fd); } shim::Acl::Acl(os::Handler* handler, const acl_interface_t& acl_interface, Loading
system/stack/btm/btm_main.cc +23 −3 Original line number Diff line number Diff line Loading @@ -27,9 +27,9 @@ #include <memory> #include <string> #include "btm_int_types.h" #include "internal_include/bt_target.h" #include "os/log.h" #include "common/strings.h" #include "main/shim/dumpsys.h" #include "stack/btm/btm_int_types.h" #include "stack/include/security_client_callbacks.h" #include "types/raw_address.h" Loading Loading @@ -96,3 +96,23 @@ void BTM_LogHistory(const std::string& tag, const tBLE_BD_ADDR& ble_bd_addr, } bluetooth::common::TimestamperInMilliseconds timestamper_in_milliseconds; using Record = common::TimestampedEntry<std::string>; const std::string kTimeFormat("%Y-%m-%d %H:%M:%S"); #define DUMPSYS_TAG "shim::btm" void DumpsysBtm(int fd) { LOG_DUMPSYS_TITLE(fd, DUMPSYS_TAG); if (btm_cb.history_ != nullptr) { std::vector<Record> history = btm_cb.history_->Pull(); for (auto& record : history) { time_t then = record.timestamp / 1000; struct tm tm; localtime_r(&then, &tm); auto s2 = common::StringFormatTime(kTimeFormat, tm); LOG_DUMPSYS(fd, " %s.%03u %s", s2.c_str(), static_cast<unsigned int>(record.timestamp % 1000), record.entry.c_str()); } } } #undef DUMPSYS_TAG
system/stack/include/btm_client_interface.h +2 −0 Original line number Diff line number Diff line Loading @@ -156,3 +156,5 @@ struct btm_client_interface_t { }; struct btm_client_interface_t& get_btm_client_interface(); void DumpsysBtm(int fd);
system/test/mock/mock_main_shim_acl.cc +0 −3 Original line number Diff line number Diff line Loading @@ -39,8 +39,6 @@ void DumpsysL2cap(int /* fd */) { inc_func_call_count(__func__); } void DumpsysAcl(int /* fd */) { inc_func_call_count(__func__); } void DumpsysBtm(int /* fd */) { inc_func_call_count(__func__); } void DumpsysNeighbor(int /* fd */) { inc_func_call_count(__func__); } void shim::Acl::Dump(int /* fd */) const { inc_func_call_count(__func__); } Loading Loading @@ -101,7 +99,6 @@ bluetooth::hci::AddressWithType shim::Acl::GetConnectionPeerAddress(uint16_t /* std::optional<uint8_t> shim::Acl::GetAdvertisingSetConnectedTo(const RawAddress& /* remote_bda */) { inc_func_call_count(__func__); return std::nullopt; ; } void shim::Acl::OnLeLinkDisconnected(HciHandle /* handle */, hci::ErrorCode /* reason */) { Loading