/base/hiviewdfx/hisysevent/test/moduletest/common/ |
D | hisysevent_wrote_result_check_test.cpp | 65 void OnEvent(std::shared_ptr<HiSysEventRecord> sysEvent) final in OnEvent() argument 67 if (sysEvent == nullptr || assertFunc_ == nullptr) { in OnEvent() 70 ASSERT_TRUE(assertFunc_(sysEvent)); in OnEvent() 134 auto watcher = std::make_shared<Watcher>([val] (std::shared_ptr<HiSysEventRecord> sysEvent) { in __anonbf3b641a0202() argument 135 if (sysEvent == nullptr) { in __anonbf3b641a0202() 139 sysEvent->GetParamValue(PARAM_KEY, ret); in __anonbf3b641a0202() 155 auto watcher = std::make_shared<Watcher>([val] (std::shared_ptr<HiSysEventRecord> sysEvent) { in __anonbf3b641a0302() argument 156 if (sysEvent == nullptr) { in __anonbf3b641a0302() 160 sysEvent->GetParamValue(PARAM_KEY, ret); in __anonbf3b641a0302() 176 auto watcher = std::make_shared<Watcher>([val] (std::shared_ptr<HiSysEventRecord> sysEvent) { in __anonbf3b641a0402() argument [all …]
|
/base/hiviewdfx/hiview/plugins/sys_dispatcher/ |
D | sys_dispatcher.cpp | 45 void SysEventDispatcher::DispatchEvent(std::shared_ptr<SysEvent>& sysEvent) in DispatchEvent() argument 47 …auto dispatchList = GetHiviewContext()->GetDisPatcherInfo(sysEvent->eventType_, sysEvent->eventNam… in DispatchEvent() 48 sysEvent->GetTag(), sysEvent->domain_); in DispatchEvent() 52 ptr->OnEventListeningCallback(*sysEvent); in DispatchEvent() 67 std::shared_ptr<SysEvent> sysEvent = Event::DownCastTo<SysEvent>(event); in Convert2SysEvent() local 68 if (sysEvent == nullptr) { in Convert2SysEvent() 71 return sysEvent; in Convert2SysEvent() 76 auto sysEvent = Convert2SysEvent(event); in OnEvent() local 77 DispatchEvent(sysEvent); in OnEvent() 78 SysEventServiceAdapter::OnSysEvent(sysEvent); in OnEvent()
|
/base/hiviewdfx/hiview/plugins/reliability/bbox_detectors/ |
D | bbox_detector_plugin.cpp | 53 auto sysEvent = Event::DownCastTo<SysEvent>(event); in OnEvent() local 54 HandleBBoxEvent(sysEvent); in OnEvent() 66 void BBoxDetectorPlugin::HandleBBoxEvent(std::shared_ptr<SysEvent> &sysEvent) in HandleBBoxEvent() argument 68 std::string event = sysEvent->GetEventValue("REASON"); in HandleBBoxEvent() 69 std::string module = sysEvent->GetEventValue("MODULE"); in HandleBBoxEvent() 70 std::string timeStr = sysEvent->GetEventValue("SUB_LOG_PATH"); in HandleBBoxEvent() 71 std::string LOG_PATH = sysEvent->GetEventValue("LOG_PATH"); in HandleBBoxEvent() 76 sysEvent->SetEventValue("HAPPEN_TIME", times); in HandleBBoxEvent() 79 …auto eventInfos = SmartParser::Analysis(dynamicPaths, logParseConfig_, sysEvent->GetEventValue("na… in HandleBBoxEvent() 82 sysEvent->SetEventValue("FIRST_FRAME", eventInfos["FIRST_FRAME"].empty() ? "/" : in HandleBBoxEvent() [all …]
|
/base/hiviewdfx/hiview/plugins/reliability/bbox_detectors/test/moduletest/ |
D | bbox_detector_module_test.cpp | 62 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/freeze_detector/test/unittest/common/ |
D | freeze_detector_test.cpp | 51 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/sysevent_source/ |
D | sysevent_source.cpp | 123 std::shared_ptr<SysEvent> sysEvent = Convert2SysEvent(event); in CheckValidSysEvent() local 124 if (sysEvent == nullptr || sysEventParser_ == nullptr) { in CheckValidSysEvent() 128 if (!sysEventParser_->HandleEventJson(sysEvent)) { in CheckValidSysEvent() 130 sysEventStat_->AccumulateEvent(sysEvent->domain_, sysEvent->eventName_, false); in CheckValidSysEvent() 133 … sysEvent->SetTag(sysEventParser_->GetTagByDomainAndName(sysEvent->domain_, sysEvent->eventName_)); in CheckValidSysEvent() 134 …sysEvent->eventType_ = sysEventParser_->GetTypeByDomainAndName(sysEvent->domain_, sysEvent->eventN… in CheckValidSysEvent() 135 …sysEvent->preserve_ = sysEventParser_->GetPreserveByDomainAndName(sysEvent->domain_, sysEvent->eve… in CheckValidSysEvent() 150 std::shared_ptr<SysEvent> sysEvent = Event::DownCastTo<SysEvent>(event); in Convert2SysEvent() local 151 if (sysEvent == nullptr) { in Convert2SysEvent() 154 return sysEvent; in Convert2SysEvent()
|
/base/hiviewdfx/hiview/base/event_store/utility/writer/ |
D | sys_event_doc_writer.cpp | 54 int SysEventDocWriter::Write(const std::shared_ptr<SysEvent>& sysEvent) in Write() argument 56 if (sysEvent == nullptr) { in Write() 65 if (int ret = GetContentSize(sysEvent, contentSize); ret != DOC_STORE_SUCCESS) { in Write() 77 if (auto ret = WriteHeader(sysEvent, contentSize); ret != DOC_STORE_SUCCESS) { in Write() 80 return WriteContent(sysEvent, contentSize); in Write() 102 return WriteContent(sysEvent, contentSize); in Write() 129 int SysEventDocWriter::GetContentSize(const std::shared_ptr<SysEvent>& sysEvent, uint32_t& contentS… in GetContentSize() argument 131 if (sysEvent->AsRawData() == nullptr) { in GetContentSize() 135 uint32_t dataSize = *(reinterpret_cast<uint32_t*>(sysEvent->AsRawData())); in GetContentSize() 144 int SysEventDocWriter::WriteHeader(const std::shared_ptr<SysEvent>& sysEvent, uint32_t contentSize) in WriteHeader() argument [all …]
|
/base/update/sys_installer/services/module_update/service/src/ |
D | crash_sys_event_listener.cpp | 26 void CrashSysEventListener::OnEvent(std::shared_ptr<HiSysEventRecord> sysEvent) in OnEvent() argument 29 if (sysEvent == nullptr) { in OnEvent() 33 if (strcmp(sysEvent->GetDomain().c_str(), CRASH_DOMAIN) == 0 in OnEvent() 34 && strcmp(sysEvent->GetEventName().c_str(), CRASH_NAME) == 0 in OnEvent() 35 && sysEvent->GetEventType() == CRASH_TYPE) { in OnEvent() 37 int ret = sysEvent->GetParamValue(PROCESS_NAME_KEY, processName); in OnEvent()
|
/base/hiviewdfx/hiview/base/event_store/store/ |
D | sys_event_doc.cpp | 47 int SysEventDoc::Insert(const std::shared_ptr<SysEvent>& sysEvent) in Insert() argument 49 if (sysEvent == nullptr) { in Insert() 56 if (ret = InitWriter(sysEvent); ret != 0) { in Insert() 62 if (ret = writer_->Write(sysEvent); ret == DOC_STORE_NEW_FILE) { in Insert() 64 if (ret = CreateCurFile(GetDir(), sysEvent); ret != DOC_STORE_SUCCESS) { in Insert() 70 return writer_->Write(sysEvent); in Insert() 86 int SysEventDoc::InitWriter(const std::shared_ptr<SysEvent>& sysEvent) in InitWriter() argument 89 type_ = sysEvent->eventType_; in InitWriter() 90 level_ = sysEvent->GetLevel(); in InitWriter() 91 if (auto ret = UpdateCurFile(sysEvent); ret != 0) { in InitWriter() [all …]
|
/base/hiviewdfx/hiview/base/test/unittest/common/ |
D | sys_event_test.cpp | 56 … std::shared_ptr<SysEvent> sysEvent = std::make_shared<SysEvent>("test", nullptr, sysEventCreator); variable 59 …std::cout << "size=" << sysEvent->AsJsonStr().size() << ", jsonStr:" << sysEvent->AsJsonStr() << s… 61 auto eventJsonStr = sysEvent->AsJsonStr(); 81 … std::shared_ptr<SysEvent> sysEvent = std::make_shared<SysEvent>("test", nullptr, sysEventCreator); variable 84 …std::cout << "size=" << sysEvent->AsJsonStr().size() << ", jsonStr:" << sysEvent->AsJsonStr() << s… 86 auto eventJsonStr = sysEvent->AsJsonStr();
|
/base/hiviewdfx/hiview/base/event_store/utility/writer/include/ |
D | sys_event_doc_writer.h | 32 int Write(const std::shared_ptr<SysEvent>& sysEvent); 35 int WriteHeader(const std::shared_ptr<SysEvent>& sysEvent, uint32_t contentSize); 36 int WriteContent(const std::shared_ptr<SysEvent>& sysEvent, uint32_t contentSize); 37 …int BuildContent(const std::shared_ptr<SysEvent>& sysEvent, uint8_t** contentPtr, uint32_t content… 40 int GetContentSize(const std::shared_ptr<SysEvent>& sysEvent, uint32_t& contentSize);
|
/base/hiviewdfx/hisysevent/frameworks/native/ |
D | hisysevent_tool_listener.cpp | 29 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/plugins/eventlogger/ |
D | event_logger.cpp | 81 auto sysEvent = Event::DownCastTo<SysEvent>(event); in IsInterestedPipelineEvent() local 82 if (eventLoggerConfig_.find(sysEvent->eventName_) == eventLoggerConfig_.end()) { in IsInterestedPipelineEvent() 86 sysEvent->AsJsonStr().c_str()); in IsInterestedPipelineEvent() 88 long pid = sysEvent->GetEventIntValue("PID"); in IsInterestedPipelineEvent() 89 pid = pid ? pid : sysEvent->GetPid(); in IsInterestedPipelineEvent() 93 sysEvent->eventName_.c_str(), pid, errno, strerror(errno)); in IsInterestedPipelineEvent() 97 EventLoggerConfig::EventLoggerConfigData& configOut = eventLoggerConfig_[sysEvent->eventName_]; in IsInterestedPipelineEvent() 98 sysEvent->eventName_ = configOut.name; in IsInterestedPipelineEvent() 99 sysEvent->SetValue("eventLog_action", configOut.action); in IsInterestedPipelineEvent() 100 sysEvent->SetValue("eventLog_interval", configOut.interval); in IsInterestedPipelineEvent() [all …]
|
/base/hiviewdfx/hiview/plugins/event_store/ |
D | sys_event_store.cpp | 74 std::shared_ptr<SysEvent> sysEvent = Event::DownCastTo<SysEvent>(event); in Convert2SysEvent() local 75 if (sysEvent == nullptr) { in Convert2SysEvent() 78 return sysEvent; in Convert2SysEvent() 87 std::shared_ptr<SysEvent> sysEvent = Convert2SysEvent(event); in OnEvent() local 88 if (sysEvent->preserve_) { in OnEvent() 89 sysEventDbMgr_->SaveToStore(sysEvent); in OnEvent()
|
/base/hiviewdfx/hiview/plugins/freeze_detector/ |
D | freeze_detector_plugin.cpp | 106 SysEvent& sysEvent = static_cast<SysEvent&>(eventRef); in MakeWatchPoint() local 108 long seq = sysEvent.GetSeq(); in MakeWatchPoint() 109 long tid = sysEvent.GetTid(); in MakeWatchPoint() 110 long pid = sysEvent.GetEventIntValue(FreezeCommon::EVENT_PID); in MakeWatchPoint() 111 pid = pid ? pid : sysEvent.GetPid(); in MakeWatchPoint() 112 long uid = sysEvent.GetEventIntValue(FreezeCommon::EVENT_UID); in MakeWatchPoint() 113 uid = uid ? uid : sysEvent.GetUid(); in MakeWatchPoint() 114 std::string packageName = sysEvent.GetEventValue(FreezeCommon::EVENT_PACKAGE_NAME); in MakeWatchPoint() 115 std::string processName = sysEvent.GetEventValue(FreezeCommon::EVENT_PROCESS_NAME); in MakeWatchPoint() 116 std::string msg = RemoveRedundantNewline(sysEvent.GetEventValue(FreezeCommon::EVENT_MSG)); in MakeWatchPoint() [all …]
|
/base/hiviewdfx/hiview/plugins/faultlogger/service/ |
D | faultlogger.cpp | 300 auto sysEvent = std::static_pointer_cast<SysEvent>(event); in JudgmentRateLimiting() local 301 long pid = sysEvent->GetPid(); in JudgmentRateLimiting() 318 sysEvent->eventId_, sysEvent->eventName_.c_str(), eventPid.c_str(), interval); in JudgmentRateLimiting() 325 sysEvent->eventId_, sysEvent->eventName_.c_str(), eventPid.c_str(), interval); in JudgmentRateLimiting() 356 auto sysEvent = std::static_pointer_cast<SysEvent>(event); in OnEvent() local 358 sysEvent->AsJsonStr().c_str()); in OnEvent() 360 info.time = sysEvent->happenTime_; in OnEvent() 361 info.id = sysEvent->GetUid(); in OnEvent() 362 info.pid = sysEvent->GetPid(); in OnEvent() 364 …info.module = isJsError ? sysEvent->GetEventValue("PACKAGE_NAME") : sysEvent->GetEventValue("MODUL… in OnEvent() [all …]
|
D | faultlog_database.cpp | 49 auto sysEvent = std::make_unique<SysEvent>("FaultLogDatabase", nullptr, rawData); in ParseFaultLogInfoFromJson() local 50 HIVIEW_LOGI("parse FaultLogInfo from %{public}s. 0", sysEvent->AsJsonStr().c_str()); in ParseFaultLogInfoFromJson() 51 info.time = static_cast<int64_t>(std::atoll(sysEvent->GetEventValue("HAPPEN_TIME").c_str())); in ParseFaultLogInfoFromJson() 53 info.time = sysEvent->GetEventIntValue("HAPPEN_TIME"); in ParseFaultLogInfoFromJson() 55 info.pid = sysEvent->GetEventIntValue("PID"); in ParseFaultLogInfoFromJson() 57 info.pid = sysEvent->GetEventIntValue("pid_"); in ParseFaultLogInfoFromJson() 59 info.id = sysEvent->GetEventIntValue("UID"); in ParseFaultLogInfoFromJson() 61 info.id = sysEvent->GetEventIntValue("uid_"); in ParseFaultLogInfoFromJson() 63 info.faultLogType = std::atoi(sysEvent->GetEventValue("FAULT_TYPE").c_str()); in ParseFaultLogInfoFromJson() 64 info.module = sysEvent->GetEventValue("MODULE"); in ParseFaultLogInfoFromJson() [all …]
|
/base/hiviewdfx/faultloggerd/tools/crash_validator/ |
D | crash_validator.cpp | 58 void CrashValidator::OnEvent(std::shared_ptr<HiviewDFX::HiSysEventRecord> sysEvent) in OnEvent() argument 61 auto domain = sysEvent->GetDomain(); in OnEvent() 62 auto eventName = sysEvent->GetEventName(); in OnEvent() 64 HandleCppCrashEvent(sysEvent); in OnEvent() 66 HandleProcessExitEvent(sysEvent); in OnEvent() 167 void CrashValidator::HandleCppCrashEvent(std::shared_ptr<HiviewDFX::HiSysEventRecord> sysEvent) in HandleCppCrashEvent() argument 171 sysEvent->GetParamValue(KEY_HAPPEN_TIME, crashEvent.time); in HandleCppCrashEvent() 172 sysEvent->GetParamValue(KEY_UID, crashEvent.uid); in HandleCppCrashEvent() 173 sysEvent->GetParamValue(KEY_PID, crashEvent.pid); in HandleCppCrashEvent() 174 sysEvent->GetParamValue(KEY_LOG_PATH, crashEvent.path); in HandleCppCrashEvent() [all …]
|
D | crash_validator.h | 45 void OnEvent(std::shared_ptr<HiviewDFX::HiSysEventRecord> sysEvent) override; 56 void HandleCppCrashEvent(std::shared_ptr<HiviewDFX::HiSysEventRecord> sysEvent); 57 void HandleProcessExitEvent(std::shared_ptr<HiviewDFX::HiSysEventRecord> sysEvent);
|
/base/hiviewdfx/faultloggerd/test/unittest/panic_handler/ |
D | rustpanic_listener.cpp | 23 void RustPanicListener::OnEvent(std::shared_ptr<HiSysEventRecord> sysEvent) in OnEvent() argument 25 if (sysEvent == nullptr) { in OnEvent() 29 sysEvent->GetParamValue("REASON", reason); in OnEvent()
|
/base/hiviewdfx/hisysevent/interfaces/native/innerkits/hisysevent_manager/ |
D | hisysevent_listener_c.cpp | 27 void HiSysEventListenerC::OnEvent(std::shared_ptr<OHOS::HiviewDFX::HiSysEventRecord> sysEvent) in OnEvent() argument 29 if (onEvent_ == nullptr || sysEvent == nullptr) { in OnEvent() 34 HiSysEventRecordConvertor::ConvertRecord(*sysEvent, record); in OnEvent()
|
/base/hiviewdfx/hiview/base/event_store/store/include/ |
D | sys_event_doc.h | 36 int Insert(const std::shared_ptr<SysEvent>& sysEvent); 40 int InitWriter(const std::shared_ptr<SysEvent>& sysEvent); 48 int UpdateCurFile(const std::shared_ptr<SysEvent>& sysEvent); 49 int CreateCurFile(const std::string& dir, const std::shared_ptr<SysEvent>& sysEvent);
|
/base/hiviewdfx/hisysevent/frameworks/native/c_wrapper/source/ |
D | hisysevent_rust_listener.cpp | 37 void HiSysEventRustListener::OnEvent(std::shared_ptr<OHOS::HiviewDFX::HiSysEventRecord> sysEvent) in OnEvent() argument 39 if (watcher_ == nullptr || sysEvent == nullptr) { in OnEvent() 44 HiSysEventRecordConvertor::ConvertRecord(*sysEvent, record); in OnEvent()
|
/base/hiviewdfx/hiview/plugins/faultlogger/test/common/ |
D | faultevent_listener.cpp | 34 void FaultEventListener::OnEvent(std::shared_ptr<HiSysEventRecord> sysEvent) in OnEvent() argument 36 if (sysEvent == nullptr) { in OnEvent() 39 auto str = sysEvent->AsJson(); in OnEvent()
|
/base/hiviewdfx/hiview/adapter/plugins/eventservice/service/idl/src/ |
D | query_sys_event_callback_stub.cpp | 37 std::vector<std::u16string> sysEvent; in OnRemoteRequest() local 38 ret = AshMemUtils::ReadBulkData(data, sysEvent); in OnRemoteRequest() 49 OnQuery(sysEvent, seq); in OnRemoteRequest()
|