/system/bt/osi/test/ |
D | thread_test.cc | 14 thread_t* thread = thread_new("test_thread"); in TEST_F() local 15 ASSERT_TRUE(thread != NULL); in TEST_F() 16 thread_free(thread); in TEST_F() 20 thread_t* thread = thread_new("test_thread"); in TEST_F() local 21 thread_free(thread); in TEST_F() 25 thread_t* thread = thread_new("test_name"); in TEST_F() local 26 ASSERT_STREQ(thread_name(thread), "test_name"); in TEST_F() 27 thread_free(thread); in TEST_F() 31 thread_t* thread = thread_new("0123456789abcdef"); in TEST_F() local 32 ASSERT_STREQ("0123456789abcdef", thread_name(thread)); in TEST_F() [all …]
|
D | semaphore_test.cc | 76 MessageLoopThread thread("semaphore_test_thread"); in TEST_F() local 77 thread.StartUp(); in TEST_F() 78 ASSERT_TRUE(thread.IsRunning()); in TEST_F() 82 thread.DoInThread(FROM_HERE, in TEST_F() 89 thread.ShutDown(); in TEST_F()
|
/system/bt/osi/src/ |
D | thread.cc | 52 thread_t* thread; member 85 start.thread = ret; in thread_new_sized() 108 void thread_free(thread_t* thread) { in thread_free() argument 109 if (!thread) return; in thread_free() 111 thread_stop(thread); in thread_free() 112 thread_join(thread); in thread_free() 114 fixed_queue_free(thread->work_queue, osi_free); in thread_free() 115 reactor_free(thread->reactor); in thread_free() 116 osi_free(thread); in thread_free() 119 void thread_join(thread_t* thread) { in thread_join() argument [all …]
|
/system/extras/memory_replay/tests/ |
D | ThreadTest.cpp | 30 Thread thread; in TEST() local 33 thread.WaitForReady(); in TEST() 38 Thread* thread = thread_data->first; in ThreadWaitForReady() local 41 thread->WaitForReady(); in ThreadWaitForReady() 48 Thread thread; in TEST() local 50 thread_data_t thread_data = std::make_pair(&thread, &finish); in TEST() 52 thread.SetPending(); in TEST() 61 thread.ClearPending(); in TEST() 68 Thread* thread = thread_data->first; in ThreadWaitForPending() local 71 thread->WaitForPending(); in ThreadWaitForPending() [all …]
|
D | ThreadsTest.cpp | 28 Thread* thread = threads.CreateThread(900); in TEST() local 29 ASSERT_TRUE(thread != nullptr); in TEST() 33 ASSERT_EQ(thread, found_thread); in TEST() 36 thread->SetAllocEntry(&thread_done); in TEST() 38 thread->SetPending(); in TEST() 40 threads.Finish(thread); in TEST() 92 Thread* thread = threads.CreateThread(900); in TEST() local 93 ASSERT_TRUE(thread != nullptr); in TEST() 105 thread->SetAllocEntry(&mallocs[i]); in TEST() 106 thread->SetPending(); in TEST() [all …]
|
/system/bt/osi/include/ |
D | thread.h | 44 void thread_free(thread_t* thread); 49 void thread_join(thread_t* thread); 56 bool thread_post(thread_t* thread, thread_fn func, void* context); 61 void thread_stop(thread_t* thread); 66 bool thread_set_priority(thread_t* thread, int priority); 73 bool thread_set_rt_priority(thread_t* thread, int priority); 78 bool thread_is_self(const thread_t* thread); 81 reactor_t* thread_get_reactor(const thread_t* thread); 84 const char* thread_name(const thread_t* thread);
|
/system/extras/memory_replay/ |
D | Threads.cpp | 35 Thread* thread = reinterpret_cast<Thread*>(data); in ThreadRunner() local 37 thread->WaitForPending(); in ThreadRunner() 38 const AllocEntry& entry = thread->GetAllocEntry(); in ThreadRunner() 39 thread->AddTimeNsecs(AllocExecute(entry, thread->pointers())); in ThreadRunner() 41 thread->ClearPending(); in ThreadRunner() 76 Thread* thread = FindEmptyEntry(tid); in CreateThread() local 77 if (thread == nullptr) { in CreateThread() 81 thread->tid_ = tid; in CreateThread() 82 thread->pointers_ = pointers_; in CreateThread() 83 thread->total_time_nsecs_ = 0; in CreateThread() [all …]
|
D | main.cpp | 93 Thread* thread = threads.FindThread(entry.tid); in ProcessDump() local 94 if (thread == nullptr) { in ProcessDump() 95 thread = threads.CreateThread(entry.tid); in ProcessDump() 100 thread->WaitForReady(); in ProcessDump() 102 thread->SetAllocEntry(&entry); in ProcessDump() 113 thread->SetPending(); in ProcessDump() 117 threads.Finish(thread); in ProcessDump() 124 thread->WaitForReady(); in ProcessDump()
|
/system/extras/simpleperf/ |
D | cmd_trace_sched.cpp | 214 auto& thread = thread_map_[r.data->tid]; in ProcessRecord() local 215 thread.process_id = r.data->pid; in ProcessRecord() 216 thread.thread_id = r.data->tid; in ProcessRecord() 217 thread.name = r.comm; in ProcessRecord() 248 ThreadInfo& thread = thread_map_[record.tid_data.tid]; in ProcessSampleRecord() local 249 thread.process_id = record.tid_data.pid; in ProcessSampleRecord() 250 thread.thread_id = record.tid_data.tid; in ProcessSampleRecord() 251 thread.name = thread_name; in ProcessSampleRecord() 252 thread.total_runtime_in_ns += runtime; in ProcessSampleRecord() 253 SpinInfo& spin_info = thread.spin_info; in ProcessSampleRecord() [all …]
|
D | RecordReadThread_test.cpp | 254 RecordReadThread thread(128 * 1024, event_fds[0]->attr(), 1, 1, 0); in TEST_F() local 261 ASSERT_TRUE(thread.RegisterDataCallback(loop, callback)); in TEST_F() 262 ASSERT_TRUE(thread.AddEventFds(event_fds)); in TEST_F() 263 ASSERT_TRUE(thread.SyncKernelBuffer()); in TEST_F() 266 ASSERT_TRUE(thread.GetRecord()); in TEST_F() 267 ASSERT_TRUE(thread.RemoveEventFds(event_fds)); in TEST_F() 268 ASSERT_TRUE(thread.StopReadThread()); in TEST_F() 273 RecordReadThread thread(128 * 1024, attr, 1, 1, 0); in TEST_F() local 278 std::unique_ptr<Record> r = thread.GetRecord(); in TEST_F() 290 ASSERT_TRUE(thread.RegisterDataCallback(loop, callback)); in TEST_F() [all …]
|
D | IOEventLoop_test.cpp | 50 std::thread thread([&]() { in TEST() local 58 thread.join(); in TEST() 84 std::thread thread([&]() { in TEST() local 97 thread.join(); in TEST() 112 std::thread thread([&]() { in TEST() local 120 thread.join(); in TEST() 170 std::thread thread([&]() { in TEST() local 178 thread.join(); in TEST()
|
D | thread_tree_test.cpp | 37 ThreadEntry* thread = thread_tree_.FindThreadOrNew(0, 0); in CheckMaps() local 38 ASSERT_TRUE(thread != nullptr); in CheckMaps() 39 ASSERT_TRUE(thread->maps != nullptr); in CheckMaps() 41 for (auto& pair : thread->maps->maps) { in CheckMaps() 57 const MapEntry* entry = thread_tree_.FindMap(thread, i, false); in CheckMaps() 102 ThreadEntry* thread = thread_tree_.FindThreadOrNew(0, 0); in TEST_F() local 103 ASSERT_TRUE(thread != nullptr); in TEST_F() 104 const MapEntry* map = thread_tree_.FindMap(thread, 0); in TEST_F()
|
/system/bt/gd/os/linux_generic/ |
D | thread_unittest.cc | 33 …explicit SampleReactable(Thread* thread) : thread_(thread), fd_(eventfd(0, 0)), is_same_thread_che… in SampleReactable() argument 60 thread = new Thread("test", Thread::Priority::NORMAL); in SetUp() 64 delete thread; in TearDown() 66 Thread* thread = nullptr; member in bluetooth::os::__anonb7ed5ea90111::ThreadTest 70 thread->Stop(); in TEST_F() 74 EXPECT_EQ(thread->GetThreadName(), "test"); in TEST_F() 78 EXPECT_NE(thread->ToString().find("test"), std::string::npos); in TEST_F() 82 EXPECT_FALSE(thread->IsSameThread()); in TEST_F() 86 Reactor* reactor = thread->GetReactor(); in TEST_F() 87 SampleReactable sample_reactable(thread); in TEST_F()
|
/system/core/fs_mgr/tests/ |
D | file_wait_test.cpp | 56 std::thread thread([this] { in TEST_F() local 61 thread.join(); in TEST_F() 65 std::thread thread([this] { in TEST_F() local 70 thread.join(); in TEST_F() 80 std::thread thread([this] { in TEST_F() local 85 thread.join(); in TEST_F()
|
/system/bt/gd/ |
D | stack_manager_unittest.cc | 28 os::Thread thread{"test_thread", os::Thread::Priority::NORMAL}; in TEST() local 29 stack_manager.StartUp(&module_list, &thread); in TEST() 49 os::Thread thread{"test_thread", os::Thread::Priority::NORMAL}; in TEST() local 50 stack_manager.StartUp(&module_list, &thread); in TEST()
|
/system/core/libunwindstack/tests/ |
D | MapInfoGetLoadBiasTest.cpp | 96 std::vector<std::thread*> threads; in MultipleThreadTest() 103 std::thread* thread = new std::thread([i, this, &wait, &load_bias_values]() { in MultipleThreadTest() local 108 threads.push_back(thread); in MultipleThreadTest() 113 for (auto thread : threads) { in MultipleThreadTest() local 114 thread->join(); in MultipleThreadTest() 115 delete thread; in MultipleThreadTest()
|
/system/bt/hci/src/ |
D | hci_inject.cc | 65 static thread_t* thread; variable 74 CHECK(thread == NULL); in hci_inject_open() 80 thread = thread_new("hci_inject"); in hci_inject_open() 81 if (!thread) goto error; in hci_inject_open() 91 socket_register(listen_socket, thread_get_reactor(thread), NULL, accept_ready, in hci_inject_open() 107 thread_free(thread); in hci_inject_close() 110 thread = NULL; in hci_inject_close() 147 socket_register(socket, thread_get_reactor(thread), client, read_ready, NULL); in accept_ready()
|
/system/core/init/ |
D | ueventd_test.cpp | 55 std::vector<std::thread> threads; in WriteFromMultipleThreads() 57 threads.emplace_back(std::thread(make_thread_function(file, parameter))); in WriteFromMultipleThreads() 60 for (auto& thread : threads) { in WriteFromMultipleThreads() local 61 thread.join(); in WriteFromMultipleThreads() 186 std::vector<std::thread> threads; in TEST() 188 [&]() { return std::thread(thread_function); }); in TEST() 192 for (auto& thread : threads) { in TEST() local 193 thread.join(); in TEST()
|
/system/extras/simpleperf/scripts/inferno/ |
D | inferno.py | 139 main_threads = [thread for thread in process.threads.values() if thread.tid == thread.pid] 144 for thread in process.threads.values(): 145 min_event_count = thread.num_events * args.min_callchain_percentage * 0.01 146 thread.flamegraph.trim_callchain(min_event_count, args.max_callchain_depth) 219 for thread in sorted(process.threads.values(), key=lambda x: x.num_events, reverse=True): 221 (thread.tid, thread.name)) 223 (thread_name, thread.num_samples)) 224 render_svg(process, thread.flamegraph, f, args.color) 234 for thread in process.threads.values(): 235 thread.flamegraph.generate_offset(0)
|
/system/bt/common/ |
D | message_loop_thread_unittest.cc | 289 base::BindOnce([](MessageLoopThread* thread) { thread->IsRunning(); }, in TEST_F() argument 299 auto thread = std::thread(&MessageLoopThread::ShutDown, &message_loop_thread); in TEST_F() local 301 thread.join(); in TEST_F() 309 auto thread = std::thread(&MessageLoopThread::StartUp, &message_loop_thread); in TEST_F() local 310 thread.join(); in TEST_F() 318 auto thread = std::thread(&MessageLoopThread::ShutDown, &message_loop_thread); in TEST_F() local 319 thread.join(); in TEST_F() 328 auto thread = std::thread(&MessageLoopThread::StartUp, &message_loop_thread); in TEST_F() local 329 thread.join(); in TEST_F()
|
/system/extras/simpleperf/runtest/ |
D | function_pthread.cpp | 21 pthread_t thread; in main() local 22 int ret = pthread_create(&thread, nullptr, ChildThreadFunction, nullptr); in main() 28 ret = pthread_join(thread, nullptr); in main()
|
/system/libbase/ |
D | properties_test.cpp | 160 std::thread thread([&]() { in TEST() local 170 thread.join(); in TEST() 194 std::thread thread([&]() { in TEST() local 205 thread.join(); in TEST() 214 std::thread thread([&]() { in TEST() local 225 thread.join(); in TEST() 233 std::thread thread([&]() { in TEST() local 240 thread.join(); in TEST()
|
/system/core/libprocinfo/testdata/ |
D | maps | 351 704defa000-704defb000 ---p 00000000 00:00 0 [anon:thread stack guard] 355 704e455000-704e456000 ---p 00000000 00:00 0 [anon:thread stack guard] 362 704e69d000-704e69e000 ---p 00000000 00:00 0 [anon:thread stack guard] 365 704f79b000-704f79c000 ---p 00000000 00:00 0 [anon:thread stack guard] 367 704f899000-704f89a000 ---p 00000000 00:00 0 [anon:thread stack guard] 420 7051326000-7051327000 ---p 00000000 00:00 0 [anon:thread stack guard] 546 705ddf8000-705ddf9000 ---p 00000000 00:00 0 [anon:thread stack guard] 550 705f5ec000-705f5ed000 ---p 00000000 00:00 0 [anon:thread stack guard] 554 705f7e8000-705f7e9000 ---p 00000000 00:00 0 [anon:thread stack guard] 557 705f8ee000-705f8ef000 ---p 00000000 00:00 0 [anon:thread stack guard] [all …]
|
/system/bt/btif/src/ |
D | btif_sock.cc | 57 static thread_t* thread; variable 71 CHECK(thread == NULL); in btif_sock_init() 93 thread = thread_new("btif_sock"); in btif_sock_init() 94 if (!thread) { in btif_sock_init() 100 status = btsock_sco_init(thread); in btif_sock_init() 110 thread_free(thread); in btif_sock_init() 111 thread = NULL; in btif_sock_init() 126 thread_free(thread); in btif_sock_cleanup() 127 thread = NULL; in btif_sock_cleanup()
|
/system/extras/simpleperf/scripts/ |
D | report_html.py | 93 for thread in process.threads.values(): 94 yield thread 99 for thread in process.threads.values(): 100 for lib in thread.libs.values(): 113 thread = self.threads.get(tid) 114 if not thread: 115 thread = self.threads[tid] = ThreadScope(tid) 116 thread.name = thread_name 119 return thread 126 result['threads'] = [thread.get_sample_info(gen_addr_hit_map) [all …]
|