Lines Matching defs:watchPoint
66 std::list<WatchPoint>::iterator watchPoint;
67 for (watchPoint = list.begin(); watchPoint != list.end();) {
68 if (freezeCommon_->IsSystemEvent(watchPoint->GetDomain(), watchPoint->GetStringId())) {
69 watchPoint++;
71 watchPoint = list.erase(watchPoint);
78 std::list<WatchPoint>::iterator watchPoint;
79 for (watchPoint = list.begin(); watchPoint != list.end();) {
80 if (freezeCommon_->IsApplicationEvent(watchPoint->GetDomain(), watchPoint->GetStringId())) {
81 watchPoint++;
83 watchPoint = list.erase(watchPoint);
90 std::list<WatchPoint>::iterator watchPoint;
91 for (watchPoint = list.begin(); watchPoint != list.end();) {
92 if (freezeCommon_->IsSysWarningEvent(watchPoint->GetDomain(), watchPoint->GetStringId())) {
93 watchPoint++;
95 watchPoint = list.erase(watchPoint);
117 std::string Vendor::SendFaultLog(const WatchPoint &watchPoint, const std::string& logPath,
123 std::string packageName = StringUtil::TrimStr(watchPoint.GetPackageName());
124 std::string processName = StringUtil::TrimStr(watchPoint.GetProcessName());
125 std::string stringId = watchPoint.GetStringId();
134 info.time = watchPoint.GetTimestamp();
135 info.id = watchPoint.GetUid();
136 info.pid = watchPoint.GetPid();
143 " at " + GetTimeString(watchPoint.GetTimestamp()) + "\n";
146 info.sectionMaps[FreezeCommon::HIREACE_TIME] = watchPoint.GetHitraceTime();
147 info.sectionMaps[FreezeCommon::SYSRQ_TIME] = watchPoint.GetSysrqTime();
148 info.sectionMaps[FORE_GROUND] = watchPoint.GetForeGround();
153 void Vendor::DumpEventInfo(std::ostringstream& oss, const std::string& header, const WatchPoint& watchPoint) const
155 uint64_t timestamp = watchPoint.GetTimestamp() / TimeUtil::SEC_TO_MILLISEC;
157 oss << std::string(EVENT_DOMAIN) << std::string(COLON) << watchPoint.GetDomain() << std::endl;
158 oss << std::string(EVENT_STRINGID) << std::string(COLON) << watchPoint.GetStringId() << std::endl;
161 ":" << watchPoint.GetTimestamp() % TimeUtil::SEC_TO_MILLISEC << std::endl;
162 oss << FreezeCommon::EVENT_PID << std::string(COLON) << watchPoint.GetPid() << std::endl;
163 oss << FreezeCommon::EVENT_UID << std::string(COLON) << watchPoint.GetUid() << std::endl;
164 oss << FreezeCommon::EVENT_PACKAGE_NAME << std::string(COLON) << watchPoint.GetPackageName() << std::endl;
165 oss << FreezeCommon::EVENT_PROCESS_NAME << std::string(COLON) << watchPoint.GetProcessName() << std::endl;
168 void Vendor::MergeFreezeJsonFile(const WatchPoint &watchPoint, const std::vector<WatchPoint>& list) const
188 std::string mergeFilePath = FreezeJsonUtil::GetFilePath(watchPoint.GetPid(),
189 watchPoint.GetUid(), watchPoint.GetTimestamp());
199 FreezeJsonUtil::WriteKeyValue(jsonFd, "domain", watchPoint.GetDomain());
200 FreezeJsonUtil::WriteKeyValue(jsonFd, "stringId", watchPoint.GetStringId());
201 FreezeJsonUtil::WriteKeyValue(jsonFd, "timestamp", watchPoint.GetTimestamp());
202 FreezeJsonUtil::WriteKeyValue(jsonFd, "pid", watchPoint.GetPid());
203 FreezeJsonUtil::WriteKeyValue(jsonFd, "uid", watchPoint.GetUid());
204 FreezeJsonUtil::WriteKeyValue(jsonFd, "package_name", watchPoint.GetPackageName());
205 FreezeJsonUtil::WriteKeyValue(jsonFd, "process_name", watchPoint.GetProcessName());
221 void Vendor::InitLogInfo(const WatchPoint& watchPoint, std::string& type, std::string& retPath,
224 std::string stringId = watchPoint.GetStringId();
225 std::string timestamp = GetTimeString(watchPoint.GetTimestamp());
226 long uid = watchPoint.GetUid();
227 std::string packageName = StringUtil::TrimStr(watchPoint.GetPackageName());
228 std::string processName = StringUtil::TrimStr(watchPoint.GetProcessName());
235 type = freezeCommon_->IsApplicationEvent(watchPoint.GetDomain(), watchPoint.GetStringId()) ? APPFREEZE :
236 (freezeCommon_->IsSystemEvent(watchPoint.GetDomain(), watchPoint.GetStringId()) ? SYSFREEZE : SYSWARNING);
284 const WatchPoint &watchPoint, const std::vector<WatchPoint>& list,
295 InitLogInfo(watchPoint, type, retPath, tmpLogPath, tmpLogName);
303 DumpEventInfo(header, TRIGGER_HEADER, watchPoint);
316 MergeFreezeJsonFile(watchPoint, list);
328 return SendFaultLog(watchPoint, tmpLogPath, type);