Home
last modified time | relevance | path

Searched refs:task_runner_ (Results 1 – 25 of 104) sorted by relevance

12345

/external/perfetto/src/ipc/
Dhost_impl_unittest.cc170 task_runner_.reset(new base::TestTaskRunner()); in SetUp()
171 Host* host = Host::CreateInstance(kSockName, task_runner_.get()).release(); in SetUp()
174 cli_.reset(new FakeClient(task_runner_.get())); in SetUp()
175 auto on_connect = task_runner_->CreateCheckpoint("on_connect"); in SetUp()
177 task_runner_->RunUntilCheckpoint("on_connect"); in SetUp()
181 task_runner_->RunUntilIdle(); in TearDown()
184 task_runner_->RunUntilIdle(); in TearDown()
185 task_runner_.reset(); in TearDown()
190 std::unique_ptr<base::TestTaskRunner> task_runner_; member in perfetto::ipc::__anon48d3e7760111::HostImplTest
199 auto on_bind_failure = task_runner_->CreateCheckpoint("on_bind_failure"); in TEST_F()
[all …]
Dclient_impl_unittest.cc203 task_runner_.reset(new base::TestTaskRunner()); in SetUp()
204 host_.reset(new FakeHost(task_runner_.get())); in SetUp()
205 cli_ = Client::CreateInstance(kSockName, task_runner_.get()); in SetUp()
211 task_runner_->RunUntilIdle(); in TearDown()
212 task_runner_.reset(); in TearDown()
216 std::unique_ptr<base::TestTaskRunner> task_runner_; member in perfetto::ipc::__anonbd6150770111::ClientImplTest
229 auto on_connect = task_runner_->CreateCheckpoint("on_connect"); in TEST_F()
231 task_runner_->RunUntilCheckpoint("on_connect"); in TEST_F()
247 auto on_invoke_reply = task_runner_->CreateCheckpoint("on_invoke_reply"); in TEST_F()
254 task_runner_->RunUntilCheckpoint("on_invoke_reply"); in TEST_F()
[all …]
/external/perfetto/src/base/
Dunix_socket_unittest.cc83 TestTaskRunner task_runner_; member in perfetto::base::__anon181829920111::UnixSocketTest
88 auto cli = UnixSocket::Connect(kSocketName, &event_listener_, &task_runner_); in TEST_F()
90 auto checkpoint = task_runner_.CreateCheckpoint("failure"); in TEST_F()
93 task_runner_.RunUntilCheckpoint("failure"); in TEST_F()
99 auto srv = UnixSocket::Listen(kSocketName, &event_listener_, &task_runner_); in TEST_F()
104 auto srv_did_shutdown = task_runner_.CreateCheckpoint("srv_did_shutdown"); in TEST_F()
113 auto checkpoint = task_runner_.CreateCheckpoint("cli_connected"); in TEST_F()
114 auto cli = UnixSocket::Connect(kSocketName, &event_listener_, &task_runner_); in TEST_F()
117 task_runner_.RunUntilCheckpoint("cli_connected"); in TEST_F()
118 task_runner_.RunUntilCheckpoint("srv_did_shutdown"); in TEST_F()
[all …]
Dthread_task_runner.cc31 : thread_(std::move(other.thread_)), task_runner_(other.task_runner_) { in ThreadTaskRunner()
32 other.task_runner_ = nullptr; in ThreadTaskRunner()
42 if (task_runner_) { in ~ThreadTaskRunner()
43 PERFETTO_CHECK(!task_runner_->QuitCalled()); in ~ThreadTaskRunner()
44 task_runner_->Quit(); in ~ThreadTaskRunner()
59 task_runner_ = task_runner; in ThreadTaskRunner()
70 init_cv.wait(lock, [this] { return !!task_runner_; }); in ThreadTaskRunner()
/external/perfetto/src/tracing/test/
Dtracing_integration_test.cc123 task_runner_.reset(new base::TestTaskRunner()); in SetUp()
126 svc_ = ServiceIPCHost::CreateInstance(task_runner_.get()); in SetUp()
132 task_runner_.get(), GetProducerSMBScrapingMode()); in SetUp()
134 task_runner_->CreateCheckpoint("on_producer_connect"); in SetUp()
136 task_runner_->RunUntilCheckpoint("on_producer_connect"); in SetUp()
145 kConsumerSockName, &consumer_, task_runner_.get()); in SetUp()
147 task_runner_->CreateCheckpoint("on_consumer_connect"); in SetUp()
149 task_runner_->RunUntilCheckpoint("on_consumer_connect"); in SetUp()
160 task_runner_->CreateCheckpoint("on_producer_disconnect"); in TearDown()
165 task_runner_->CreateCheckpoint("on_consumer_disconnect"); in TearDown()
[all …]
Dmock_consumer.cc29 : task_runner_(task_runner) {} in MockConsumer()
36 auto on_disconnect = task_runner_->CreateCheckpoint(checkpoint_name); in ~MockConsumer()
39 task_runner_->RunUntilCheckpoint(checkpoint_name); in ~MockConsumer()
46 auto on_connect = task_runner_->CreateCheckpoint(checkpoint_name); in Connect()
48 task_runner_->RunUntilCheckpoint(checkpoint_name); in Connect()
75 auto on_tracing_disabled = task_runner_->CreateCheckpoint(checkpoint_name); in WaitForTracingDisabled()
77 task_runner_->RunUntilCheckpoint(checkpoint_name, timeout_ms); in WaitForTracingDisabled()
83 auto on_flush = task_runner_->CreateCheckpoint(checkpoint_name); in Flush()
90 base::TestTaskRunner* task_runner = task_runner_; in Flush()
104 auto on_read_buffers = task_runner_->CreateCheckpoint(checkpoint_name); in ReadBuffers()
[all …]
Dmock_producer.cc33 : task_runner_(task_runner) {} in MockProducer()
40 auto on_disconnect = task_runner_->CreateCheckpoint(checkpoint_name); in ~MockProducer()
43 task_runner_->RunUntilCheckpoint(checkpoint_name); in ~MockProducer()
55 auto on_connect = task_runner_->CreateCheckpoint(checkpoint_name); in Connect()
57 task_runner_->RunUntilCheckpoint(checkpoint_name); in Connect()
89 auto on_tracing_enabled = task_runner_->CreateCheckpoint(checkpoint_name); in WaitForTracingSetup()
91 task_runner_->RunUntilCheckpoint(checkpoint_name); in WaitForTracingSetup()
97 auto on_ds_start = task_runner_->CreateCheckpoint(checkpoint_name); in WaitForDataSourceSetup()
110 task_runner_->RunUntilCheckpoint(checkpoint_name); in WaitForDataSourceSetup()
116 auto on_ds_start = task_runner_->CreateCheckpoint(checkpoint_name); in WaitForDataSourceStart()
[all …]
/external/perfetto/src/base/test/
Dtest_task_runner.cc36 task_runner_.Run(); in Run()
41 task_runner_.PostTask(std::bind(&TestTaskRunner::QuitIfIdle, this)); in RunUntilIdle()
42 task_runner_.Run(); in RunUntilIdle()
47 if (task_runner_.IsIdleForTesting()) { in QuitIfIdle()
48 task_runner_.Quit(); in QuitIfIdle()
51 task_runner_.PostTask(std::bind(&TestTaskRunner::QuitIfIdle, this)); in QuitIfIdle()
65 task_runner_.PostDelayedTask( in RunUntilCheckpoint()
76 task_runner_.Run(); in RunUntilCheckpoint()
89 task_runner_.Quit(); in CreateCheckpoint()
96 task_runner_.PostTask(std::move(closure)); in PostTask()
[all …]
/external/webrtc/webrtc/base/
Dtask_unittest.cc138 stuck_[i].task_ = new StuckTask(&task_runner_); in Start()
149 happy_[i].task_ = new HappyTask(&task_runner_); in Start()
188 task_runner_.RunTasks(); in Start()
193 for (int i = 0; !task_runner_.AllChildrenDone() && i < STUCK_TASK_COUNT; in Start()
202 task_runner_.PollTasks(); in Start()
259 EXPECT_TRUE(task_runner_.AllChildrenDone()); in check_passed()
285 MyTaskRunner task_runner_; member in rtc::TaskTest
320 Task *abort_task = new AbortTask(&task_runner_); in Start()
325 task_runner_.RunTasks(); in Start()
333 MyTaskRunner task_runner_; member in rtc::TaskAbortTest
[all …]
/external/libchrome/base/threading/
Dthread_task_runner_handle.cc32 return current->task_runner_; in Get()
67 ttrh->task_runner_.swap(overriding_task_runner); in OverrideForTesting()
79 DCHECK_EQ(expected_task_runner_before_restore, ttrh->task_runner_.get()) in OverrideForTesting()
83 ttrh->task_runner_.swap(task_runner_to_restore); in OverrideForTesting()
86 base::Unretained(ttrh->task_runner_.get()), in OverrideForTesting()
92 : task_runner_(std::move(task_runner)) { in ThreadTaskRunnerHandle()
93 DCHECK(task_runner_->BelongsToCurrentThread()); in ThreadTaskRunnerHandle()
101 DCHECK(task_runner_->BelongsToCurrentThread()); in ~ThreadTaskRunnerHandle()
Dsequenced_task_runner_handle.cc29 return handle->task_runner_; in Get()
47 : task_runner_(std::move(task_runner)) { in SequencedTaskRunnerHandle()
48 DCHECK(task_runner_->RunsTasksInCurrentSequence()); in SequencedTaskRunnerHandle()
54 DCHECK(task_runner_->RunsTasksInCurrentSequence()); in ~SequencedTaskRunnerHandle()
/external/perfetto/src/ipc/test/
Dipc_integrationtest.cc69 perfetto::base::TestTaskRunner task_runner_; member in ipc_test::__anon89bc8b760111::IPCIntegrationTest
74 std::unique_ptr<Host> host = Host::CreateInstance(kSockName, &task_runner_); in TEST_F()
80 auto on_connect = task_runner_.CreateCheckpoint("on_connect"); in TEST_F()
83 Client::CreateInstance(kSockName, &task_runner_); in TEST_F()
86 task_runner_.RunUntilCheckpoint("on_connect"); in TEST_F()
91 auto on_reply = task_runner_.CreateCheckpoint("on_hello_reply"); in TEST_F()
108 task_runner_.RunUntilCheckpoint("on_hello_reply"); in TEST_F()
114 auto on_reply = task_runner_.CreateCheckpoint("on_goodbye_reply"); in TEST_F()
131 task_runner_.RunUntilCheckpoint("on_goodbye_reply"); in TEST_F()
/external/perfetto/src/tracing/core/
Dshared_memory_arbiter_impl_unittest.cc61 task_runner_.reset(new base::TestTaskRunner()); in SetUp()
64 task_runner_.get())); in SetUp()
69 task_runner_.reset(); in TearDown()
72 std::unique_ptr<base::TestTaskRunner> task_runner_; member in perfetto::__anondc8b67b30111::SharedMemoryArbiterImplTest
100 auto on_commit_1 = task_runner_->CreateCheckpoint("on_commit_1"); in TEST_P()
119 task_runner_->RunUntilCheckpoint("on_commit_1"); in TEST_P()
123 auto on_commit_2 = task_runner_->CreateCheckpoint("on_commit_2"); in TEST_P()
134 task_runner_->RunUntilCheckpoint("on_commit_2"); in TEST_P()
139 auto checkpoint = task_runner_->CreateCheckpoint("last_unregistered"); in TEST_P()
166 task_runner_->RunUntilCheckpoint("last_unregistered", 15000); in TEST_P()
Dshared_memory_arbiter_impl.cc56 : task_runner_(task_runner), in SharedMemoryArbiterImpl()
133 task_runner_->RunsTasksOnCurrentThread()) { in GetNewChunk()
209 if (task_runner_->RunsTasksOnCurrentThread() && in UpdateCommitDataRequest()
246 task_runner_->PostTask([weak_this] { in UpdateCommitDataRequest()
268 if (!task_runner_->RunsTasksOnCurrentThread()) { in FlushPendingCommitDataRequests()
270 task_runner_->PostTask([weak_this, callback] { in FlushPendingCommitDataRequests()
307 task_runner_->PostTask([weak_this, id, target_buffer] { in CreateTraceWriter()
318 if (!task_runner_->RunsTasksOnCurrentThread()) { in BindStartupTraceWriterRegistry()
321 task_runner_->PostTask([weak_this, raw_reg, target_buffer]() { in BindStartupTraceWriterRegistry()
354 registry->BindToArbiter(this, target_buffer, task_runner_, on_bound_callback); in BindStartupTraceWriterRegistry()
[all …]
Dstartup_trace_writer_unittest.cc43 task_runner_.reset(new base::TestTaskRunner()); in SetUp()
46 task_runner_.get())); in SetUp()
51 task_runner_.reset(); in TearDown()
171 std::unique_ptr<base::TestTaskRunner> task_runner_; member in perfetto::StartupTraceWriterTest
316 auto all_bound = task_runner_->CreateCheckpoint(checkpoint_name); in TEST_P()
323 task_runner_->PostDelayedTask(task, 1); in TEST_P()
325 task_runner_->PostDelayedTask(task, 1); in TEST_P()
326 task_runner_->RunUntilCheckpoint(checkpoint_name); in TEST_P()
Dstartup_trace_writer_registry.cc83 task_runner_ = task_runner; in BindToArbiter()
87 PERFETTO_DCHECK(task_runner_->RunsTasksOnCurrentThread()); in BindToArbiter()
119 task_runner_->PostTask([weak_this] { in TryBindWriters()
135 if (!unbound_writers_.empty() || !task_runner_ || !on_bound_callback_) in OnUnboundWritersRemovedLocked()
144 task_runner_->PostTask([weak_this, callback]() { in OnUnboundWritersRemovedLocked()
/external/libchrome/mojo/public/cpp/bindings/
Dthread_safe_interface_ptr.h61 task_runner_(task_runner), in ThreadSafeForwarder()
99 task_runner_->PostTask(FROM_HERE, in Accept()
119 task_runner_->PostTask( in AcceptWithResponder()
128 if (task_runner_->RunsTasksInCurrentSequence()) { in AcceptWithResponder()
138 task_runner_->PostTask( in AcceptWithResponder()
249 const scoped_refptr<base::SequencedTaskRunner> task_runner_; variable
317 : task_runner_(task_runner) {} in PtrWrapper()
321 task_runner_->PostTask(FROM_HERE, base::Bind(&PtrWrapper::Bind, this, in BindOnTaskRunner()
333 task_runner_->PostTask(FROM_HERE, base::Bind(&PtrWrapper::Bind, this, in BindOnTaskRunner()
339 task_runner_, base::Bind(&PtrWrapper::Accept, this), in CreateForwarder()
[all …]
/external/perfetto/src/tracing/api_impl/
Dconsumer_api.cc104 base::TaskRunner* const task_runner_; member in perfetto::consumer::__anon4d5fe0b30111::TracingSession
126 : task_runner_(task_runner), in TracingSession()
169 ConsumerIPCClient::Connect(GetConsumerSocket(), this, task_runner_); in Initialize()
254 task_runner_->PostTask([endpoint] { delete endpoint; }); in DestroyConnection()
270 task_runner_->PostTask([callback, callback_arg, handle, state] { in NotifyCallback()
292 std::unique_ptr<base::UnixTaskRunner> task_runner_; member in perfetto::consumer::__anon4d5fe0b30111::TracingController
306 task_runner_initialized_.wait(lock, [this] { return !!task_runner_; }); in TracingController()
312 task_runner_.reset(new base::UnixTaskRunner()); in ThreadMain()
315 task_runner_->Run(); in ThreadMain()
337 auto* session = new TracingSession(task_runner_.get(), handle, callback, in Create()
[all …]
/external/perfetto/src/tracing/ipc/service/
Dservice_ipc_host_impl.cc39 : task_runner_(task_runner) {} in ServiceIPCHostImpl()
49 ipc::Host::CreateInstance(producer_socket_name, task_runner_); in Start()
51 ipc::Host::CreateInstance(consumer_socket_name, task_runner_); in Start()
61 ipc::Host::CreateInstance(std::move(producer_socket_fd), task_runner_); in Start()
63 ipc::Host::CreateInstance(std::move(consumer_socket_fd), task_runner_); in Start()
71 svc_ = TracingService::CreateInstance(std::move(shm_factory), task_runner_); in DoStart()
/external/libchrome/mojo/public/cpp/bindings/lib/
Dinterface_endpoint_client.cc46 task_runner_(std::move(runner)) {} in ResponderThunk()
54 if (task_runner_->RunsTasksInCurrentSequence()) { in ~ResponderThunk()
63 task_runner_->PostTask( in ~ResponderThunk()
76 DCHECK(task_runner_->RunsTasksInCurrentSequence()); in Accept()
90 DCHECK(task_runner_->RunsTasksInCurrentSequence()); in IsConnected()
95 if (task_runner_->RunsTasksInCurrentSequence()) { in IsConnectedAsync()
98 task_runner_->PostTask( in IsConnectedAsync()
107 scoped_refptr<base::SequencedTaskRunner> task_runner_; member in mojo::__anon342e35680111::ResponderThunk
150 task_runner_(std::move(runner)), in InterfaceEndpointClient()
355 task_runner_); in InitControllerIfNecessary()
[all …]
/external/libchrome/mojo/public/cpp/system/
Dsimple_watcher.cc77 task_runner_(task_runner), in Context()
100 task_runner_->RunsTasksInCurrentSequence() && weak_watcher_ && in Notify()
107 task_runner_->PostTask( in Notify()
114 const scoped_refptr<base::SequencedTaskRunner> task_runner_; member in mojo::SimpleWatcher::Context
127 task_runner_(std::move(runner)), in SimpleWatcher()
129 task_runner_ == in SimpleWatcher()
135 DCHECK(task_runner_->RunsTasksInCurrentSequence()); in SimpleWatcher()
161 context_ = Context::Create(weak_factory_.GetWeakPtr(), task_runner_, in Watch()
243 task_runner_->PostTask( in ArmOrNotify()
/external/perfetto/src/traced/probes/
Dprobes_producer.cc138 return task_runner_->PostTask([this] { this->Restart(); }); in OnDisconnect()
142 task_runner_->PostDelayedTask([this] { this->Connect(); }, in OnDisconnect()
153 base::TaskRunner* task_runner = task_runner_; in Restart()
230 ftrace_ = FtraceController::Create(task_runner_, this); in CreateFtraceDataSource()
265 std::move(source_config), task_runner_, session_id, &system_inodes_, in CreateInodeFileDataSource()
274 task_runner_, session_id, endpoint_->CreateTraceWriter(buffer_id), in CreateProcessStatsDataSource()
283 new AndroidPowerDataSource(config, task_runner_, session_id, in CreateAndroidPowerDataSource()
292 new AndroidLogDataSource(config, task_runner_, session_id, in CreateAndroidLogDataSource()
309 new SysStatsDataSource(task_runner_, session_id, in CreateSysStatsDataSource()
365 task_runner_->PostDelayedTask( in Flush()
[all …]
/external/libchrome/base/task/sequence_manager/
Dthread_controller_impl.cc24 task_runner_(task_runner), in ThreadControllerImpl()
76 task_runner_->PostTask(FROM_HERE, immediate_do_work_closure_); in ScheduleWork()
116 task_runner_->PostDelayedTask( in SetNextDelayedDoWork()
121 return task_runner_->RunsTasksInCurrentSequence(); in RunsTasksInCurrentSequence()
199 task_runner_->PostTask(FROM_HERE, immediate_do_work_closure_); in DoWork()
208 task_runner_->PostDelayedTask( in DoWork()
245 task_runner_->PostTask(FROM_HERE, immediate_do_work_closure_); in OnBeginNestedRunLoop()
/external/libchrome/ipc/
Dipc_channel_mojo.cc119 : task_runner_(ipc_task_runner), in ChannelMojo()
129 DCHECK(task_runner_->RunsTasksInCurrentSequence()); in ForwardMessageFromThreadSafePtr()
139 DCHECK(task_runner_->RunsTasksInCurrentSequence()); in ForwardMessageWithResponderFromThreadSafePtr()
147 DCHECK(task_runner_->RunsTasksInCurrentSequence()); in ~ChannelMojo()
152 DCHECK(task_runner_->RunsTasksInCurrentSequence()); in Connect()
193 DCHECK(task_runner_); in OnPipeError()
194 if (task_runner_->RunsTasksInCurrentSequence()) { in OnPipeError()
197 task_runner_->PostTask(FROM_HERE, in OnPipeError()
248 task_runner_, in CreateThreadSafeChannel()
Dipc_mojo_bootstrap.cc102 : task_runner_(ipc_task_runner), in ChannelAssociatedGroupController()
125 DCHECK(task_runner_->BelongsToCurrentThread()); in Bind()
129 task_runner_)); in Bind()
444 return task_runner_.get(); in task_runner()
459 task_runner_ = std::move(runner); in AttachClient()
466 DCHECK(task_runner_->RunsTasksInCurrentSequence()); in DetachClient()
469 task_runner_ = nullptr; in DetachClient()
500 DCHECK(task_runner_->RunsTasksInCurrentSequence()); in SendMessage()
506 DCHECK(task_runner_->RunsTasksInCurrentSequence()); in AllowWokenUpBySyncWatchOnSameThread()
513 DCHECK(task_runner_->RunsTasksInCurrentSequence()); in SyncWatch()
[all …]

12345