Lines Matching refs:fd
36 #define CHECK_SIZE(container, len, fd, actionIfFailed) \ argument
39 dprintf(fd, "size error\n"); \
50 void ShowHelpInfo(const int fd) in ShowHelpInfo() argument
52 dprintf(fd, "Usage:\n"); in ShowHelpInfo()
53 dprintf(fd, "-h |help for memmgrservice dumper\n"); in ShowHelpInfo()
54 dprintf(fd, "-a |dump all info\n"); in ShowHelpInfo()
55 dprintf(fd, "-e |dump event observer\n"); in ShowHelpInfo()
56 dprintf(fd, "-r |dump reclaim info and adj\n"); in ShowHelpInfo()
57 dprintf(fd, "-c |dump config\n"); in ShowHelpInfo()
58 dprintf(fd, "-m |show malloc state\n"); in ShowHelpInfo()
60 … dprintf(fd, "-s |show subscriber all the pid which can be reclaimed\n"); in ShowHelpInfo()
61 dprintf(fd, "-d {pid} {uid} {state} |trigger appstate changed\n\n"); in ShowHelpInfo()
62 dprintf(fd, "-t trigger memory onTrim:\n" in ShowHelpInfo()
67 dprintf(fd, "-f trigger purgeable memory Reclaim:\n" in ShowHelpInfo()
79 void PrintOntrimError(const int fd) in PrintOntrimError() argument
81 dprintf(fd, "\n error: unrecognized memory level, please input correct format as follows:\n" in PrintOntrimError()
88 void PrintReclaimError(const int fd) in PrintReclaimError() argument
90 dprintf(fd, "\n error: trigger force reclaim failed, please input correct info as follows:\n" in PrintReclaimError()
100 void DispatchTriggerMemLevel(const int fd, std::map<std::string, std::vector<std::string>> &keyValu… in DispatchTriggerMemLevel() argument
103 CHECK_SIZE(values, ONTRIM_LEVEL_PARAM_SIZE, fd, return); in DispatchTriggerMemLevel()
109 PrintOntrimError(fd); in DispatchTriggerMemLevel()
128 PrintOntrimError(fd); in DispatchTriggerMemLevel()
134 void ParseForceReclaimType(const int fd, std::map<std::string, std::vector<std::string>> &keyValues… in ParseForceReclaimType() argument
141 CHECK_SIZE(values, RECLAIM_TYPE_PARAM_SIZE, fd, return); in ParseForceReclaimType()
167 bool ParseForceReclaimId(const int fd, std::map<std::string, std::vector<std::string>> &keyValuesMa… in ParseForceReclaimId() argument
174 CHECK_SIZE(values, RECLAIM_HEAP_ID_PARAM_SIZE, fd, return false); // {userId} {size} in ParseForceReclaimId()
183 CHECK_SIZE(values, RECLAIM_ASHM_ID_PARAM_SIZE, fd, return false); // {ashmId} {time} in ParseForceReclaimId()
192 CHECK_SIZE(values, RECLAIM_SUBSCRIBER_ID_PARAM_SIZE, fd, return false); // {pid} in ParseForceReclaimId()
209 bool PurgeableMemoryDump(int fd, std::map<std::string, std::vector<std::string>> &keyValuesMapping) in PurgeableMemoryDump() argument
212 PurgeableMemManager::GetInstance().DumpSubscribers(fd); in PurgeableMemoryDump()
216 DispatchTriggerMemLevel(fd, keyValuesMapping); in PurgeableMemoryDump()
221 ParseForceReclaimType(fd, keyValuesMapping, dumpInfo); in PurgeableMemoryDump()
222 … if (HasCommand(keyValuesMapping, "-id") && !ParseForceReclaimId(fd, keyValuesMapping, dumpInfo)) { in PurgeableMemoryDump()
226 dprintf(fd, "trigger force reclaim success!\n"); in PurgeableMemoryDump()
228 PrintReclaimError(fd); in PurgeableMemoryDump()
235 dprintf(fd, "params number is less than %{publid}d!\n", APP_STATE_PARAM_SIZE); in PurgeableMemoryDump()
248 void DispatchDumpCommand(const int fd, std::map<std::string, std::vector<std::string>> &keyValuesMa… in DispatchDumpCommand() argument
251 ShowHelpInfo(fd); in DispatchDumpCommand()
255 MemMgrEventCenter::GetInstance().Dump(fd); in DispatchDumpCommand()
256 ReclaimPriorityManager::GetInstance().Dump(fd); in DispatchDumpCommand()
260 MemMgrEventCenter::GetInstance().Dump(fd); in DispatchDumpCommand()
264 ReclaimPriorityManager::GetInstance().Dump(fd); in DispatchDumpCommand()
268 MemmgrConfigManager::GetInstance().Dump(fd); in DispatchDumpCommand()
272 if (PurgeableMemoryDump(fd, keyValuesMapping)) { in DispatchDumpCommand()