Loading cmds/dumpstate/tests/dumpstate_test.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -1001,7 +1001,7 @@ TEST_F(DumpstateTest, DumpPool_withParallelRunDisabled_isNull) { TEST_F(DumpstateTest, PreDumpUiData) { // These traces are always enabled, i.e. they are always pre-dumped std::vector<std::filesystem::path> uiTraces; for (const auto traceFile : uiTraces) { for (const auto& traceFile : uiTraces) { std::system(("rm -f " + traceFile.string()).c_str()); EXPECT_FALSE(std::filesystem::exists(traceFile)) << traceFile << " was not deleted."; Loading include/input/DisplayViewport.h +6 −4 Original line number Diff line number Diff line Loading @@ -66,6 +66,8 @@ struct DisplayViewport { std::optional<uint8_t> physicalPort; ViewportType type; int32_t densityDpi; float xDpi; float yDpi; DisplayViewport() : displayId(ui::LogicalDisplayId::INVALID), Loading Loading @@ -124,7 +126,7 @@ struct DisplayViewport { std::string toString() const { return StringPrintf("Viewport %s: displayId=%s, uniqueId=%s, port=%s, orientation=%d, " "densityDpi=%d " "densityDpi=%d xDpi=%f, yDpi=%f, " "logicalFrame=[%d, %d, %d, %d], " "physicalFrame=[%d, %d, %d, %d], " "deviceSize=[%d, %d], " Loading @@ -132,9 +134,9 @@ struct DisplayViewport { ftl::enum_string(type).c_str(), displayId.toString().c_str(), uniqueId.c_str(), physicalPort ? ftl::to_string(*physicalPort).c_str() : "<none>", static_cast<int>(orientation), densityDpi, logicalLeft, logicalTop, logicalRight, logicalBottom, physicalLeft, physicalTop, physicalRight, physicalBottom, deviceWidth, deviceHeight, isActive); static_cast<int>(orientation), densityDpi, xDpi, yDpi, logicalLeft, logicalTop, logicalRight, logicalBottom, physicalLeft, physicalTop, physicalRight, physicalBottom, deviceWidth, deviceHeight, isActive); } }; Loading libs/binder/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -338,6 +338,7 @@ cc_defaults { cflags: [ "-DBINDER_RPC_DEV_SERVERS", "-DBINDER_ENABLE_RECORDING", "-DBINDER_OBSERVER_DROIDFOOD_CONFIG", ], }, }, Loading libs/binder/Binder.cpp +6 −0 Original line number Diff line number Diff line Loading @@ -418,6 +418,12 @@ status_t BBinder::transact( reply->markSensitive(); } if (data.dataSize() > binder::kLogTransactionsOverBytes) { ALOGW("Large data transaction of %zu bytes, interface descriptor %s, code %d, flags " "%d", data.dataSize(), String8(getInterfaceDescriptor()).c_str(), code, flags); } status_t err = NO_ERROR; switch (code) { case PING_TRANSACTION: Loading libs/binder/BinderObserverConfig.cpp +18 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,11 @@ #include "BinderObserverConfig.h" namespace android { #ifdef BINDER_OBSERVER_DROIDFOOD_CONFIG constexpr bool kUseDroidfoodConfig = true; #else constexpr bool kUseDroidfoodConfig = false; #endif // BINDER_OBSERVER_DROIDFOOD_CONFIG // __BIONIC__ has getprogname() but __GLIBC__ and others have program_invocation_short_name #if !defined(__BIONIC__) Loading @@ -47,6 +52,19 @@ std::string BinderObserverConfig::Environment::getProcessName() { return getprogname(); } BinderObserverConfig::ShardingConfig BinderObserverConfig::Environment::getSystemServerSharding() { return kUseDroidfoodConfig ? ShardingConfig{.processMod = 1, .spamMod = 5, .callMod = 10} : ShardingConfig{.processMod = 10, .spamMod = 50, .callMod = 100}; } BinderObserverConfig::ShardingConfig BinderObserverConfig::Environment::getOtherProcessesSharding() { return kUseDroidfoodConfig ? ShardingConfig{.processMod = 5, .spamMod = 1, .callMod = 2} : ShardingConfig{.processMod = 50, .spamMod = 10, .callMod = 20}; } std::pair<size_t, size_t> BinderObserverConfig::getBootStableTokens(Environment& environment) { std::string bootToken = environment.readFileLine(kBootIdPath); Loading Loading
cmds/dumpstate/tests/dumpstate_test.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -1001,7 +1001,7 @@ TEST_F(DumpstateTest, DumpPool_withParallelRunDisabled_isNull) { TEST_F(DumpstateTest, PreDumpUiData) { // These traces are always enabled, i.e. they are always pre-dumped std::vector<std::filesystem::path> uiTraces; for (const auto traceFile : uiTraces) { for (const auto& traceFile : uiTraces) { std::system(("rm -f " + traceFile.string()).c_str()); EXPECT_FALSE(std::filesystem::exists(traceFile)) << traceFile << " was not deleted."; Loading
include/input/DisplayViewport.h +6 −4 Original line number Diff line number Diff line Loading @@ -66,6 +66,8 @@ struct DisplayViewport { std::optional<uint8_t> physicalPort; ViewportType type; int32_t densityDpi; float xDpi; float yDpi; DisplayViewport() : displayId(ui::LogicalDisplayId::INVALID), Loading Loading @@ -124,7 +126,7 @@ struct DisplayViewport { std::string toString() const { return StringPrintf("Viewport %s: displayId=%s, uniqueId=%s, port=%s, orientation=%d, " "densityDpi=%d " "densityDpi=%d xDpi=%f, yDpi=%f, " "logicalFrame=[%d, %d, %d, %d], " "physicalFrame=[%d, %d, %d, %d], " "deviceSize=[%d, %d], " Loading @@ -132,9 +134,9 @@ struct DisplayViewport { ftl::enum_string(type).c_str(), displayId.toString().c_str(), uniqueId.c_str(), physicalPort ? ftl::to_string(*physicalPort).c_str() : "<none>", static_cast<int>(orientation), densityDpi, logicalLeft, logicalTop, logicalRight, logicalBottom, physicalLeft, physicalTop, physicalRight, physicalBottom, deviceWidth, deviceHeight, isActive); static_cast<int>(orientation), densityDpi, xDpi, yDpi, logicalLeft, logicalTop, logicalRight, logicalBottom, physicalLeft, physicalTop, physicalRight, physicalBottom, deviceWidth, deviceHeight, isActive); } }; Loading
libs/binder/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -338,6 +338,7 @@ cc_defaults { cflags: [ "-DBINDER_RPC_DEV_SERVERS", "-DBINDER_ENABLE_RECORDING", "-DBINDER_OBSERVER_DROIDFOOD_CONFIG", ], }, }, Loading
libs/binder/Binder.cpp +6 −0 Original line number Diff line number Diff line Loading @@ -418,6 +418,12 @@ status_t BBinder::transact( reply->markSensitive(); } if (data.dataSize() > binder::kLogTransactionsOverBytes) { ALOGW("Large data transaction of %zu bytes, interface descriptor %s, code %d, flags " "%d", data.dataSize(), String8(getInterfaceDescriptor()).c_str(), code, flags); } status_t err = NO_ERROR; switch (code) { case PING_TRANSACTION: Loading
libs/binder/BinderObserverConfig.cpp +18 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,11 @@ #include "BinderObserverConfig.h" namespace android { #ifdef BINDER_OBSERVER_DROIDFOOD_CONFIG constexpr bool kUseDroidfoodConfig = true; #else constexpr bool kUseDroidfoodConfig = false; #endif // BINDER_OBSERVER_DROIDFOOD_CONFIG // __BIONIC__ has getprogname() but __GLIBC__ and others have program_invocation_short_name #if !defined(__BIONIC__) Loading @@ -47,6 +52,19 @@ std::string BinderObserverConfig::Environment::getProcessName() { return getprogname(); } BinderObserverConfig::ShardingConfig BinderObserverConfig::Environment::getSystemServerSharding() { return kUseDroidfoodConfig ? ShardingConfig{.processMod = 1, .spamMod = 5, .callMod = 10} : ShardingConfig{.processMod = 10, .spamMod = 50, .callMod = 100}; } BinderObserverConfig::ShardingConfig BinderObserverConfig::Environment::getOtherProcessesSharding() { return kUseDroidfoodConfig ? ShardingConfig{.processMod = 5, .spamMod = 1, .callMod = 2} : ShardingConfig{.processMod = 50, .spamMod = 10, .callMod = 20}; } std::pair<size_t, size_t> BinderObserverConfig::getBootStableTokens(Environment& environment) { std::string bootToken = environment.readFileLine(kBootIdPath); Loading