Home
last modified time | relevance | path

Searched refs:tid (Results 1 - 25 of 174) sorted by relevance

1234567

/base/hiviewdfx/faultloggerd/interfaces/innerkits/unwinder/
H A Ddfx_ptrace.cpp33 void DfxPtrace::Detach(pid_t tid) in Detach() argument
35 if (tid > 0) { in Detach()
36 ptrace(PTRACE_CONT, tid, 0, 0); in Detach()
37 ptrace(PTRACE_DETACH, tid, nullptr, nullptr); in Detach()
41 bool DfxPtrace::Attach(pid_t tid, int timeout) in Attach() argument
43 if (tid <= 0) { in Attach()
47 if (ptrace(PTRACE_SEIZE, tid, 0, 0) != 0) { in Attach()
48 DFXLOGW("Failed to seize tid(%{public}d), errno=%{public}d", tid, errno); in Attach()
52 if (ptrace(PTRACE_INTERRUPT, tid, in Attach()
[all...]
H A Dthread_context.cpp68 std::shared_ptr<ThreadContext> GetContextLocked(int32_t tid) in GetContextLocked() argument
70 auto it = g_contextMap.find(tid); in GetContextLocked()
73 threadContext->tid = tid; in GetContextLocked()
76 g_contextMap[tid] = threadContext; in GetContextLocked()
80 if (it->second->tid == ThreadContextStatus::CONTEXT_UNUSED) { in GetContextLocked()
81 it->second->tid = tid; in GetContextLocked()
86 DFXLOGE("GetContextLocked nullptr, tid: %{public}d", tid); in GetContextLocked()
90 RemoveContextLocked(int32_t tid) RemoveContextLocked() argument
137 GetThreadContext(int32_t tid) GetThreadContext() argument
148 ReleaseThread(int32_t tid) ReleaseThread() argument
164 CollectThreadContext(int32_t tid) CollectThreadContext() argument
227 GetStackRange(int32_t tid, uintptr_t& stackBottom, uintptr_t& stackTop) GetStackRange() argument
254 SignalRequestThread(int32_t tid, ThreadContext* threadContext) SignalRequestThread() argument
[all...]
/base/hiviewdfx/faultloggerd/test/unittest/process_dump/
H A Dlock_parser_test.cpp88 void WaitThreadBlock(int& tid) in WaitThreadBlock() argument
91 if (tid > 0) { in WaitThreadBlock()
92 printf("WaitThreadBlock:%d\n", tid); in WaitThreadBlock()
113 int tid = 0; in HWTEST_F() local
114 std::thread t1([&tid, &mutex] { in HWTEST_F()
115 tid = gettid(); in HWTEST_F()
116 printf("BlockTid:%d\n", tid); in HWTEST_F()
120 WaitThreadBlock(tid); in HWTEST_F()
121 printf("CurrentTid:%d BlockTid:%d\n", gettid(), tid); in HWTEST_F()
123 ASSERT_EQ(unwinder->UnwindLocalWithTid(tid), tru in HWTEST_F()
167 int tid = 0; HWTEST_F() local
219 int tid = 0; HWTEST_F() local
258 int tid = 0; HWTEST_F() local
297 int tid = 0; HWTEST_F() local
[all...]
H A Dprocess_dump_test.cpp90 pid_t tid = accountmgrPid; in HWTEST_F() local
91 auto keyThread = DfxThread::Create(pid, tid, tid); in HWTEST_F()
146 pthread_t tid; in HWTEST_F() local
148 pthread_create(&tid, NULL, SleepThread, &threadID[0]); in HWTEST_F()
149 std::shared_ptr<DfxProcess> process2 = DfxProcess::Create(pid, tid); in HWTEST_F()
151 pthread_join(tid, NULL); in HWTEST_F()
166 int32_t pid = 1, tid = 1; in HWTEST_F() local
167 auto thread = DfxThread::Create(pid, tid, tid); in HWTEST_F()
180 int32_t pid = 243, tid = 243; HWTEST_F() local
198 pid_t tid = pid; HWTEST_F() local
222 pid_t tid = pid; HWTEST_F() local
289 pid_t tid = pid; HWTEST_F() local
[all...]
/base/hiviewdfx/faultloggerd/test/benchmarktest/unwinder/
H A Dunwind_local_tid_benchmark.cpp41 NOINLINE int TestFunc6(std::atomic_int* tid, std::atomic_bool* done) in TestFunc6() argument
43 tid->store(gettid()); in TestFunc6()
49 NOINLINE int TestFunc5(std::atomic_int* tid, std::atomic_bool* done) in TestFunc5() argument
51 int val = TestFunc6(tid, done); in TestFunc5()
55 NOINLINE int TestFunc4(std::atomic_int* tid, std::atomic_bool* done) in TestFunc4() argument
57 int val = TestFunc5(tid, done); in TestFunc4()
61 NOINLINE int TestFunc3(std::atomic_int* tid, std::atomic_bool* done) in TestFunc3() argument
63 int val = TestFunc4(tid, done); in TestFunc3()
67 NOINLINE int TestFunc2(std::atomic_int* tid, std::atomic_bool* done) in TestFunc2() argument
69 int val = TestFunc3(tid, don in TestFunc2()
73 TestFunc1(std::atomic_int* tid, std::atomic_bool* done) TestFunc1() argument
[all...]
/base/request/request/frameworks/native/src/
H A Drequest_manager.cpp28 int32_t RequestManager::Create(const Config &config, int32_t seq, std::string &tid) in Create() argument
30 return RequestManagerImpl::GetInstance()->Create(config, seq, tid); in Create()
32 int32_t RequestManager::GetTask(const std::string &tid, const std::string &token, Config &config) in GetTask() argument
34 return RequestManagerImpl::GetInstance()->GetTask(tid, token, config); in GetTask()
36 int32_t RequestManager::Start(const std::string &tid) in Start() argument
38 return RequestManagerImpl::GetInstance()->Start(tid); in Start()
40 int32_t RequestManager::Stop(const std::string &tid) in Stop() argument
42 return RequestManagerImpl::GetInstance()->Stop(tid); in Stop()
45 int32_t RequestManager::Query(const std::string &tid, TaskInfo &info) in Query() argument
47 return RequestManagerImpl::GetInstance()->Query(tid, inf in Query()
50 Touch(const std::string &tid, const std::string &token, TaskInfo &info) Touch() argument
60 Show(const std::string &tid, TaskInfo &info) Show() argument
65 Pause(const std::string &tid, Version version) Pause() argument
70 QueryMimeType(const std::string &tid, std::string &mimeType) QueryMimeType() argument
75 Remove(const std::string &tid, Version version) Remove() argument
80 Resume(const std::string &tid) Resume() argument
[all...]
H A Drequest_service_proxy.cpp39 int32_t RequestServiceProxy::Create(const Config &config, std::string &tid) in Create() argument
80 tid = std::to_string(reply.ReadInt32()); in Create()
136 int32_t RequestServiceProxy::GetTask(const std::string &tid, const std::string &token, Config &config) in GetTask() argument
138 REQUEST_HILOGD("Request GetTask, tid: %{public}s", tid.c_str()); in GetTask()
142 data.WriteString(tid); in GetTask()
146 REQUEST_HILOGE("End Request GetTask, tid: %{public}s, failed: %{public}d", tid.c_str(), ret); in GetTask()
155 REQUEST_HILOGD("End Request GetTask ok, tid: %{public}s", tid in GetTask()
159 Start(const std::string &tid) Start() argument
176 Stop(const std::string &tid) Stop() argument
192 Query(const std::string &tid, TaskInfo &info) Query() argument
214 Touch(const std::string &tid, const std::string &token, TaskInfo &info) Touch() argument
262 Show(const std::string &tid, TaskInfo &info) Show() argument
284 Pause(const std::string &tid, Version version) Pause() argument
301 QueryMimeType(const std::string &tid, std::string &mimeType) QueryMimeType() argument
324 Remove(const std::string &tid, Version version) Remove() argument
348 Resume(const std::string &tid) Resume() argument
387 Subscribe(const std::string &tid) Subscribe() argument
405 Unsubscribe(const std::string &tid) Unsubscribe() argument
[all...]
/base/request/request/frameworks/native/include/
H A Drequest_service_proxy.h32 int32_t Create(const Config &config, std::string &tid) override;
33 int32_t GetTask(const std::string &tid, const std::string &token, Config &config) override;
34 int32_t Start(const std::string &tid) override;
35 int32_t Pause(const std::string &tid, Version version) override;
36 int32_t QueryMimeType(const std::string &tid, std::string &mimeType) override;
37 int32_t Remove(const std::string &tid, Version version) override;
38 int32_t Resume(const std::string &tid) override;
40 int32_t Stop(const std::string &tid) override;
41 int32_t Query(const std::string &tid, TaskInfo &info) override;
42 int32_t Touch(const std::string &tid, cons
[all...]
H A Drequest_service_interface.h32 virtual int32_t GetTask(const std::string &tid, const std::string &token, Config &config) = 0;
33 virtual int32_t Start(const std::string &tid) = 0;
34 virtual int32_t Pause(const std::string &tid, Version version) = 0;
35 virtual int32_t QueryMimeType(const std::string &tid, std::string &mimeType) = 0;
36 virtual int32_t Remove(const std::string &tid, Version version) = 0;
37 virtual int32_t Resume(const std::string &tid) = 0;
39 virtual int32_t Stop(const std::string &tid) = 0;
40 virtual int32_t Query(const std::string &tid, TaskInfo &info) = 0;
41 virtual int32_t Touch(const std::string &tid, const std::string &token, TaskInfo &info) = 0;
43 virtual int32_t Show(const std::string &tid, TaskInf
[all...]
H A Drequest_manager.h29 REQUEST_API int32_t Create(const Config &config, int32_t seq, std::string &tid);
30 REQUEST_API int32_t GetTask(const std::string &tid, const std::string &token, Config &config);
31 REQUEST_API int32_t Start(const std::string &tid);
32 REQUEST_API int32_t Stop(const std::string &tid);
33 REQUEST_API int32_t Query(const std::string &tid, TaskInfo &info);
34 REQUEST_API int32_t Touch(const std::string &tid, const std::string &token, TaskInfo &info);
36 REQUEST_API int32_t Show(const std::string &tid, TaskInfo &info);
37 REQUEST_API int32_t Pause(const std::string &tid, Version version);
38 REQUEST_API int32_t QueryMimeType(const std::string &tid, std::string &mimeType);
39 REQUEST_API int32_t Remove(const std::string &tid, Versio
[all...]
H A Drequest_manager_impl.h48 int32_t Create(const Config &config, int32_t seq, std::string &tid);
49 int32_t GetTask(const std::string &tid, const std::string &token, Config &config);
50 int32_t Start(const std::string &tid);
51 int32_t Stop(const std::string &tid);
52 int32_t Query(const std::string &tid, TaskInfo &info);
53 int32_t Touch(const std::string &tid, const std::string &token, TaskInfo &info);
55 int32_t Show(const std::string &tid, TaskInfo &info);
56 int32_t Pause(const std::string &tid, Version version);
57 int32_t QueryMimeType(const std::string &tid, std::string &mimeType);
58 int32_t Remove(const std::string &tid, Versio
[all...]
/base/hiviewdfx/faultloggerd/interfaces/innerkits/backtrace/
H A Dbacktrace_local.cpp42 std::string GetThreadHead(int32_t tid) in GetThreadHead() argument
45 if (tid == BACKTRACE_CURRENT_THREAD) { in GetThreadHead()
46 tid = gettid(); in GetThreadHead()
48 ReadThreadName(tid, threadName); in GetThreadHead()
49 std::string threadHead = "Tid:" + std::to_string(tid) + ", Name:" + threadName + "\n"; in GetThreadHead()
54 bool GetBacktraceFramesByTid(std::vector<DfxFrame>& frames, int32_t tid, size_t skipFrameNum, bool fast, in GetBacktraceFramesByTid() argument
59 if (fast || (tid != BACKTRACE_CURRENT_THREAD)) { in GetBacktraceFramesByTid()
66 BacktraceLocalThread thread(tid, unwinder); in GetBacktraceFramesByTid()
72 bool GetBacktraceStringByTid(std::string& out, int32_t tid, size_t skipFrameNum, bool fast, in GetBacktraceStringByTid() argument
76 bool ret = GetBacktraceFramesByTid(frames, tid, skipFrameNu in GetBacktraceStringByTid()
[all...]
/base/hiviewdfx/faultloggerd/example/
H A Ddump_catcher_demo.cpp29 static NOINLINE int TestFuncDump(int32_t pid, int32_t tid, bool isJson) in TestFuncDump() argument
37 bool ret = dumplog.DumpCatch(pid, tid, msg, OHOS::HiviewDFX::DEFAULT_MAX_FRAME_NUM, isJson); in TestFuncDump()
69 static bool ParseParameters(int argc, char *argv[], int32_t &pid, int32_t &tid) in ParseParameters() argument
79 tid = atoi(argv[2]); in ParseParameters()
88 tid = atoi(argv[4]); in ParseParameters()
92 tid = atoi(argv[2]); in ParseParameters()
109 int32_t tid = 0; in main() local
110 if (ParseParameters(argc, argv, pid, tid)) { in main()
111 TestFuncDump(pid, tid, true); in main()
/base/request/request/services/src/service/client/
H A Dmanager.rs84 ClientEvent::Subscribe(tid, pid, uid, token_id, tx) => {
85 self.handle_subscribe(tid, pid, uid, token_id, tx)
87 ClientEvent::Unsubscribe(tid, tx) => self.handle_unsubscribe(tid, tx),
88 ClientEvent::TaskFinished(tid) => self.handle_task_finished(tid),
90 ClientEvent::SendResponse(tid, version, status_code, reason, headers) => {
91 if let Some(&pid) = self.pid_map.get(&tid) {
94 tid,
151 tid in handle_subscribe()
[all...]
/base/request/request/test/unittest/cpp_test/fwkTest/src/
H A Drequest_manager_impl_test.cpp45 MOCK_METHOD(int32_t, GetTask, (const std::string &tid, const std::string &token, Config &config), (override));
46 MOCK_METHOD(int32_t, Start, (const std::string &tid), (override));
47 MOCK_METHOD(int32_t, Pause, (const std::string &tid, Version version), (override));
48 MOCK_METHOD(int32_t, QueryMimeType, (const std::string &tid, std::string &mimeType), (override));
49 MOCK_METHOD(int32_t, Remove, (const std::string &tid, Version version), (override));
50 MOCK_METHOD(int32_t, Resume, (const std::string &tid), (override));
51 MOCK_METHOD(int32_t, Stop, (const std::string &tid), (override));
52 MOCK_METHOD(int32_t, Query, (const std::string &tid, TaskInfo &info), (override));
53 MOCK_METHOD(int32_t, Touch, (const std::string &tid, const std::string &token, TaskInfo &info), (override));
55 MOCK_METHOD(int32_t, Show, (const std::string &tid, TaskInf
125 std::string tid = "1"; HWTEST_F() local
147 string tid = "tid"; HWTEST_F() local
168 string tid = "tid"; HWTEST_F() local
181 string tid = "tid"; HWTEST_F() local
195 string tid = "tid"; HWTEST_F() local
209 string tid = "tid"; HWTEST_F() local
238 string tid = "tid"; HWTEST_F() local
251 string tid = "tid"; HWTEST_F() local
264 string tid = "tid"; HWTEST_F() local
278 string tid = "tid"; HWTEST_F() local
291 string tid = "tid"; HWTEST_F() local
599 std::string tid = "1"; HWTEST_F() local
622 std::string tid = "1"; HWTEST_F() local
652 std::string tid = "1"; HWTEST_F() local
[all...]
H A Drequest_manager_test.cpp84 std::string tid = "1"; in HWTEST_F() local
85 RequestManager::GetInstance()->Create(config, seq, tid); in HWTEST_F()
97 std::string tidStr = "tid"; in HWTEST_F()
101 std::string tid = "1"; in HWTEST_F() local
102 RequestManager::GetInstance()->Create(config, seq, tid); in HWTEST_F()
115 std::string tidStr = "tid"; in HWTEST_F()
128 std::string tid = "tid"; in HWTEST_F() local
129 RequestManager::GetInstance()->Stop(tid); in HWTEST_F()
141 std::string tid in HWTEST_F() local
155 std::string tid = "tid"; HWTEST_F() local
184 std::string tid = "tid"; HWTEST_F() local
198 std::string tid = "tid"; HWTEST_F() local
212 std::string tid = "tid"; HWTEST_F() local
226 std::string tid = "tid"; HWTEST_F() local
240 std::string tid = "tid"; HWTEST_F() local
[all...]
/base/hiviewdfx/faultloggerd/test/fuzztest/faultloggerddumpcatcher_fuzzer/
H A Dfaultloggerddumpcatcher_fuzzer.cpp32 int tid; in DumpStackTraceTest() local
33 int offsetTotalLength = sizeof(pid) + sizeof(tid) + in DumpStackTraceTest()
40 STREAM_TO_VALUEINFO(data, tid); in DumpStackTraceTest()
48 catcher->DumpCatch(pid, tid, msg, DEFAULT_MAX_FRAME_NUM, false); in DumpStackTraceTest()
50 std::string processdumpCmd = "dumpcatcher -p " + std::to_string(pid) + " -t " + std::to_string(tid); in DumpStackTraceTest()
54 std::to_string(pid) + " -t " + std::to_string(tid); in DumpStackTraceTest()
/base/hiviewdfx/faultloggerd/tools/dump_catcher/
H A Dmain.cpp36 printf("-p pid -t tid dump the stacktrace of the thread with given tid.\n"); in PrintCommandHelp()
42 printf("%s\npid and tid must > 0.\n", DUMP_STACK_TAG_FAILED.c_str()); in PrintCommandFailed()
45 static int ParseParamters(int argc, char *argv[], int32_t &pid, int32_t &tid) in ParseParamters() argument
74 tid = atoi(optarg); in ParseParamters()
99 int32_t tid = 0; in main() local
104 if (ParseParamters(argc, argv, pid, tid) <= 0) { in main()
108 DFXLOGD("pid: %{public}d, tid: %{public}d", pid, tid); in main()
109 OHOS::HiviewDFX::DumpCatcher::GetInstance().Dump(pid, tid); in main()
[all...]
/base/hiviewdfx/faultloggerd/interfaces/innerkits/unwinder/include/
H A Dthread_context.h37 std::atomic<int32_t> tid {ThreadContextStatus::CONTEXT_UNUSED};
70 bool GetStackRange(int32_t tid, uintptr_t& stackBottom, uintptr_t& stackTop);
71 std::shared_ptr<ThreadContext> CollectThreadContext(int32_t tid);
72 std::shared_ptr<ThreadContext> GetThreadContext(int32_t tid);
73 void ReleaseThread(int32_t tid);
81 bool SignalRequestThread(int32_t tid, ThreadContext* ctx);
/base/hiviewdfx/faultloggerd/test/unittest/common/
H A Dcommon_cutil_test.cpp141 int tid; in HWTEST_F() local
145 ParseSiValue(&si, &timeout, &tid); in HWTEST_F()
146 ASSERT_EQ(tid, 100); in HWTEST_F()
151 ParseSiValue(&si, &timeout, &tid); in HWTEST_F()
154 ASSERT_EQ(tid, 100); in HWTEST_F()
160 ASSERT_EQ(tid, 0); in HWTEST_F()
165 ParseSiValue(&si, &timeout, &tid); in HWTEST_F()
166 ASSERT_EQ(tid, 0XAAAAAAAA); in HWTEST_F()
171 ParseSiValue(&si, &timeout, &tid); in HWTEST_F()
172 ASSERT_EQ(tid, in HWTEST_F()
[all...]
/base/hiviewdfx/faultloggerd/interfaces/innerkits/procinfo/
H A Dprocinfo.cpp98 bool TidToNstid(const int pid, const int tid, int& nstid) in TidToNstid() argument
100 std::string path = StringPrintf("/proc/%d/task/%d/status", pid, tid); in TidToNstid()
127 bool IsThreadInPid(int32_t pid, int32_t tid) in IsThreadInPid() argument
131 path = StringPrintf("%s/%d", PROC_SELF_TASK_PATH, tid); in IsThreadInPid()
133 path = StringPrintf("/proc/%d/task/%d", pid, tid); in IsThreadInPid()
150 pid_t tid = atoi(files[i].c_str()); in GetTidsByPidWithFunc() local
151 if (tid == 0) { in GetTidsByPidWithFunc()
154 tids.push_back(tid); in GetTidsByPidWithFunc()
157 func(tid); in GetTidsByPidWithFunc()
171 func = [&](int tid) { in GetTidsByPid()
204 ReadThreadName(const int tid, std::string& str) ReadThreadName() argument
212 ReadThreadNameByPidAndTid(const int pid, const int tid, std::string& str) ReadThreadNameByPidAndTid() argument
295 ReadThreadWchan(std::string& result, const int tid, bool withThreadName) ReadThreadWchan() argument
[all...]
/base/hiviewdfx/faultloggerd/test/fuzztest/faultloggerdclient_fuzzer/
H A Dfaultloggerdclient_fuzzer.cpp31 int32_t tid; in FaultloggerdClientTest() local
33 int offsetTotalLength = sizeof(type) + sizeof(pid) + sizeof(tid); in FaultloggerdClientTest()
40 STREAM_TO_VALUEINFO(data, tid); in FaultloggerdClientTest()
46 RequestSdkDump(pid, tid); in FaultloggerdClientTest()
/base/hiviewdfx/faultloggerd/interfaces/innerkits/procinfo/include/
H A Dprocinfo.h57 * @brief convert real tid to namespace tid
60 * @param tid thread id
61 * @param nsTid namespace tid(output parameter)
64 bool TidToNstid(const int pid, const int tid, int& nstid);
66 * @brief convert real tid to namespace tid
69 * @param tid thread id
72 bool IsThreadInPid(int32_t pid, int32_t tid);
93 * @param tid threa
[all...]
/base/hiviewdfx/faultloggerd/interfaces/innerkits/dump_catcher/include/
H A Ddfx_dump_catcher.h37 * @brief Dump native stack by specify pid and tid
40 * @param tid thread id
46 bool DumpCatch(int pid, int tid, std::string& msg, size_t maxFrameNums = DEFAULT_MAX_FRAME_NUM,
50 * @brief Dump native stack by specify pid and tid to file
53 * @param tid thread id
59 bool DumpCatchFd(int pid, int tid, std::string& msg, int fd, size_t maxFrameNums = DEFAULT_MAX_FRAME_NUM);
65 * @param tid thread id
84 bool DoDumpLocalTid(const int tid, std::string& msg, size_t maxFrameNums);
86 bool DoDumpLocalLocked(int pid, int tid, std::string& msg, size_t maxFrameNums);
87 bool DoDumpRemoteLocked(int pid, int tid, st
[all...]
/base/hiviewdfx/faultloggerd/tools/process_dump/
H A Ddfx_thread.cpp37 std::shared_ptr<DfxThread> DfxThread::Create(pid_t pid, pid_t tid, pid_t nsTid) in Create() argument
39 auto thread = std::make_shared<DfxThread>(pid, tid, nsTid); in Create()
43 DfxThread::DfxThread(pid_t pid, pid_t tid, pid_t nsTid) : regs_(nullptr) in DfxThread() argument
45 InitThreadInfo(pid, tid, nsTid); in DfxThread()
48 void DfxThread::InitThreadInfo(pid_t pid, pid_t tid, pid_t nsTid) in InitThreadInfo() argument
51 threadInfo_.tid = tid; in InitThreadInfo()
53 ReadThreadNameByPidAndTid(threadInfo_.pid, threadInfo_.tid, threadInfo_.threadName); in InitThreadInfo()

Completed in 9 milliseconds

1234567