diff options
author | 2021-05-05 17:09:58 +0000 | |
---|---|---|
committer | 2021-05-05 17:09:58 +0000 | |
commit | 2281985cd3e7f6eeeed48f5b4a677e2e665a2eef (patch) | |
tree | fd241febb3ec15c8703f59647094e6798a29f62b | |
parent | db904dd32c6a654b1da96fecc3ad7302e9cae3c6 (diff) | |
parent | 704fc1a8ccffd8abc43ea126d4310b34c0e95bf2 (diff) |
Merge changes I6c715612,If84ff928
* changes:
libbinder: RPC server setup debug logs
libbinder: stop exporting private headers
-rw-r--r-- | libs/binder/IPCThreadState.cpp | 3 | ||||
-rw-r--r-- | libs/binder/Parcel.cpp | 2 | ||||
-rw-r--r-- | libs/binder/ProcessState.cpp | 2 | ||||
-rw-r--r-- | libs/binder/RpcServer.cpp | 4 | ||||
-rw-r--r-- | libs/binder/binder_module.h (renamed from libs/binder/include/private/binder/binder_module.h) | 26 | ||||
-rw-r--r-- | libs/binder/tests/binderLibTest.cpp | 2 |
6 files changed, 21 insertions, 18 deletions
diff --git a/libs/binder/IPCThreadState.cpp b/libs/binder/IPCThreadState.cpp index 6fb1227f63..ef7fd44419 100644 --- a/libs/binder/IPCThreadState.cpp +++ b/libs/binder/IPCThreadState.cpp @@ -29,8 +29,6 @@ #include <utils/SystemClock.h> #include <utils/threads.h> -#include <private/binder/binder_module.h> - #include <atomic> #include <errno.h> #include <inttypes.h> @@ -43,6 +41,7 @@ #include <unistd.h> #include "Static.h" +#include "binder_module.h" #if LOG_NDEBUG diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp index 39d6a2ec4f..2e4f450bc1 100644 --- a/libs/binder/Parcel.cpp +++ b/libs/binder/Parcel.cpp @@ -48,10 +48,10 @@ #include <utils/String8.h> #include <utils/misc.h> -#include <private/binder/binder_module.h> #include "RpcState.h" #include "Static.h" #include "Utils.h" +#include "binder_module.h" #define LOG_REFS(...) //#define LOG_REFS(...) ALOG(LOG_DEBUG, LOG_TAG, __VA_ARGS__) diff --git a/libs/binder/ProcessState.cpp b/libs/binder/ProcessState.cpp index a2efb1c95f..f7ca1e68cb 100644 --- a/libs/binder/ProcessState.cpp +++ b/libs/binder/ProcessState.cpp @@ -27,8 +27,8 @@ #include <utils/String8.h> #include <utils/threads.h> -#include <private/binder/binder_module.h> #include "Static.h" +#include "binder_module.h" #include <errno.h> #include <fcntl.h> diff --git a/libs/binder/RpcServer.cpp b/libs/binder/RpcServer.cpp index 4df12ce2c6..de7160ee08 100644 --- a/libs/binder/RpcServer.cpp +++ b/libs/binder/RpcServer.cpp @@ -184,6 +184,8 @@ std::vector<sp<RpcConnection>> RpcServer::listConnections() { } bool RpcServer::setupSocketServer(const RpcSocketAddress& addr) { + LOG_RPC_DETAIL("Setting up socket server %s", addr.toString().c_str()); + { std::lock_guard<std::mutex> _l(mLock); LOG_ALWAYS_FATAL_IF(mServer.get() != -1, "Each RpcServer can only have one server."); @@ -208,6 +210,8 @@ bool RpcServer::setupSocketServer(const RpcSocketAddress& addr) { return false; } + LOG_RPC_DETAIL("Successfully setup socket server %s", addr.toString().c_str()); + mServer = std::move(serverFd); return true; } diff --git a/libs/binder/include/private/binder/binder_module.h b/libs/binder/binder_module.h index 151235c16b..9dea3b448b 100644 --- a/libs/binder/include/private/binder/binder_module.h +++ b/libs/binder/binder_module.h @@ -29,14 +29,14 @@ #undef B_PACK_CHARS #endif -#include <sys/ioctl.h> #include <linux/android/binder.h> +#include <sys/ioctl.h> #ifndef BR_FROZEN_REPLY // Temporary definition of BR_FROZEN_REPLY. For production // this will come from UAPI binder.h #define BR_FROZEN_REPLY _IO('r', 18) -#endif //BR_FROZEN_REPLY +#endif // BR_FROZEN_REPLY #ifndef BINDER_FREEZE /* @@ -49,46 +49,46 @@ struct binder_freeze_info { // // Group-leader PID of process to be frozen // - uint32_t pid; + uint32_t pid; // // Enable(1) / Disable(0) freeze for given PID // - uint32_t enable; + uint32_t enable; // // Timeout to wait for transactions to drain. // 0: don't wait (ioctl will return EAGAIN if not drained) // N: number of ms to wait - uint32_t timeout_ms; + uint32_t timeout_ms; }; -#endif //BINDER_FREEZE +#endif // BINDER_FREEZE #ifndef BINDER_GET_FROZEN_INFO -#define BINDER_GET_FROZEN_INFO _IOWR('b', 15, struct binder_frozen_status_info) +#define BINDER_GET_FROZEN_INFO _IOWR('b', 15, struct binder_frozen_status_info) struct binder_frozen_status_info { // // Group-leader PID of process to be queried // - __u32 pid; + __u32 pid; // // Indicates whether the process has received any sync calls since last // freeze (cleared at freeze/unfreeze) // - __u32 sync_recv; + __u32 sync_recv; // // Indicates whether the process has received any async calls since last // freeze (cleared at freeze/unfreeze) // - __u32 async_recv; + __u32 async_recv; }; -#endif //BINDER_GET_FROZEN_INFO +#endif // BINDER_GET_FROZEN_INFO #ifndef BR_ONEWAY_SPAM_SUSPECT // Temporary definition of BR_ONEWAY_SPAM_SUSPECT. For production // this will come from UAPI binder.h #define BR_ONEWAY_SPAM_SUSPECT _IO('r', 19) -#endif //BR_ONEWAY_SPAM_SUSPECT +#endif // BR_ONEWAY_SPAM_SUSPECT #ifndef BINDER_ENABLE_ONEWAY_SPAM_DETECTION /* @@ -96,6 +96,6 @@ struct binder_frozen_status_info { * these will be defined in the UAPI binder.h file from upstream kernel. */ #define BINDER_ENABLE_ONEWAY_SPAM_DETECTION _IOW('b', 16, __u32) -#endif //BINDER_ENABLE_ONEWAY_SPAM_DETECTION +#endif // BINDER_ENABLE_ONEWAY_SPAM_DETECTION #endif // _BINDER_MODULE_H_ diff --git a/libs/binder/tests/binderLibTest.cpp b/libs/binder/tests/binderLibTest.cpp index dc8c0f157e..5676bd1939 100644 --- a/libs/binder/tests/binderLibTest.cpp +++ b/libs/binder/tests/binderLibTest.cpp @@ -31,11 +31,11 @@ #include <binder/IServiceManager.h> #include <binder/ParcelRef.h> -#include <private/binder/binder_module.h> #include <linux/sched.h> #include <sys/epoll.h> #include <sys/prctl.h> +#include "../binder_module.h" #include "binderAbiHelper.h" #define ARRAY_SIZE(array) (sizeof array / sizeof array[0]) |