Loading system/gd/Android.bp +0 −4 Original line number Diff line number Diff line Loading @@ -640,11 +640,9 @@ genrule { srcs: [ "dumpsys_data.fbs", "module_unittest.fbs", "os/wakelock_manager.fbs", ], out: [ "dumpsys_data.bfbs", "wakelock_manager.bfbs", ], } Loading @@ -657,10 +655,8 @@ genrule { srcs: [ "dumpsys_data.fbs", "module_unittest.fbs", "os/wakelock_manager.fbs", ], out: [ "dumpsys_data_generated.h", "wakelock_manager_generated.h", ], } system/gd/BUILD.gn +0 −2 Original line number Diff line number Diff line Loading @@ -81,14 +81,12 @@ static_library("libbluetooth_gd") { flatbuffer("BluetoothGeneratedDumpsysDataSchema_h") { sources = [ "dumpsys_data.fbs", "os/wakelock_manager.fbs", ] } bt_flatc_binary_schema("BluetoothGeneratedDumpsysBinarySchema_bfbs") { sources = [ "dumpsys_data.fbs", "os/wakelock_manager.fbs", ] include_dir = "system/gd" Loading system/gd/dumpsys_data.fbs +0 −2 Original line number Diff line number Diff line Loading @@ -10,7 +10,6 @@ include "module_unittest.fbs"; include "os/wakelock_manager.fbs"; namespace bluetooth; Loading @@ -18,7 +17,6 @@ attribute "privacy"; table DumpsysData { title:string (privacy:"Any"); wakelock_manager_data:bluetooth.os.WakelockManagerData (privacy:"Any"); module_unittest_data:bluetooth.ModuleUnitTestData; // private } Loading system/gd/module_dumper.cc +1 −29 Original line number Diff line number Diff line Loading @@ -28,35 +28,7 @@ using ::bluetooth::os::WakelockManager; namespace bluetooth { void ModuleDumper::DumpState(std::string* output, std::ostringstream& /*oss*/) const { log::assert_that(output != nullptr, "assert failed: output != nullptr"); flatbuffers::FlatBufferBuilder builder(1024); auto title = builder.CreateString(title_); auto wakelock_offset = WakelockManager::Get().GetDumpsysData(&builder); std::queue<DumpsysDataFinisher> queue; for (auto it = module_registry_.start_order_.rbegin(); it != module_registry_.start_order_.rend(); it++) { auto instance = module_registry_.started_modules_.find(*it); log::assert_that(instance != module_registry_.started_modules_.end(), "assert failed: instance != module_registry_.started_modules_.end()"); log::verbose("Starting dumpsys module:{}", instance->second->ToString()); queue.push(instance->second->GetDumpsysData(&builder)); log::verbose("Finished dumpsys module:{}", instance->second->ToString()); } DumpsysDataBuilder data_builder(builder); data_builder.add_title(title); data_builder.add_wakelock_manager_data(wakelock_offset); while (!queue.empty()) { queue.front()(&data_builder); queue.pop(); } builder.Finish(data_builder.Finish()); *output = std::string(builder.GetBufferPointer(), builder.GetBufferPointer() + builder.GetSize()); *output = ""; } } // namespace bluetooth system/gd/module_dumper.h +2 −2 Original line number Diff line number Diff line Loading @@ -32,8 +32,8 @@ public: void DumpState(std::string* output, std::ostringstream& oss) const; private: const ModuleRegistry& module_registry_; const std::string title_; [[maybe_unused]] const ModuleRegistry& module_registry_; [[maybe_unused]] const std::string title_; }; } // namespace bluetooth Loading
system/gd/Android.bp +0 −4 Original line number Diff line number Diff line Loading @@ -640,11 +640,9 @@ genrule { srcs: [ "dumpsys_data.fbs", "module_unittest.fbs", "os/wakelock_manager.fbs", ], out: [ "dumpsys_data.bfbs", "wakelock_manager.bfbs", ], } Loading @@ -657,10 +655,8 @@ genrule { srcs: [ "dumpsys_data.fbs", "module_unittest.fbs", "os/wakelock_manager.fbs", ], out: [ "dumpsys_data_generated.h", "wakelock_manager_generated.h", ], }
system/gd/BUILD.gn +0 −2 Original line number Diff line number Diff line Loading @@ -81,14 +81,12 @@ static_library("libbluetooth_gd") { flatbuffer("BluetoothGeneratedDumpsysDataSchema_h") { sources = [ "dumpsys_data.fbs", "os/wakelock_manager.fbs", ] } bt_flatc_binary_schema("BluetoothGeneratedDumpsysBinarySchema_bfbs") { sources = [ "dumpsys_data.fbs", "os/wakelock_manager.fbs", ] include_dir = "system/gd" Loading
system/gd/dumpsys_data.fbs +0 −2 Original line number Diff line number Diff line Loading @@ -10,7 +10,6 @@ include "module_unittest.fbs"; include "os/wakelock_manager.fbs"; namespace bluetooth; Loading @@ -18,7 +17,6 @@ attribute "privacy"; table DumpsysData { title:string (privacy:"Any"); wakelock_manager_data:bluetooth.os.WakelockManagerData (privacy:"Any"); module_unittest_data:bluetooth.ModuleUnitTestData; // private } Loading
system/gd/module_dumper.cc +1 −29 Original line number Diff line number Diff line Loading @@ -28,35 +28,7 @@ using ::bluetooth::os::WakelockManager; namespace bluetooth { void ModuleDumper::DumpState(std::string* output, std::ostringstream& /*oss*/) const { log::assert_that(output != nullptr, "assert failed: output != nullptr"); flatbuffers::FlatBufferBuilder builder(1024); auto title = builder.CreateString(title_); auto wakelock_offset = WakelockManager::Get().GetDumpsysData(&builder); std::queue<DumpsysDataFinisher> queue; for (auto it = module_registry_.start_order_.rbegin(); it != module_registry_.start_order_.rend(); it++) { auto instance = module_registry_.started_modules_.find(*it); log::assert_that(instance != module_registry_.started_modules_.end(), "assert failed: instance != module_registry_.started_modules_.end()"); log::verbose("Starting dumpsys module:{}", instance->second->ToString()); queue.push(instance->second->GetDumpsysData(&builder)); log::verbose("Finished dumpsys module:{}", instance->second->ToString()); } DumpsysDataBuilder data_builder(builder); data_builder.add_title(title); data_builder.add_wakelock_manager_data(wakelock_offset); while (!queue.empty()) { queue.front()(&data_builder); queue.pop(); } builder.Finish(data_builder.Finish()); *output = std::string(builder.GetBufferPointer(), builder.GetBufferPointer() + builder.GetSize()); *output = ""; } } // namespace bluetooth
system/gd/module_dumper.h +2 −2 Original line number Diff line number Diff line Loading @@ -32,8 +32,8 @@ public: void DumpState(std::string* output, std::ostringstream& oss) const; private: const ModuleRegistry& module_registry_; const std::string title_; [[maybe_unused]] const ModuleRegistry& module_registry_; [[maybe_unused]] const std::string title_; }; } // namespace bluetooth