Home
last modified time | relevance | path

Searched refs:threads (Results 1 – 25 of 29) sorted by relevance

12

/system/extras/memory_replay/tests/
DThreadsTest.cpp27 Threads threads(&pointers, 1); in TEST() local
28 Thread* thread = threads.CreateThread(900); in TEST()
30 ASSERT_EQ(1U, threads.num_threads()); in TEST()
32 Thread* found_thread = threads.FindThread(900); in TEST()
39 threads.Finish(thread); in TEST()
41 ASSERT_EQ(0U, threads.num_threads()); in TEST()
47 Threads threads(&pointers, 1); in TEST() local
48 Thread* thread1 = threads.CreateThread(900); in TEST()
50 ASSERT_EQ(1U, threads.num_threads()); in TEST()
52 Thread* thread2 = threads.CreateThread(901); in TEST()
[all …]
/system/extras/libfec/
Dfec_process.cpp54 int threads = sysconf(_SC_NPROCESSORS_ONLN); in process() local
56 if (threads < WORK_MIN_THREADS) { in process()
57 threads = WORK_MIN_THREADS; in process()
58 } else if (threads > WORK_MAX_THREADS) { in process()
59 threads = WORK_MAX_THREADS; in process()
65 if ((size_t)threads > blocks) { in process()
66 threads = (int)blocks; in process()
69 size_t count_per_thread = fec_div_round_up(blocks, threads) * FEC_BLOCKSIZE; in process()
74 debug("%d threads, %zu bytes per thread (total %zu)", threads, in process()
78 process_info info[threads]; in process()
[all …]
/system/extras/memory_replay/
Dmain.cpp72 Threads threads(&pointers, max_threads); in ProcessDump() local
74 printf("Maximum threads available: %zu\n", threads.max_threads()); in ProcessDump()
103 Thread* thread = threads.FindThread(tid); in ProcessDump()
105 thread = threads.CreateThread(tid); in ProcessDump()
122 threads.WaitForAllToQuiesce(); in ProcessDump()
130 threads.Finish(thread); in ProcessDump()
141 threads.WaitForAllToQuiesce(); in ProcessDump()
148 threads.FinishAll(); in ProcessDump()
153 threads.total_time_nsecs(), threads.total_time_nsecs()/1000000000.0); in ProcessDump()
DThreads.cpp114 for (size_t i = 0, threads = 0; threads < num_threads_; i++) { in WaitForAllToQuiesce() local
117 threads++; in WaitForAllToQuiesce()
/system/core/libmemunreachable/tests/
DThreadCapture_test.cpp54 void StartThreads(unsigned int threads, Function&& func) { in StartThreads() argument
55 threads_.reserve(threads); in StartThreads()
56 tids_.reserve(threads); in StartThreads()
57 for (unsigned int i = 0; i < threads; i++) { in StartThreads()
58 threads_.emplace_back([&, i, threads, this]() { in StartThreads()
62 if (tids_.size() == threads) { in StartThreads()
78 cv_start_.wait(lk, [&]{ return tids_.size() == threads; }); in StartThreads()
144 const unsigned int threads = GetParam() - 1; in TEST_P() local
146 StartThreads(threads, [](){}); in TEST_P()
212 const unsigned int threads = GetParam(); in TEST_P() local
[all …]
/system/extras/verity/fec/
Dimage.cpp540 int threads = ctx->threads; in image_process() local
542 if (threads < IMAGE_MIN_THREADS) { in image_process()
543 threads = sysconf(_SC_NPROCESSORS_ONLN); in image_process()
545 if (threads < IMAGE_MIN_THREADS) { in image_process()
546 threads = IMAGE_MIN_THREADS; in image_process()
552 if ((uint64_t)threads > ctx->rounds) { in image_process()
553 threads = (int)ctx->rounds; in image_process()
555 if (threads > IMAGE_MAX_THREADS) { in image_process()
556 threads = IMAGE_MAX_THREADS; in image_process()
560 INFO("starting %d threads to compute RS(255, %d)\n", threads, in image_process()
[all …]
Dimage.h55 int threads; member
/system/core/libmemunreachable/
DThreadCapture.cpp80 bool CapturedThreadInfo(ThreadInfoList& threads);
327 bool ThreadCaptureImpl::CapturedThreadInfo(ThreadInfoList& threads) { in CapturedThreadInfo() argument
328 threads.clear(); in CapturedThreadInfo()
335 threads.push_back(t); in CapturedThreadInfo()
363 bool ThreadCapture::CapturedThreadInfo(ThreadInfoList& threads) { in CapturedThreadInfo() argument
364 return impl_->CapturedThreadInfo(threads); in CapturedThreadInfo()
DREADME.md40 4. *Collection process*: All threads in the original process are paused with `ptrace()`.
42 …6. *Original process*: Allocations are re-enabled using `malloc_enable()`, but all threads are sti…
44 8. Collection process releases all threads from `ptrace` and exits
45 …9. *Original process*: All threads continue, the thread that called `GetUnreachableMemory()` block…
58 - `ThreadCapture.cpp`: Pauses threads in the main process and collects register contents.
69 - `malloc enable()`: re-enable allocations in all threads.
DThreadCapture.h44 bool CapturedThreadInfo(ThreadInfoList& threads);
DMemUnreachable.cpp52 bool CollectAllocations(const allocator::vector<ThreadInfo>& threads,
79 bool MemUnreachable::CollectAllocations(const allocator::vector<ThreadInfo>& threads, in CollectAllocations() argument
108 for (auto thread_it = threads.begin(); thread_it != threads.end(); thread_it++) { in CollectAllocations()
/system/core/toolbox/
Dtop.c90 static int max_procs, delay, iterations, threads; variable
162 if (!strcmp(argv[i], "-H") || !strcmp(argv[i], "-t")) { threads = 1; continue; } in top_main()
172 if (threads && proc_cmp == &proc_thr_cmp) { in top_main()
238 new_procs = calloc(INIT_PROCS * (threads ? THREAD_MULT : 1), sizeof(struct proc_info *)); in read_procs()
239 num_new_procs = INIT_PROCS * (threads ? THREAD_MULT : 1); in read_procs()
256 if (!threads) { in read_procs()
291 if (threads) { in read_procs()
315 if (!threads) in read_procs()
471 if (!threads) in print_procs()
490 if (!threads) { in print_procs()
Dps.c265 int threads = 0; in ps_main() local
269 threads = 1; in ps_main()
327 if(threads) ps_threads(pid); in ps_main()
/system/core/libsync/
Dsync_test.c79 pthread_t threads[4]; in main() local
119 pthread_create(&threads[i], NULL, sync_thread, &sync_data[i]); in main()
143 pthread_join(threads[i], &val); in main()
/system/extras/simpleperf/
Devent_selection_set.h73 bool OpenEventFilesForThreadsOnCpus(const std::vector<pid_t>& threads, std::vector<int> cpus);
85 bool OpenEventFiles(const std::vector<pid_t>& threads, const std::vector<int>& cpus);
Devent_selection_set.cpp196 bool EventSelectionSet::OpenEventFilesForThreadsOnCpus(const std::vector<pid_t>& threads, in OpenEventFilesForThreadsOnCpus() argument
205 return OpenEventFiles(threads, cpus); in OpenEventFilesForThreadsOnCpus()
208 bool EventSelectionSet::OpenEventFiles(const std::vector<pid_t>& threads, in OpenEventFiles() argument
211 for (auto& tid : threads) { in OpenEventFiles()
/system/core/adb/
Dsysdeps_test.cpp42 std::vector<adb_thread_t> threads(500); in TEST() local
43 for (size_t i = 0; i < threads.size(); ++i) { in TEST()
44 ASSERT_TRUE(adb_thread_create(increment_atomic_int, &counter, &threads[i])); in TEST()
54 for (const auto& thread : threads) { in TEST()
/system/extras/tests/memtest/
Dbandwidth.cpp258 pthread_t threads[num_threads]; in runThreadedTest() local
264 rc = pthread_create(&threads[i], NULL, runBandwidthThread, in runThreadedTest()
283 rc = pthread_join(threads[i], NULL); in runThreadedTest()
/system/core/libsync/tests/
Dsync_test.cpp483 vector<thread> threads; in TEST_P() local
513 threads.push_back(thread{threadMain, i}); in TEST_P()
542 for_each(begin(threads), end(threads), [](thread& thread) { thread.join(); }); in TEST_P()
/system/extras/iotop/
Dtaskstats.h44 int threads() const { return threads_; } in threads() function
Diotop.cpp37 float percent = ns / stats.threads() / (time * NSEC_PER_SEC / 100.0f); in TimeToTgidPercent()
/system/netd/tests/
Dnetd_test.cpp378 std::vector<std::thread> threads(num_threads); in RunGetAddrInfoStressTest_Binder() local
379 for (std::thread& thread : threads) { in RunGetAddrInfoStressTest_Binder()
402 for (std::thread& thread : threads) { in RunGetAddrInfoStressTest_Binder()
703 std::vector<std::thread> threads(10); in TEST_F() local
704 for (std::thread& thread : threads) { in TEST_F()
729 for (std::thread& thread : threads) { in TEST_F()
/system/core/libbacktrace/
Dbacktrace_test.cpp412 void GetThreads(pid_t pid, std::vector<pid_t>* threads) { in GetThreads() argument
424 threads->push_back(tid); in GetThreads()
446 std::vector<pid_t> threads; in TEST() local
450 threads.clear(); in TEST()
451 GetThreads(pid, &threads); in TEST()
452 } while ((threads.size() != NUM_PTRACE_THREADS + 1) && in TEST()
454 ASSERT_EQ(threads.size(), static_cast<size_t>(NUM_PTRACE_THREADS + 1)); in TEST()
458 for (std::vector<int>::const_iterator it = threads.begin(); it != threads.end(); ++it) { in TEST()
/system/core/libcutils/
DAndroid.mk36 threads.c \
/system/extras/perfprofd/quipper/original-kernel-headers/tools/perf/util/
Devent.h198 struct thread_map *threads,

12