Home
last modified time | relevance | path

Searched refs:task_runner (Results 1 – 25 of 195) sorted by relevance

12345678

/external/perfetto/src/base/
Dtask_runner_unittest.cc41 T task_runner; member in perfetto::base::__anon9e0d2f920111::TaskRunnerTest
73 auto& task_runner = this->task_runner; in TYPED_TEST() local
75 task_runner.PostTask([&counter] { counter = (counter << 4) | 1; }); in TYPED_TEST()
76 task_runner.PostTask([&counter] { counter = (counter << 4) | 2; }); in TYPED_TEST()
77 task_runner.PostTask([&counter] { counter = (counter << 4) | 3; }); in TYPED_TEST()
78 task_runner.PostTask([&counter] { counter = (counter << 4) | 4; }); in TYPED_TEST()
79 task_runner.PostTask([&task_runner] { task_runner.Quit(); }); in TYPED_TEST()
80 task_runner.Run(); in TYPED_TEST()
85 auto& task_runner = this->task_runner; in TYPED_TEST() local
87 task_runner.PostDelayedTask([&counter] { counter = (counter << 4) | 1; }, 5); in TYPED_TEST()
[all …]
Dthread_task_runner_unittest.cc34 ThreadTaskRunner task_runner = ThreadTaskRunner::CreateAndStart(); in TEST_F() local
35 task_runner.get()->PostTask([this] { atomic_flag_ = true; }); in TEST_F()
43 ThreadTaskRunner task_runner = ThreadTaskRunner::CreateAndStart(); in TEST_F() local
44 EXPECT_FALSE(task_runner.get()->RunsTasksOnCurrentThread()); in TEST_F()
47 task_runner.get()->PostTask([&thread_checker] { in TEST_F()
52 task_runner.get()->PostTask([this, &thread_checker] { in TEST_F()
64 ThreadTaskRunner task_runner = ThreadTaskRunner::CreateAndStart(); in TEST_F() local
65 UnixTaskRunner* runner_ptr = task_runner.get(); in TEST_F()
69 task_runner.get()->PostTask([&thread_checker] { in TEST_F()
76 ThreadTaskRunner task_runner2 = std::move(task_runner); in TEST_F()
[all …]
Dthread_task_runner.cc57 [this, &init_lock, &init_cv](UnixTaskRunner* task_runner) { in ThreadTaskRunner() argument
59 task_runner_ = task_runner; in ThreadTaskRunner()
75 UnixTaskRunner task_runner; in RunTaskThread() local
76 task_runner.PostTask(std::bind(std::move(initializer), &task_runner)); in RunTaskThread()
77 task_runner.Run(); in RunTaskThread()
/external/libchrome/base/test/
Dtest_mock_time_task_runner_unittest.cc196 auto task_runner = MakeRefCounted<TestMockTimeTaskRunner>( in TEST() local
199 task_runner->PostTask(FROM_HERE, base::BindLambdaForTesting([&]() { in TEST()
202 task_runner->RunUntilIdle(); in TEST()
223 quitting_thread.task_runner()->PostDelayedTask( in TEST()
229 auto task_runner = MakeRefCounted<TestMockTimeTaskRunner>(); in TEST() local
230 task_runner->PostTask(FROM_HERE, Bind([]() {})); in TEST()
231 EXPECT_TRUE(task_runner->HasPendingTask()); in TEST()
232 EXPECT_EQ(1u, task_runner->TakePendingTasks().size()); in TEST()
233 EXPECT_FALSE(task_runner->HasPendingTask()); in TEST()
237 auto task_runner = MakeRefCounted<TestMockTimeTaskRunner>(); in TEST() local
[all …]
/external/perfetto/test/cts/
Dheapprofd_test_cts.cc66 base::TestTaskRunner* task_runner, in PollRunState() argument
74 task_runner->PostTask([desired_run_state, task_runner, name, callback] { in PollRunState()
75 PollRunState(desired_run_state, task_runner, name, std::move(callback)); in PollRunState()
81 base::TestTaskRunner* task_runner, in StartAppActivity() argument
88 const auto checkpoint = task_runner->CreateCheckpoint(checkpoint_name); in StartAppActivity()
89 task_runner->PostDelayedTask( in StartAppActivity()
90 [desired_run_state, task_runner, app_name, checkpoint] { in StartAppActivity()
91 PollRunState(desired_run_state, task_runner, app_name, in StartAppActivity()
99 base::TestTaskRunner* task_runner) { in StopApp() argument
105 auto checkpoint = task_runner->CreateCheckpoint(checkpoint_name); in StopApp()
[all …]
/external/perfetto/src/traced/service/
Dlazy_producer_unittest.cc39 MockLazyProducer(base::TaskRunner* task_runner) in MockLazyProducer() argument
40 : LazyProducer(task_runner, 0, kDataSourceName, kPropertyName) {} in MockLazyProducer()
49 base::TestTaskRunner task_runner; in TEST() local
50 auto done = task_runner.CreateCheckpoint("done"); in TEST()
51 MockLazyProducer p(&task_runner); in TEST()
61 task_runner.RunUntilCheckpoint("done"); in TEST()
67 base::TestTaskRunner task_runner; in TEST() local
68 auto done = task_runner.CreateCheckpoint("done"); in TEST()
69 MockLazyProducer p(&task_runner); in TEST()
76 task_runner.RunUntilIdle(); in TEST()
[all …]
Dservice.cc27 base::UnixTaskRunner task_runner; in ServiceMain() local
29 svc = ServiceIPCHost::CreateInstance(&task_runner); in ServiceMain()
53 LazyProducer lazy_heapprofd(&task_runner, /*delay_ms=*/30000, in ServiceMain()
66 task_runner.Run(); in ServiceMain()
/external/libchrome/base/message_loop/
Dmessage_loop_task_runner_unittest.cc40 task_thread_.task_runner()->PostTask( in SetUp()
116 ASSERT_TRUE(task_thread_.task_runner()->PostTaskAndReply( in TEST_F()
150 scoped_refptr<SingleThreadTaskRunner> task_runner = in TEST_F() local
151 task_thread_.task_runner(); in TEST_F()
155 ASSERT_FALSE(task_runner->PostTaskAndReply( in TEST_F()
184 ASSERT_TRUE(current_loop_->task_runner()->PostTaskAndReply( in TEST_F()
220 task_thread_.task_runner()->PostTaskAndReply( in TEST_F()
265 loop_.task_runner()->PostTask( in Quit()
270 ASSERT_TRUE(io_thread_->task_runner()->BelongsToCurrentThread()); in AssertOnIOThread()
271 ASSERT_EQ(io_thread_->task_runner(), ThreadTaskRunnerHandle::Get()); in AssertOnIOThread()
[all …]
/external/libchrome/base/debug/
Dtask_annotator_unittest.cc72 void VerifyTraceAndPost(const scoped_refptr<SequencedTaskRunner>& task_runner, in VerifyTraceAndPost() argument
88 task_runner->PostTask(next_from_here, std::move(task)); in VerifyTraceAndPost()
95 const scoped_refptr<SequencedTaskRunner>& task_runner, in VerifyTraceAndPostWithBlocker() argument
108 task_runner->PostTask( in VerifyTraceAndPostWithBlocker()
111 VerifyTraceAndPost(task_runner, posted_from, next_from_here, expected_trace, in VerifyTraceAndPostWithBlocker()
151 Unretained(this), loop.task_runner(), location5, FROM_HERE, in TEST_F()
159 Unretained(this), loop.task_runner(), location4, location5, in TEST_F()
165 Unretained(this), loop.task_runner(), location3, location4, in TEST_F()
171 Unretained(this), loop.task_runner(), location2, location3, in TEST_F()
176 Unretained(this), loop.task_runner(), location1, location2, in TEST_F()
[all …]
/external/libchrome/base/task_scheduler/
Dscheduler_worker_pool_unittest.cc79 EXPECT_FALSE(factory_.task_runner()->RunsTasksInCurrentSequence()); in Run()
101 delayed_task_manager_.Start(service_thread_.task_runner()); in SetUp()
137 kMaxBackgroundTasks, service_thread_.task_runner(), nullptr, in StartWorkerPool()
214 auto task_runner = test::CreateTaskRunnerWithExecutionMode( in TEST_P() local
217 EXPECT_FALSE(task_runner->PostTask(FROM_HERE, BindOnce(&ShouldNotRun))); in TEST_P()
224 auto task_runner = test::CreateTaskRunnerWithExecutionMode( in TEST_P() local
226 EXPECT_TRUE(task_runner->PostTask(FROM_HERE, DoNothing())); in TEST_P()
230 EXPECT_FALSE(task_runner->PostTask(FROM_HERE, BindOnce(&ShouldNotRun))); in TEST_P()
240 auto task_runner = test::CreateTaskRunnerWithExecutionMode( in TEST_P() local
245 task_runner->PostTask( in TEST_P()
[all …]
Dlazy_task_runner.cc34 SequencedTaskRunner* task_runner = reinterpret_cast<TaskRunnerType*>(state); in Reset() local
35 task_runner->Release(); in Reset()
72 scoped_refptr<TaskRunnerType> task_runner = self->Create(); in CreateRaw() local
78 task_runner->AddRef(); in CreateRaw()
87 return task_runner.get(); in CreateRaw()
/external/v4l2_codec2/vda/
Dv4l2_video_decode_accelerator.cc223 decoder_thread_.task_runner()->PostTask( in Initialize()
232 DCHECK(decoder_thread_.task_runner()->BelongsToCurrentThread()); in InitializeTask()
267 decoder_thread_.task_runner()->PostTask( in Decode()
277 decoder_thread_.task_runner()->PostTask( in AssignPictureBuffers()
286 DCHECK(decoder_thread_.task_runner()->BelongsToCurrentThread()); in AssignPictureBuffersTask()
361 decoder_thread_.task_runner()->PostTask( in ImportBufferForPicture()
373 DCHECK(decoder_thread_.task_runner()->BelongsToCurrentThread()); in ImportBufferForPictureTask()
418 decoder_thread_.task_runner()->PostTask( in ReusePictureBuffer()
426 decoder_thread_.task_runner()->PostTask( in Flush()
434 decoder_thread_.task_runner()->PostTask( in Reset()
[all …]
/external/libchrome/base/timer/
Dtimer_unittest.cc110 void SetTaskRunner(scoped_refptr<SequencedTaskRunner> task_runner) { in SetTaskRunner() argument
111 timer_->SetTaskRunner(std::move(task_runner)); in SetTaskRunner()
421 f.SetTaskRunner(other_thread.task_runner()); in TEST()
436 scoped_refptr<TestMockTimeTaskRunner> task_runner( in TEST() local
439 message_loop.SetTaskRunner(task_runner); in TEST()
441 OneShotTimer timer(task_runner->GetMockTickClock()); in TEST()
444 task_runner->FastForwardBy(TimeDelta::FromSeconds(1)); in TEST()
477 scoped_refptr<TestMockTimeTaskRunner> task_runner( in TEST() local
480 message_loop.SetTaskRunner(task_runner); in TEST()
483 RepeatingTimer timer(task_runner->GetMockTickClock()); in TEST()
[all …]
Dmock_timer.cc13 void FlushPendingTasks(TestSimpleTaskRunner* task_runner) { in FlushPendingTasks() argument
20 for (TestPendingTask& task : task_runner->TakePendingTasks()) in FlushPendingTasks()
35 scoped_refptr<SequencedTaskRunner> task_runner) { in SetTaskRunner() argument
54 scoped_refptr<SequencedTaskRunner> task_runner) { in SetTaskRunner() argument
73 scoped_refptr<SequencedTaskRunner> task_runner) { in SetTaskRunner() argument
/external/perfetto/test/
Dend_to_end_integrationtest.cc235 base::TestTaskRunner task_runner; in TEST_F() local
237 TestHelper helper(&task_runner); in TEST_F()
278 base::TestTaskRunner task_runner; in TEST_F() local
280 TestHelper helper(&task_runner); in TEST_F()
336 base::TestTaskRunner task_runner; in TEST_F() local
338 TestHelper helper(&task_runner); in TEST_F()
390 base::TestTaskRunner task_runner; in TEST_F() local
392 TestHelper helper(&task_runner); in TEST_F()
431 base::TestTaskRunner task_runner; in TEST_F() local
433 TestHelper helper(&task_runner); in TEST_F()
[all …]
Dend_to_end_shared_memory_fuzzer.cc66 void Connect(const char* socket_name, base::TaskRunner* task_runner) { in Connect() argument
68 socket_name, this, "android.perfetto.FakeProducer", task_runner); in Connect()
122 void Initialize(base::TaskRunner* task_runner) override { in Initialize() argument
125 producer_->Connect(TEST_PRODUCER_SOCK_NAME, task_runner); in Initialize()
138 base::TestTaskRunner task_runner; in FuzzSharedMemory() local
140 TestHelper helper(&task_runner); in FuzzSharedMemory()
146 helper.WrapTask(task_runner.CreateCheckpoint( in FuzzSharedMemory()
160 task_runner.RunUntilCheckpoint("produced.and.committed"); in FuzzSharedMemory()
Dtask_runner_thread_delegates.h34 void Initialize(base::TaskRunner* task_runner) override { in Initialize() argument
35 svc_ = ServiceIPCHost::CreateInstance(task_runner); in Initialize()
54 void Initialize(base::TaskRunner* task_runner) override { in Initialize() argument
56 producer_->ConnectWithRetries(producer_socket_.c_str(), task_runner); in Initialize()
74 void Initialize(base::TaskRunner* task_runner) override { in Initialize() argument
76 producer_->Connect(producer_socket_.c_str(), task_runner, in Initialize()
Dend_to_end_benchmark.cc40 base::TestTaskRunner task_runner; in BenchmarkProducer() local
42 TestHelper helper(&task_runner); in BenchmarkProducer()
79 auto on_produced_and_committed = task_runner.CreateCheckpoint(cname); in BenchmarkProducer()
81 task_runner.RunUntilCheckpoint(cname, time_for_messages_ms); in BenchmarkProducer()
114 base::TestTaskRunner task_runner; in BenchmarkConsumer() local
116 TestHelper helper(&task_runner); in BenchmarkConsumer()
161 auto on_produced_and_committed = task_runner.CreateCheckpoint(cname); in BenchmarkConsumer()
167 task_runner.RunUntilCheckpoint(cname); in BenchmarkConsumer()
181 auto batch_checkpoint = task_runner.CreateCheckpoint(batch_cname); in BenchmarkConsumer()
182 task_runner.PostDelayedTask(batch_checkpoint, 1000); in BenchmarkConsumer()
[all …]
/external/perfetto/src/profiling/memory/
Dmain.cc128 base::UnixTaskRunner task_runner; in StartChildHeapprofd() local
130 HeapprofdProducer producer(HeapprofdMode::kChild, &task_runner); in StartChildHeapprofd()
135 task_runner.Run(); in StartChildHeapprofd()
144 base::UnixTaskRunner task_runner; in StartCentralHeapprofd() local
146 HeapprofdProducer producer(HeapprofdMode::kCentral, &task_runner); in StartCentralHeapprofd()
153 task_runner.AddFileDescriptorWatch(g_dump_evt->fd(), [&producer] { in StartCentralHeapprofd()
158 task_runner.Run(); in StartCentralHeapprofd()
/external/perfetto/src/perfetto_cmd/
Dtrigger_perfetto.cc69 base::UnixTaskRunner task_runner; in TriggerPerfettoMain() local
71 &task_runner, in TriggerPerfettoMain()
72 [&task_runner, &finished_with_success](bool success) { in TriggerPerfettoMain()
74 task_runner.Quit(); in TriggerPerfettoMain()
77 task_runner.Run(); in TriggerPerfettoMain()
/external/libchrome/base/task/
Dcancelable_task_tracker.h71 TaskId PostTask(TaskRunner* task_runner,
75 TaskId PostTaskAndReply(TaskRunner* task_runner,
81 TaskId PostTaskAndReplyWithResult(TaskRunner* task_runner, in PostTaskAndReplyWithResult() argument
87 task_runner, from_here, in PostTaskAndReplyWithResult()
100 TaskId PostTaskAndReplyWithResult(TaskRunner* task_runner, in PostTaskAndReplyWithResult() argument
105 task_runner, from_here, in PostTaskAndReplyWithResult()
Dcancelable_task_tracker.cc46 void RunOrPostToTaskRunner(TaskRunner* task_runner, OnceClosure closure) { in RunOrPostToTaskRunner() argument
47 if (task_runner->RunsTasksInCurrentSequence()) in RunOrPostToTaskRunner()
50 task_runner->PostTask(FROM_HERE, std::move(closure)); in RunOrPostToTaskRunner()
68 TaskRunner* task_runner, in PostTask() argument
73 return PostTaskAndReply(task_runner, from_here, std::move(task), DoNothing()); in PostTask()
77 TaskRunner* task_runner, in PostTaskAndReply() argument
94 bool success = task_runner->PostTaskAndReply( in PostTaskAndReply()
/external/perfetto/src/traced/probes/filesystem/
Dfile_scanner_unittest.cc118 base::TestTaskRunner task_runner; in TEST() local
125 task_runner.CreateCheckpoint("done")); in TEST()
128 fs.Scan(&task_runner); in TEST()
130 task_runner.RunUntilCheckpoint("done"); in TEST()
162 base::TestTaskRunner task_runner; in TEST() local
171 task_runner.CreateCheckpoint("done")); in TEST()
174 fs.Scan(&task_runner); in TEST()
176 task_runner.RunUntilCheckpoint("done"); in TEST()
/external/libchrome/base/task/sequence_manager/test/
Dlazy_thread_controller_for_test.cc19 task_runner_ = message_loop_->task_runner(); in LazyThreadControllerForTest()
30 task_runner_ = message_loop_->task_runner(); in EnsureMessageLoop()
108 scoped_refptr<SingleThreadTaskRunner> task_runner) { in SetDefaultTaskRunner() argument
110 pending_default_task_runner_ = task_runner; in SetDefaultTaskRunner()
113 ThreadControllerImpl::SetDefaultTaskRunner(task_runner); in SetDefaultTaskRunner()
/external/libchrome/mojo/public/cpp/bindings/tests/
Dbind_task_runner_unittest.cc248 scoped_refptr<TestTaskRunner> task_runner) { in DoSetFlagAndQuitTaskRunner() argument
250 if (task_runner) in DoSetFlagAndQuitTaskRunner()
251 task_runner->Quit(); in DoSetFlagAndQuitTaskRunner()
257 scoped_refptr<TestTaskRunner> task_runner, in DoExpectValueSetFlagAndQuitTaskRunner() argument
260 DoSetFlagAndQuitTaskRunner(flag, task_runner); in DoExpectValueSetFlagAndQuitTaskRunner()
266 scoped_refptr<TestTaskRunner> task_runner, in DoExpectValueSetFlagForwardValueAndQuitTaskRunner() argument
272 task_runner->Quit(); in DoExpectValueSetFlagForwardValueAndQuitTaskRunner()
277 scoped_refptr<TestTaskRunner> task_runner) { in SetFlagAndQuitTaskRunner() argument
278 return base::Bind(&DoSetFlagAndQuitTaskRunner, flag, task_runner); in SetFlagAndQuitTaskRunner()
284 scoped_refptr<TestTaskRunner> task_runner) { in ExpectValueSetFlagAndQuitTaskRunner() argument
[all …]

12345678