/base/update/updateservice/services/utils/src/ |
D | dupdate_timer.c | 38 uint32_t tid; member 54 static UpdateTimer* GetTimerById(uint32_t tid) in GetTimerById() argument 56 if (tid == 0) { in GetTimerById() 62 if (g_timerList[i].tid == tid) { in GetTimerById() 81 if (g_timerList[i].tid == 0) { in ExitUpdateTimer() 87 HILOGE("TimerDelete err, tid= 0x%x, ret=%d", g_timerList[i].tid, ret); in ExitUpdateTimer() 103 uint32_t tid; in RegisterCycleTimerCB() local 105 for (tid = 1; tid < ARRAY_SIZE(g_timerList); tid++) { in RegisterCycleTimerCB() 106 if (g_timerList[tid].tid == 0) { in RegisterCycleTimerCB() 109 HILOGE("create timer[0x%x] fail, timeout[%u]", tid, timeout); in RegisterCycleTimerCB() [all …]
|
/base/hiviewdfx/faultloggerd/interfaces/innerkits/backtrace/ |
D | backtrace_local_context.cpp | 42 static std::shared_ptr<ThreadContext> CreateContext(int32_t tid) in CreateContext() argument 45 threadContext->tid = tid; in CreateContext() 51 static std::shared_ptr<ThreadContext> GetContextLocked(int32_t tid) in GetContextLocked() argument 53 auto it = g_contextMap.find(tid); in GetContextLocked() 55 auto threadContext = CreateContext(tid); in GetContextLocked() 56 g_contextMap[tid] = threadContext; in GetContextLocked() 60 if (it->second->tid == ThreadContextStatus::CONTEXT_UNUSED) { in GetContextLocked() 61 it->second->tid = tid; in GetContextLocked() 69 static bool RemoveContextLocked(int32_t tid) in RemoveContextLocked() argument 71 auto it = g_contextMap.find(tid); in RemoveContextLocked() [all …]
|
D | catchframe_local.cpp | 91 bool DfxCatchFrameLocal::ReleaseThread(int tid) in ReleaseThread() argument 93 BacktraceLocalContext::GetInstance().ReleaseThread(tid); in ReleaseThread() 126 bool DfxCatchFrameLocal::CatchFrame(int tid, std::vector<DfxFrame>& frames, bool releaseThread) in CatchFrame() argument 132 if (tid <= 0 || pid_ != procInfo_.pid) { in CatchFrame() 137 if (tid == gettid()) { in CatchFrame() 141 int nstid = tid; in CatchFrame() 143 TidToNstid(pid_, tid, nstid); in CatchFrame() 168 bool DfxCatchFrameLocal::CatchFrameLocalTid(int tid, std::vector<DfxFrame>& frames, bool releaseThr… in CatchFrameLocalTid() argument 173 BacktraceLocalThread thread(tid); in CatchFrameLocalTid()
|
D | backtrace_local_context.h | 33 std::atomic<int32_t> tid {ThreadContextStatus::CONTEXT_UNUSED}; 55 std::shared_ptr<ThreadContext> GetThreadContext(int32_t tid); 56 void ReleaseThread(int32_t tid); 64 bool SignalRequestThread(int32_t tid, ThreadContext* ctx);
|
D | backtrace_local.cpp | 45 bool GetBacktraceFramesByTid(std::vector<DfxFrame>& frames, int32_t tid, size_t skipFrameNum, bool … in GetBacktraceFramesByTid() argument 48 BacktraceLocalThread thread(tid); in GetBacktraceFramesByTid() 71 bool GetBacktraceStringByTid(std::string& out, int32_t tid, size_t skipFrameNum, bool fast) in GetBacktraceStringByTid() argument 74 bool ret = GetBacktraceFramesByTid(frames, tid, skipFrameNum + 1, fast); in GetBacktraceStringByTid() 150 std::function<bool(int)> func = [&](int tid) { in GetProcessStacktrace() argument 151 if (tid <= 0 || tid == gettid()) { in GetProcessStacktrace() 154 BacktraceLocalThread thread(tid); in GetProcessStacktrace()
|
/base/request/request/frameworks/native/include/ |
D | request_service_proxy.h | 31 int32_t Create(const Config &config, int32_t &tid, sptr<NotifyInterface> listener) override; 32 int32_t Start(const std::string &tid) override; 33 int32_t Pause(const std::string &tid, Version version) override; 34 int32_t QueryMimeType(const std::string &tid, std::string &mimeType) override; 35 int32_t Remove(const std::string &tid, Version version) override; 36 int32_t Resume(const std::string &tid) override; 38 int32_t Stop(const std::string &tid) override; 39 int32_t Query(const std::string &tid, TaskInfo &info) override; 40 int32_t Touch(const std::string &tid, const std::string &token, TaskInfo &info) override; 42 int32_t Show(const std::string &tid, TaskInfo &info) override; [all …]
|
D | request_service_interface.h | 31 virtual int32_t Start(const std::string &tid) = 0; 32 virtual int32_t Pause(const std::string &tid, Version version) = 0; 33 virtual int32_t QueryMimeType(const std::string &tid, std::string &mimeType) = 0; 34 virtual int32_t Remove(const std::string &tid, Version version) = 0; 35 virtual int32_t Resume(const std::string &tid) = 0; 37 virtual int32_t Stop(const std::string &tid) = 0; 38 virtual int32_t Query(const std::string &tid, TaskInfo &info) = 0; 39 virtual int32_t Touch(const std::string &tid, const std::string &token, TaskInfo &info) = 0; 41 virtual int32_t Show(const std::string &tid, TaskInfo &info) = 0; 43 virtual int32_t On(const std::string &type, const std::string &tid, [all …]
|
D | request_manager.h | 45 REQUEST_API int32_t Create(const Config &config, int32_t &tid, sptr<NotifyInterface> listener); 46 REQUEST_API int32_t Start(const std::string &tid); 47 REQUEST_API int32_t Stop(const std::string &tid); 48 REQUEST_API int32_t Query(const std::string &tid, TaskInfo &info); 49 REQUEST_API int32_t Touch(const std::string &tid, const std::string &token, TaskInfo &info); 51 REQUEST_API int32_t Show(const std::string &tid, TaskInfo &info); 52 REQUEST_API int32_t Pause(const std::string &tid, Version version); 53 REQUEST_API int32_t QueryMimeType(const std::string &tid, std::string &mimeType); 54 REQUEST_API int32_t Remove(const std::string &tid, Version version); 55 REQUEST_API int32_t Resume(const std::string &tid); [all …]
|
/base/request/request/test/fuzztest/downloaduploadmanager_fuzzer/ |
D | downloaduploadmanager_fuzzer.cpp | 67 auto tid = static_cast<int32_t>(size); in CreateRequestFuzzTest() local 74 RequestManager::GetInstance()->Create(config, tid, listener_); in CreateRequestFuzzTest() 79 std::string tid(reinterpret_cast<const char *>(data), size); in StartRequestFuzzTest() 81 RequestManager::GetInstance()->Start(tid); in StartRequestFuzzTest() 86 std::string tid(reinterpret_cast<const char *>(data), size); in StopRequestFuzzTest() 88 RequestManager::GetInstance()->Stop(tid); in StopRequestFuzzTest() 94 std::string tid(reinterpret_cast<const char *>(data), size); in ShowRequestFuzzTest() 96 RequestManager::GetInstance()->Show(tid, info); in ShowRequestFuzzTest() 102 std::string tid(reinterpret_cast<const char *>(data), size); in TouchRequestFuzzTest() 105 RequestManager::GetInstance()->Touch(tid, token, info); in TouchRequestFuzzTest() [all …]
|
/base/hiviewdfx/faultloggerd/example/ |
D | dump_catcher_demo.cpp | 41 static NOINLINE int TestFuncRemote(int32_t pid, int32_t tid) in TestFuncRemote() argument 45 bool ret = dumplog.DumpCatch(pid, tid, msg); in TestFuncRemote() 64 static bool ParseParameters(int argc, char *argv[], int32_t &pid, int32_t &tid) in ParseParameters() argument 74 tid = atoi(argv[2]); in ParseParameters() 83 tid = atoi(argv[4]); in ParseParameters() 87 tid = atoi(argv[2]); in ParseParameters() 104 int32_t tid = 0; in main() local 105 if (ParseParameters(argc, argv, pid, tid)) { in main() 106 TestFuncRemote(pid, tid); in main()
|
/base/request/request/frameworks/native/src/ |
D | request_manager.cpp | 55 int32_t RequestManager::Create(const Config &config, int32_t &tid, sptr<NotifyInterface> listener) in Create() argument 64 int32_t ret = proxy->Create(config, tid, listener); in Create() 67 return Retry(tid, config, ret, listener); in Create() 112 int32_t RequestManager::Start(const std::string &tid) in Start() argument 120 return proxy->Start(tid); in Start() 123 int32_t RequestManager::Stop(const std::string &tid) in Stop() argument 131 return proxy->Stop(tid); in Stop() 134 int32_t RequestManager::Query(const std::string &tid, TaskInfo &info) in Query() argument 142 return proxy->Query(tid, info); in Query() 145 int32_t RequestManager::Touch(const std::string &tid, const std::string &token, TaskInfo &info) in Touch() argument [all …]
|
D | request_service_proxy.cpp | 36 int32_t RequestServiceProxy::Create(const Config &config, int32_t &tid, sptr<NotifyInterface> liste… in Create() argument 74 tid = reply.ReadInt32(); in Create() 112 int32_t RequestServiceProxy::Start(const std::string &tid) in Start() argument 117 data.WriteString(tid); in Start() 127 int32_t RequestServiceProxy::Stop(const std::string &tid) in Stop() argument 132 data.WriteString(tid); in Stop() 142 int32_t RequestServiceProxy::Query(const std::string &tid, TaskInfo &info) in Query() argument 147 data.WriteString(tid); in Query() 162 int32_t RequestServiceProxy::Touch(const std::string &tid, const std::string &token, TaskInfo &info) in Touch() argument 167 data.WriteString(tid); in Touch() [all …]
|
/base/hiviewdfx/faultloggerd/test/fuzztest/faultloggerd_fuzzer/ |
D | faultloggerd_fuzzer.cpp | 41 int tid[1]; in DumpStackTraceTest() local 47 err = memcpy_s(tid, sizeof(tid), data, PID_SIZE); in DumpStackTraceTest() 53 cout << "pid = " << pid[0] << " tid = " << tid[0] << " invalidOpt = " << invalidOption << endl; in DumpStackTraceTest() 55 if (catcher->DumpCatch(pid[0], tid[0], msg)) { in DumpStackTraceTest() 61 string processdumpCmd = "dumpcatcher -p " + to_string(pid[0]) + " -t " + to_string(tid[0]); in DumpStackTraceTest() 65 to_string(pid[0]) + " -t " + to_string(tid[0]); in DumpStackTraceTest() 80 int32_t tid[1]; in FaultloggerdClientTest() local 86 err = memcpy_s(tid, sizeof(tid), data, sizeof(int32_t)); in FaultloggerdClientTest() 95 cout << "pid = " << pid[0] << " tid = " << tid[0] << " type = " << type[0] << endl; in FaultloggerdClientTest() 101 RequestSdkDump(type[0], pid[0], tid[0]); in FaultloggerdClientTest()
|
/base/hiviewdfx/faultloggerd/test/unittest/process_dump/ |
D | process_dump_test.cpp | 72 pid_t tid = accountmgrPid; variable 73 auto keyThread = DfxThread::Create(pid, tid, tid); 141 int32_t pid = 1, tid = 1; variable 142 auto thread = DfxThread::Create(pid, tid, tid); 155 int32_t pid = 243, tid = 243; variable 156 std::shared_ptr<DfxThread> thread = std::make_shared<DfxThread>(pid, tid, tid); 173 pid_t tid = pid; variable 174 std::shared_ptr<DfxThread> thread = DfxThread::Create(pid, tid, tid); 193 pid_t tid = pid; variable 194 std::shared_ptr<DfxThread> thread = DfxThread::Create(pid, tid, tid); [all …]
|
/base/hiviewdfx/faultloggerd/interfaces/innerkits/dump_catcher/ |
D | dfx_dump_catcher.cpp | 71 bool DfxDumpCatcher::DoDumpLocalTid(const int tid, std::string& msg) in DoDumpLocalTid() argument 74 if (tid <= 0) { in DoDumpLocalTid() 79 ret = GetBacktraceStringByTid(msg, tid, 0, false); in DoDumpLocalTid() 81 msg.append("Failed to dump thread:" + std::to_string(tid) + ".\n"); in DoDumpLocalTid() 96 std::function<bool(int)> func = [&](int tid) { in DoDumpLocalPid() argument 97 if (tid <= 0) { in DoDumpLocalPid() 101 if (tid == gettid()) { in DoDumpLocalPid() 104 return DoDumpLocalTid(tid, msg); in DoDumpLocalPid() 113 bool DfxDumpCatcher::DoDumpRemoteLocked(int pid, int tid, std::string& msg) in DoDumpRemoteLocked() argument 116 return DoDumpCatchRemote(type, pid, tid, msg); in DoDumpRemoteLocked() [all …]
|
/base/hiviewdfx/faultloggerd/interfaces/innerkits/dump_catcher/include/ |
D | dfx_dump_catcher.h | 42 bool DumpCatch(int pid, int tid, std::string& msg); 52 bool DumpCatchMix(int pid, int tid, std::string& msg); 62 bool DumpCatchFd(int pid, int tid, std::string& msg, int fd); 75 bool DoDumpLocalTid(const int tid, std::string& msg); 77 bool DoDumpLocalLocked(int pid, int tid, std::string& msg); 78 bool DoDumpRemoteLocked(int pid, int tid, std::string& msg); 79 bool DoDumpCatchRemote(const int type, int pid, int tid, std::string& msg);
|
/base/hiviewdfx/faultloggerd/tools/process_dump/ |
D | dfx_thread.cpp | 36 std::shared_ptr<DfxThread> DfxThread::Create(pid_t pid, pid_t tid, pid_t nsTid) in Create() argument 38 auto thread = std::make_shared<DfxThread>(pid, tid, nsTid); in Create() 42 DfxThread::DfxThread(pid_t pid, pid_t tid, pid_t nsTid) : regs_(nullptr) in DfxThread() argument 44 InitThreadInfo(pid, tid, nsTid); in DfxThread() 47 void DfxThread::InitThreadInfo(pid_t pid, pid_t tid, pid_t nsTid) in InitThreadInfo() argument 50 threadInfo_.tid = tid; in InitThreadInfo() 52 ReadThreadName(threadInfo_.tid, threadInfo_.threadName); in InitThreadInfo() 115 threadInfo_.tid, threadInfo_.nsTid, getuid(), getgid(), errno); in Attach() 121 threadInfo_.tid, threadInfo_.nsTid, getuid(), getgid(), errno); in Attach() 136 … DFXLOG_WARN("Failed to wait thread(%d:%d) attached.", threadInfo_.tid, threadInfo_.nsTid); in Attach()
|
D | dfx_thread.h | 34 pid_t tid = 0; member 41 static std::shared_ptr<DfxThread> Create(pid_t pid, pid_t tid, pid_t nsTid); 42 DfxThread(pid_t pid, pid_t tid, pid_t nsTid); 63 void InitThreadInfo(pid_t pid, pid_t tid, pid_t nsTid);
|
D | process_dumper.cpp | 74 …OG_INFO("Finish dump stacktrace for %s(%d:%d).", request->processName, request->pid, request->tid); in Dump() 108 …request->siginfo.si_value.sival_int, request->pid, request->nsPid, request->tid, request->threadNa… in DumpProcess() 174 pid_t nsTid = request->tid; in InitProcessInfo() 175 pid_t tid = process_->ChangeTid(nsTid, true); in InitProcessInfo() local 177 … if (dumpTid != 0 && dumpTid != tid && (IsThreadInPid(process_->processInfo_.pid, dumpTid))) { in InitProcessInfo() 178 tid = dumpTid; in InitProcessInfo() 179 nsTid = process_->ChangeTid(tid, false); in InitProcessInfo() 182 process_->keyThread_ = DfxThread::Create(process_->processInfo_.pid, tid, nsTid); in InitProcessInfo() 214 InitDebugLog((int)type, request->pid, request->tid, request->uid); in InitPrintThread() 219 faultloggerdRequest.tid = request->tid; in InitPrintThread()
|
/base/hiviewdfx/faultloggerd/interfaces/innerkits/procinfo/ |
D | procinfo.cpp | 99 bool TidToNstid(const int pid, const int tid, int& nstid) in TidToNstid() argument 101 std::string path = StringPrintf("/proc/%d/task/%d/status", pid, tid); in TidToNstid() 128 bool IsThreadInPid(int32_t pid, int32_t tid) in IsThreadInPid() argument 132 path = StringPrintf("%s/%d", PROC_SELF_TASK_PATH, tid); in IsThreadInPid() 134 path = StringPrintf("/proc/%d/task/%d", pid, tid); in IsThreadInPid() 144 pid_t tid = atoi(files[i].c_str()); in GetTidsByPidWithFunc() local 145 if (tid == 0) { in GetTidsByPidWithFunc() 148 tids.push_back(tid); in GetTidsByPidWithFunc() 151 func(tid); in GetTidsByPidWithFunc() 165 func = [&](int tid) { in GetTidsByPid() argument [all …]
|
/base/hiviewdfx/faultloggerd/tools/dump_catcher/ |
D | main.cpp | 48 static int ParseParamters(int argc, char *argv[], int &type, int32_t &pid, int32_t &tid) in ParseParamters() argument 88 tid = atoi(optarg); in ParseParamters() 115 int32_t tid = 0; in main() local 120 if (ParseParamters(argc, argv, type, pid, tid) <= 0) { in main() 124 DFXLOG_DEBUG("type: %d, pid: %d, tid: %d", type, pid, tid); in main() 125 OHOS::HiviewDFX::DumpCatcher::GetInstance().Dump(type, pid, tid); in main()
|
D | dump_catcher.cpp | 31 void DumpCatcher::Dump(int32_t type, int32_t pid, int32_t tid) const in Dump() 38 dumpRet = dfxDump.DumpCatch(pid, tid, msg); in Dump() 41 dumpRet = dfxDump.DumpCatchMix(pid, tid, msg); in Dump()
|
/base/update/updateservice/services/utils/include/ |
D | dupdate_timer.h | 38 int DeregisterCycleTimerCB(uint32_t tid); 39 int StartTimer(uint32_t tid); 40 void StopTimer(uint32_t tid);
|
/base/hiviewdfx/faultloggerd/interfaces/innerkits/procinfo/include/ |
D | procinfo.h | 68 bool TidToNstid(const int pid, const int tid, int& nstid); 76 bool IsThreadInPid(int32_t pid, int32_t tid); 100 void ReadThreadName(const int tid, std::string& str); 131 void ReadThreadWchan(std::string& result, const int tid, bool withThreadName = false);
|
/base/hiviewdfx/faultloggerd/interfaces/innerkits/backtrace/include/ |
D | catchframe_local.h | 52 bool ReleaseThread(int tid); 61 bool CatchFrame(int tid, std::vector<DfxFrame>& frames, bool releaseThread = false); 80 bool CatchFrameLocalTid(int tid, std::vector<DfxFrame>& frames, bool releaseThread = false);
|