summaryrefslogtreecommitdiff
path: root/cmds/lshal/ListCommand.h
diff options
context:
space:
mode:
Diffstat (limited to 'cmds/lshal/ListCommand.h')
-rw-r--r--cmds/lshal/ListCommand.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/cmds/lshal/ListCommand.h b/cmds/lshal/ListCommand.h
index 561f9cbc19..acc0dcfc2e 100644
--- a/cmds/lshal/ListCommand.h
+++ b/cmds/lshal/ListCommand.h
@@ -25,7 +25,6 @@
#include <android-base/macros.h>
#include <android/hidl/manager/1.0/IServiceManager.h>
-#include <binderdebug/BinderDebug.h>
#include <hidl-util/FqInstance.h>
#include <vintf/HalManifest.h>
#include <vintf/VintfObject.h>
@@ -41,15 +40,18 @@ namespace lshal {
class Lshal;
+struct PidInfo {
+ std::map<uint64_t, Pids> refPids; // pids that are referenced
+ uint32_t threadUsage; // number of threads in use
+ uint32_t threadCount; // number of threads total
+};
+
enum class HalType {
BINDERIZED_SERVICES = 0,
PASSTHROUGH_CLIENTS,
PASSTHROUGH_LIBRARIES,
VINTF_MANIFEST,
LAZY_HALS,
-
- // Not a real HalType. Used to determine all HalTypes.
- LAST,
};
class ListCommand : public Command {
@@ -105,9 +107,9 @@ protected:
// Get relevant information for a PID by parsing files under
// /dev/binderfs/binder_logs or /d/binder.
// It is a virtual member function so that it can be mocked.
- virtual bool getPidInfo(pid_t serverPid, BinderPidInfo *info) const;
+ virtual bool getPidInfo(pid_t serverPid, PidInfo *info) const;
// Retrieve from mCachedPidInfos and call getPidInfo if necessary.
- const BinderPidInfo* getPidInfoCached(pid_t serverPid);
+ const PidInfo* getPidInfoCached(pid_t serverPid);
void dumpTable(const NullableOStream<std::ostream>& out) const;
void dumpVintf(const NullableOStream<std::ostream>& out) const;
@@ -186,7 +188,7 @@ protected:
std::map<pid_t, std::string> mCmdlines;
// Cache for getPidInfo.
- std::map<pid_t, BinderPidInfo> mCachedPidInfos;
+ std::map<pid_t, PidInfo> mCachedPidInfos;
// Cache for getPartition.
std::map<pid_t, Partition> mPartitions;