Home
last modified time | relevance | path

Searched refs:sysEvent (Results 1 – 25 of 46) sorted by relevance

12

/base/hiviewdfx/hiview/plugins/reliability/bbox_detectors/
Dbbox_detector_plugin.cpp59 auto sysEvent = Event::DownCastTo<SysEvent>(event); in OnEvent() local
60 HandleBBoxEvent(sysEvent); in OnEvent()
70 auto sysEvent = Event::DownCastTo<SysEvent>(event); in IsInterestedPipelineEvent() local
71 auto subEventType = sysEvent->GetEventValue("name_"); in IsInterestedPipelineEvent()
89 void BBoxDetectorPlugin::HandleBBoxEvent(std::shared_ptr<SysEvent> &sysEvent) in HandleBBoxEvent() argument
91 std::string event = sysEvent->GetEventValue("REASON"); in HandleBBoxEvent()
92 std::string module = sysEvent->GetEventValue("MODULE"); in HandleBBoxEvent()
93 std::string timeStr = sysEvent->GetEventValue("SUB_LOG_PATH"); in HandleBBoxEvent()
94 std::string LOG_PATH = sysEvent->GetEventValue("LOG_PATH"); in HandleBBoxEvent()
99 sysEvent->SetEventValue("HAPPEN_TIME", times); in HandleBBoxEvent()
[all …]
/base/hiviewdfx/hiview/plugins/freeze_detector/test/unittest/common/
Dfreeze_detector_test.cpp51 auto sysEvent = std::make_shared<SysEvent>(name, nullptr, jsonStr); in makeEvent() local
52 sysEvent->SetEventValue("name_", eventName); in makeEvent()
53 sysEvent->SetEventValue("type_", 1); in makeEvent()
54 sysEvent->SetEventValue("time_", time); in makeEvent()
55 sysEvent->SetEventValue("pid_", getpid()); in makeEvent()
56 sysEvent->SetEventValue("tid_", gettid()); in makeEvent()
57 sysEvent->SetEventValue("uid_", getuid()); in makeEvent()
58 sysEvent->SetEventValue("tz_", TimeUtil::GetTimeZone()); in makeEvent()
59 sysEvent->SetEventValue("PID", getpid()); in makeEvent()
60 sysEvent->SetEventValue("UID", getuid()); in makeEvent()
[all …]
/base/hiviewdfx/hiview/plugins/reliability/bbox_detectors/test/moduletest/
Dbbox_detector_module_test.cpp62 auto sysEvent = make_shared<SysEvent>("test", nullptr, sysEventCreator); variable
64 shared_ptr<Event> event = dynamic_pointer_cast<Event>(sysEvent);
67 ASSERT_EQ(sysEvent->GetEventValue("MODULE"), "AP");
68 ASSERT_EQ(sysEvent->GetEventValue("REASON"), "AP_S_PANIC");
69 ASSERT_EQ(sysEvent->GetEventValue("LOG_PATH"), "/data/hisi_logs/19700106031950-00001111");
97 auto sysEvent = make_shared<SysEvent>("test", nullptr, sysEventCreator); variable
99 shared_ptr<Event> event = dynamic_pointer_cast<Event>(sysEvent);
102 ASSERT_EQ(sysEvent->GetEventValue("MODULE"), "AP");
103 ASSERT_EQ(sysEvent->GetEventValue("REASON"), "AP_S_HWWATCHDOG");
104 ASSERT_EQ(sysEvent->GetEventValue("LOG_PATH"), "/data/hisi_logs/19700106031950-00001111");
[all …]
/base/hiviewdfx/hiview/plugins/hicollie_collector/test/unittest/common/
Dhicollie_collector_test.cpp49 auto sysEvent = std::make_shared<SysEvent>(name, nullptr, jsonStr); in makeEvent() local
50 sysEvent->SetEventValue("name_", eventName); in makeEvent()
51 sysEvent->SetEventValue("type_", 1); in makeEvent()
52 sysEvent->SetEventValue("time_", time); in makeEvent()
53 sysEvent->SetEventValue("pid_", getpid()); in makeEvent()
54 sysEvent->SetEventValue("tid_", gettid()); in makeEvent()
55 sysEvent->SetEventValue("uid_", getuid()); in makeEvent()
56 sysEvent->SetEventValue("tz_", TimeUtil::GetTimeZone()); in makeEvent()
57 sysEvent->SetEventValue("PID", getpid()); in makeEvent()
58 sysEvent->SetEventValue("UID", getuid()); in makeEvent()
[all …]
/base/hiviewdfx/hiview/plugins/hicollie_collector/
Dplugin.cpp86 SysEvent& sysEvent = static_cast<SysEvent&>(eventRef); in OnUnorderedEvent() local
87 ProcessHiCollieEvent(sysEvent); in OnUnorderedEvent()
140 void HiCollieCollector::SaveToFile(SysEvent &sysEvent, int32_t pid, const std::string& processName, in SaveToFile() argument
143 std::string moduleName = StringUtil::TrimStr(sysEvent.GetEventValue("MODULE_NAME")); in SaveToFile()
148 desText << "SUMMARY:" << sysEvent.GetEventValue("MSG") << std::endl; in SaveToFile()
156 if (sysEvent.eventName_ == STRINGID_SERVICE_BLOCK) { in SaveToFile()
173 void HiCollieCollector::ProcessHiCollieEvent(SysEvent &sysEvent) in ProcessHiCollieEvent() argument
176 int32_t pid = static_cast<int32_t>(sysEvent.GetEventIntValue("PID")); in ProcessHiCollieEvent()
177 pid = pid ? pid : sysEvent.GetPid(); in ProcessHiCollieEvent()
178 int32_t uid = sysEvent.GetEventIntValue("UID"); in ProcessHiCollieEvent()
[all …]
Dplugin.h45 void ProcessHiCollieEvent(SysEvent &sysEvent);
49 void SaveToFile(SysEvent &sysEvent, int32_t pid, const std::string& processName,
52 …void ReportSysFreezeIfNeed(SysEvent &sysEvent, const std::string& timestamp, const std::string& pr…
/base/hiviewdfx/hiview/plugins/eventlogger/
Devent_logger.cpp52 auto sysEvent = Event::DownCastTo<SysEvent>(event); in IsInterestedPipelineEvent() local
53 if (eventLoggerConfig_.find(sysEvent->eventName_) == eventLoggerConfig_.end()) { in IsInterestedPipelineEvent()
57 sysEvent->jsonExtraInfo_.c_str()); in IsInterestedPipelineEvent()
59 long pid = sysEvent->GetEventIntValue("PID"); in IsInterestedPipelineEvent()
60 pid = pid ? pid : sysEvent->GetPid(); in IsInterestedPipelineEvent()
64 sysEvent->eventName_.c_str(), pid, errno, strerror(errno)); in IsInterestedPipelineEvent()
68 EventLoggerConfig::EventLoggerConfigData& configOut = eventLoggerConfig_[sysEvent->eventName_]; in IsInterestedPipelineEvent()
69 sysEvent->eventName_ = configOut.name; in IsInterestedPipelineEvent()
70 sysEvent->SetValue("eventLog_action", configOut.action); in IsInterestedPipelineEvent()
71 sysEvent->SetValue("eventLog_interval", configOut.interval); in IsInterestedPipelineEvent()
[all …]
/base/hiviewdfx/hiview/plugins/eventservice/
Dsys_event_service.cpp84 std::shared_ptr<SysEvent> sysEvent = Event::DownCastTo<SysEvent>(event); in Convert2SysEvent() local
85 if (sysEvent == nullptr) { in Convert2SysEvent()
88 return sysEvent; in Convert2SysEvent()
97 std::shared_ptr<SysEvent> sysEvent = Convert2SysEvent(event); in OnEvent() local
98 if (sysEvent == nullptr) { in OnEvent()
103 if (!sysEventParser_->HandleEventJson(sysEvent)) { in OnEvent()
105 sysEventStat_->AccumulateEvent(sysEvent->domain_, sysEvent->eventName_, false); in OnEvent()
108 sysEventStat_->AccumulateEvent(sysEvent->domain_, sysEvent->eventName_); in OnEvent()
110 SysEventServiceAdapter::OnSysEvent(sysEvent); in OnEvent()
111 sysEventDbMgr_->SaveToStore(sysEvent); in OnEvent()
/base/hiviewdfx/hiview/base/test/unittest/common/
Dsys_event_test.cpp56 … std::shared_ptr<SysEvent> sysEvent = std::make_shared<SysEvent>("test", nullptr, sysEventCreator); variable
58 …std::cout << "size=" << sysEvent->jsonExtraInfo_.size() << ", jsonStr:" << sysEvent->jsonExtraInfo…
60 bool isMatch = std::regex_match(sysEvent->jsonExtraInfo_, baseMatch, expValue);
79 … std::shared_ptr<SysEvent> sysEvent = std::make_shared<SysEvent>("test", nullptr, sysEventCreator); variable
81 …std::cout << "size=" << sysEvent->jsonExtraInfo_.size() << ", jsonStr:" << sysEvent->jsonExtraInfo…
83 bool isMatch = std::regex_match(sysEvent->jsonExtraInfo_, baseMatch, expValue);
/base/hiviewdfx/hisysevent/frameworks/native/
Dhisysevent_tool_listener.cpp29 void HiSysEventToolListener::OnEvent(std::shared_ptr<HiSysEventRecord> sysEvent) in OnEvent() argument
31 if (sysEvent == nullptr) { in OnEvent()
35 std::cout << eventJsonDecorator->DecorateEventJsonStr(*sysEvent) << std::endl; in OnEvent()
38 std::cout << sysEvent->AsJson() << std::endl; in OnEvent()
/base/hiviewdfx/hiview/base/event_store/
Dsys_event_dao.cpp48 int SysEventDao::Insert(std::shared_ptr<SysEvent> sysEvent) in Insert() argument
50 std::string dbFile = GetDataFile(static_cast<StoreType>(sysEvent->what_)); in Insert()
52 HIVIEW_LOGE("failed to get db file by eventType=%{public}d", sysEvent->what_); in Insert()
56 …HIVIEW_LOGD("insert db file %{public}s with %{public}s", dbFile.c_str(), sysEvent->eventName_.c_st… in Insert()
59 entry.value = sysEvent->jsonExtraInfo_; in Insert()
62 HIVIEW_LOGE("insert error for event %{public}s", sysEvent->eventName_.c_str()); in Insert()
65 sysEvent->SetSeq(entry.id); in Insert()
69 int SysEventDao::Update(std::shared_ptr<SysEvent> sysEvent, bool isNotifyChange) in Update() argument
71 std::string dbFile = GetDataFile(static_cast<StoreType>(sysEvent->what_)); in Update()
73 HIVIEW_LOGE("failed to get db file by eventType=%{public}d", sysEvent->what_); in Update()
[all …]
/base/hiviewdfx/hiview/plugins/faultlogger/service/
Dfaultlogger.cpp299 auto sysEvent = std::static_pointer_cast<SysEvent>(event); in JudgmentRateLimiting() local
300 long pid = sysEvent->GetPid(); in JudgmentRateLimiting()
317 sysEvent->eventId_, sysEvent->eventName_.c_str(), eventPid.c_str(), interval); in JudgmentRateLimiting()
324 sysEvent->eventId_, sysEvent->eventName_.c_str(), eventPid.c_str(), interval); in JudgmentRateLimiting()
355 auto sysEvent = std::static_pointer_cast<SysEvent>(event); in OnEvent() local
356 info.time = sysEvent->happenTime_; in OnEvent()
357 info.id = sysEvent->GetUid(); in OnEvent()
358 info.pid = sysEvent->GetPid(); in OnEvent()
360 info.module = sysEvent->GetEventValue("PACKAGE_NAME"); in OnEvent()
361 info.reason = sysEvent->GetEventValue("REASON"); in OnEvent()
[all …]
Dfaultlog_database.cpp44 auto sysEvent = std::make_unique<SysEvent>("FaultLogDatabase", nullptr, jsonStr); in ParseFaultLogInfoFromJson() local
46 if (sysEvent->ParseJson() < 0) { in ParseFaultLogInfoFromJson()
50 info.time = static_cast<int64_t>(std::atoll(sysEvent->GetEventValue("HAPPEN_TIME").c_str())); in ParseFaultLogInfoFromJson()
52 info.time = sysEvent->GetEventIntValue("HAPPEN_TIME"); in ParseFaultLogInfoFromJson()
54 info.pid = sysEvent->GetEventIntValue("PID"); in ParseFaultLogInfoFromJson()
56 info.pid = sysEvent->GetEventIntValue("pid_"); in ParseFaultLogInfoFromJson()
58 info.id = sysEvent->GetEventIntValue("UID"); in ParseFaultLogInfoFromJson()
60 info.id = sysEvent->GetEventIntValue("uid_"); in ParseFaultLogInfoFromJson()
62 info.faultLogType = std::atoi(sysEvent->GetEventValue("FAULT_TYPE").c_str()); in ParseFaultLogInfoFromJson()
63 info.module = sysEvent->GetEventValue("MODULE"); in ParseFaultLogInfoFromJson()
[all …]
/base/hiviewdfx/hiview/base/event_store/test/unittest/common/
Dsys_event_dao_test.cpp78 auto sysEvent = std::make_shared<SysEvent>("SysEventSource", nullptr, jsonStr); variable
79 ASSERT_TRUE(sysEvent->ParseJson() == 0);
80 int retCode = EventStore::SysEventDao::Insert(sysEvent);
159 auto sysEvent = std::make_shared<SysEvent>("SysEventSource", nullptr, jsonStr); variable
160 ASSERT_TRUE(sysEvent->ParseJson() == 0);
161 int retCode = EventStore::SysEventDao::Insert(sysEvent);
171 ASSERT_TRUE(it->GetSeq() == sysEvent->GetSeq());
278 auto sysEvent = std::make_shared<SysEvent>("SysEventSource", nullptr, jsonStr); variable
279 ASSERT_TRUE(sysEvent->ParseJson() == 0);
281 int retCode = EventStore::SysEventDao::Insert(sysEvent);
[all …]
/base/hiviewdfx/hiview/plugins/freeze_detector/
Dfreeze_detector_plugin.cpp102 SysEvent& sysEvent = static_cast<SysEvent&>(eventRef); in MakeWatchPoint() local
104 long seq = sysEvent.GetSeq(); in MakeWatchPoint()
105 long tid = sysEvent.GetTid(); in MakeWatchPoint()
106 long pid = sysEvent.GetEventIntValue(FreezeCommon::EVENT_PID); in MakeWatchPoint()
107 pid = pid ? pid : sysEvent.GetPid(); in MakeWatchPoint()
108 long uid = sysEvent.GetEventIntValue(FreezeCommon::EVENT_UID); in MakeWatchPoint()
109 uid = uid ? uid : sysEvent.GetUid(); in MakeWatchPoint()
110 std::string packageName = sysEvent.GetEventValue(FreezeCommon::EVENT_PACKAGE_NAME); in MakeWatchPoint()
111 std::string processName = sysEvent.GetEventValue(FreezeCommon::EVENT_PROCESS_NAME); in MakeWatchPoint()
112 std::string msg = RemoveRedundantNewline(sysEvent.GetEventValue(FreezeCommon::EVENT_MSG)); in MakeWatchPoint()
[all …]
/base/hiviewdfx/hiview/plugins/faultlogger/crash_validator/
Dcrash_validator.cpp133 SysEvent& sysEvent = static_cast<SysEvent&>(eventRef); in OnUnorderedEvent() local
135 HandleCppCrashEvent(sysEvent); in OnUnorderedEvent()
137 HandleProcessExitEvent(sysEvent); in OnUnorderedEvent()
156 void CrashValidator::HandleCppCrashEvent(SysEvent& sysEvent) in HandleCppCrashEvent() argument
160 crashEvent.time = sysEvent.happenTime_; in HandleCppCrashEvent()
161 crashEvent.uid = sysEvent.GetEventIntValue(KEY_UID); in HandleCppCrashEvent()
162 crashEvent.pid = sysEvent.GetEventIntValue(KEY_PID); in HandleCppCrashEvent()
163 crashEvent.path = sysEvent.GetEventValue(KEY_LOG_PATH); in HandleCppCrashEvent()
164 crashEvent.name = sysEvent.GetEventValue(KEY_MODULE); in HandleCppCrashEvent()
171 void CrashValidator::HandleProcessExitEvent(SysEvent& sysEvent) in HandleProcessExitEvent() argument
[all …]
Dcrash_validator.h56 void HandleCppCrashEvent(SysEvent& sysEvent);
57 void HandleProcessExitEvent(SysEvent& sysEvent);
/base/hiviewdfx/hiview/adapter/plugins/eventservice/service/idl/src/
Dquery_sys_event_callback_stub.cpp37 std::vector<std::u16string> sysEvent; in OnRemoteRequest() local
38 ret = AshMemUtils::ReadBulkData(data, sysEvent); in OnRemoteRequest()
49 OnQuery(sysEvent, seq); in OnRemoteRequest()
/base/hiviewdfx/hisysevent/adapter/native/idl/src/
Dquery_sys_event_callback_stub.cpp43 std::vector<std::u16string> sysEvent; in OnRemoteRequest() local
44 ret = AshMemUtils::ReadBulkData(data, sysEvent); in OnRemoteRequest()
55 OnQuery(sysEvent, seq); in OnRemoteRequest()
Dhisysevent_query_proxy.cpp27 … for_each(sysEvents.cbegin(), sysEvents.cend(), [&destSysEvents](const std::u16string& sysEvent) { in OnQuery() argument
28 destSysEvents.emplace_back(Str16ToStr8(sysEvent)); in OnQuery()
/base/hiviewdfx/hiview/core/
Dplatform_monitor.cpp242 std::shared_ptr<SysEvent> sysEvent = std::make_shared<SysEvent>("", nullptr, eventCreator); in CreateProfileReport() local
243 return sysEvent; in CreateProfileReport()
268 std::shared_ptr<SysEvent> sysEvent = CreateProfileReport(perfMeasure); in ReportCycleProfile() local
269 HIVIEW_LOGI("report=%{public}s", sysEvent->jsonExtraInfo_.c_str()); in ReportCycleProfile()
270 HiviewGlobal::GetInstance()->PostSyncEventToTarget(EVENT_SERVICE_PLUGIN, sysEvent); in ReportCycleProfile()
366 std::shared_ptr<SysEvent> sysEvent = std::make_shared<SysEvent>("", nullptr, eventCreator); in ReportBreakProfile() local
367 HIVIEW_LOGI("report=%{public}s", sysEvent->jsonExtraInfo_.c_str()); in ReportBreakProfile()
368 HiviewGlobal::GetInstance()->PostSyncEventToTarget(EVENT_SERVICE_PLUGIN, sysEvent); in ReportBreakProfile()
377 std::shared_ptr<SysEvent> sysEvent = std::make_shared<SysEvent>("", nullptr, eventCreator); in ReportRecoverProfile() local
378 HIVIEW_LOGI("report=%{public}s", sysEvent->jsonExtraInfo_.c_str()); in ReportRecoverProfile()
[all …]
/base/hiviewdfx/hisysevent/interfaces/native/innerkits/hisysevent_manager/include/
Dhisysevent_base_listener.h39 … std::shared_ptr<HiSysEventRecord> sysEvent = std::make_shared<HiSysEventRecord>(eventDetail); in OnEvent() local
40 listener->OnEvent(sysEvent); in OnEvent()
/base/hiviewdfx/hiview/base/event_store/include/
Dsys_event_dao.h41 static int Insert(std::shared_ptr<SysEvent> sysEvent);
43 static int Update(std::shared_ptr<SysEvent> sysEvent, bool isNotifyChange = true);
/base/hiviewdfx/hiview/plugins/reliability/bbox_detectors/test/unittest/
Dbbox_detector_unit_test.cpp54 auto sysEvent = make_shared<SysEvent>("test", nullptr, sysEventCreator); variable
56 shared_ptr<Event> event = dynamic_pointer_cast<Event>(sysEvent);
/base/hiviewdfx/hiview/plugins/eventservice/test/unittest/common/
Devent_service_action_test.cpp66 auto sysEvent = std::make_shared<SysEvent>("SysEventService", nullptr, JSON_STR); variable
71 ASSERT_TRUE(sysEventParser->HandleEventJson(sysEvent));
167 auto sysEvent = std::make_shared<SysEvent>("SysEventSource", nullptr, jsonStr1); variable
168 ASSERT_TRUE(sysEvent->ParseJson() == 0);
169 sysEventDbMgrPtr->SaveToStore(sysEvent);

12