From f09611f2f33752afc28141e1bbaa897651c05d6f Mon Sep 17 00:00:00 2001 From: Marco Nelissen Date: Fri, 13 Feb 2015 14:12:42 -0800 Subject: Add dumpsys info Print a list of looper-handler pairs and the number of messages they've processed, and optionally break those stats out by message type. Change-Id: I68ce4a7003152d5c9b5cb3f42e6f3949b471aa6e --- include/media/stagefright/foundation/AHandler.h | 7 ++++++- include/media/stagefright/foundation/ALooperRoster.h | 3 +++ 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/media/stagefright/foundation/AHandler.h b/include/media/stagefright/foundation/AHandler.h index b008b54..41ade77 100644 --- a/include/media/stagefright/foundation/AHandler.h +++ b/include/media/stagefright/foundation/AHandler.h @@ -19,6 +19,7 @@ #define A_HANDLER_H_ #include +#include #include namespace android { @@ -27,7 +28,8 @@ struct AMessage; struct AHandler : public RefBase { AHandler() - : mID(0) { + : mID(0), + mMessageCounter(0) { } ALooper::handler_id id() const { @@ -48,6 +50,9 @@ private: mID = id; } + uint32_t mMessageCounter; + KeyedVector mMessages; + DISALLOW_EVIL_CONSTRUCTORS(AHandler); }; diff --git a/include/media/stagefright/foundation/ALooperRoster.h b/include/media/stagefright/foundation/ALooperRoster.h index 4d76b64..a0be8eb 100644 --- a/include/media/stagefright/foundation/ALooperRoster.h +++ b/include/media/stagefright/foundation/ALooperRoster.h @@ -20,6 +20,7 @@ #include #include +#include namespace android { @@ -42,6 +43,8 @@ struct ALooperRoster { sp findLooper(ALooper::handler_id handlerID); + void dump(int fd, const Vector& args); + private: struct HandlerInfo { wp mLooper; -- cgit v1.1