Lines Matching refs:thread
22 #include <thread>
98 * @tc.desc: test get backtrace of current thread
106 BacktraceLocalThread thread(BACKTRACE_CURRENT_THREAD, unwinder);
107 ASSERT_EQ(true, thread.Unwind(false));
109 const auto& frames = thread.GetFrames();
111 GTEST_LOG_(INFO) << thread.GetFormattedStr();
133 * @tc.desc: test get backtrace of a child thread
140 std::thread backtraceThread(Test001);
143 FAIL() << "Failed to create child thread.\n";
148 BacktraceLocalThread thread(g_tid, unwinder);
149 ASSERT_EQ(true, thread.Unwind(false));
151 const auto& frames = thread.GetFrames();
153 auto backtraceStr = thread.GetFormattedStr(false);
171 * @tc.desc: test get backtrace of a child thread
178 std::thread backtraceThread(Test001);
181 FAIL() << "Failed to create child thread.\n";
210 std::thread backtraceThread(Test001);
213 FAIL() << "Failed to create child thread.\n";
335 * @tc.desc: test get backtrace of current thread
355 * @tc.desc: test get thread kernel stack
412 BacktraceLocalThread thread(BACKTRACE_CURRENT_THREAD, unwinder);
413 ffrt::submit([&]{x = num; thread.Unwind(false, DEFAULT_MAX_FRAME_NUM, 0);}, {}, {&x});
416 const auto& frames = thread.GetFrames();
418 GTEST_LOG_(INFO) << thread.GetFormattedStr();
448 BacktraceLocalThread thread(tid, unwinder);
449 thread.Unwind(false, DEFAULT_MAX_FRAME_NUM, 0);
451 const auto& frames = thread.GetFrames();
453 GTEST_LOG_(INFO) << thread.GetFormattedStr();