Home | History | Annotate | Download | only in base

Lines Matching full:threaddata

31 // When ThreadData is first initialized, should we start in an ACTIVE state to
37 const ThreadData::Status kInitialStartupState = ThreadData::PROFILING_ACTIVE;
40 // the ThreadData class. This compile time flag should be set to true if we
63 // ThreadData::EnableProfilerTiming, say, based on a field trial.
206 // ThreadData::SnapshotExecutedTasks doesn't send deltas with 0 count.
252 const ThreadData& current)
270 Births::Births(const Location& location, const ThreadData& current)
279 // ThreadData maintains the central data for all births and deaths on a single
287 NowFunction* ThreadData::now_function_ = NULL;
290 bool ThreadData::now_function_is_time_ = false;
292 // A TLS slot which points to the ThreadData instance for the current thread.
296 base::ThreadLocalStorage::StaticSlot ThreadData::tls_index_ = TLS_INITIALIZER;
299 int ThreadData::worker_thread_data_creation_count_ = 0;
302 int ThreadData::cleanup_count_ = 0;
305 int ThreadData::incarnation_counter_ = 0;
308 ThreadData* ThreadData::all_thread_data_list_head_ = NULL;
311 ThreadData* ThreadData::first_retired_worker_ = NULL;
315 ThreadData::list_lock_ = LAZY_INSTANCE_INITIALIZER;
318 base::subtle::Atomic32 ThreadData::status_ = ThreadData::UNINITIALIZED;
320 ThreadData::ThreadData(const std::string& suggested_name)
331 ThreadData::ThreadData(int thread_number)
342 ThreadData::~ThreadData() {
345 void ThreadData::PushToHeadOfList() {
350 random_number_ += static_cast<uint32_t>(this - static_cast<ThreadData*>(0));
361 ThreadData* ThreadData::first() {
366 ThreadData* ThreadData::next() const { return next_; }
369 void ThreadData::InitializeThreadContext(const std::string& suggested_name) {
371 ThreadData* current_thread_data =
372 reinterpret_cast<ThreadData*>(tls_index_.Get());
375 current_thread_data = new ThreadData(suggested_name);
380 ThreadData* ThreadData::Get() {
383 ThreadData* registered = reinterpret_cast<ThreadData*>(tls_index_.Get());
388 ThreadData* worker_thread_data = NULL;
404 worker_thread_data = new ThreadData(worker_thread_number);
413 void ThreadData::OnThreadTermination(void* thread_data) {
417 reinterpret_cast<ThreadData*>(thread_data)->OnThreadTerminationCleanup();
420 void ThreadData::OnThreadTerminationCleanup() {
425 return; // ThreadData was constructed in an earlier unit test.
433 DCHECK_EQ(this->next_retired_worker_, reinterpret_cast<ThreadData*>(NULL));
439 void ThreadData::Snapshot(int current_profiling_phase,
441 // Get an unchanging copy of a ThreadData list.
442 ThreadData* my_list = ThreadData::first();
451 for (ThreadData* thread_data = my_list; thread_data;
474 void ThreadData::OnProfilingPhaseCompleted(int profiling_phase) {
475 // Get an unchanging copy of a ThreadData list.
476 ThreadData* my_list = ThreadData::first();
483 for (ThreadData* thread_data = my_list; thread_data;
489 Births* ThreadData::TallyABirth(const Location& location) {
506 void ThreadData::TallyADeath(const Births& births,
540 Births* ThreadData::TallyABirthIfActive(const Location& location) {
543 ThreadData* current_thread_data = Get();
550 void ThreadData::TallyRunOnNamedThreadIfTracking(
559 ThreadData* current_thread_data = stopwatch.GetThreadData();
578 void ThreadData::TallyRunOnWorkerThreadIfTracking(
589 // one ThreadData instance that uses locks to protect *all* access. This will
597 ThreadData* current_thread_data = stopwatch.GetThreadData();
610 void ThreadData::TallyRunInAScopedRegionIfTracking(
619 ThreadData* current_thread_data = stopwatch.GetThreadData();
627 void ThreadData::SnapshotExecutedTasks(
664 void ThreadData::SnapshotMaps(int profiling_phase,
686 void ThreadData::OnProfilingPhaseCompletedOnThread(int profiling_phase) {
697 ThreadData::SetAlternateTimeSource(alternate_time_source);
700 void ThreadData::Initialize() {
724 tls_index_.Initialize(&ThreadData::OnThreadTermination);
743 void ThreadData::InitializeAndSetTrackingStatus(Status status) {
755 ThreadData::Status ThreadData::status() {
756 return static_cast<ThreadData::Status>(base::subtle::Acquire_Load(&status_));
760 bool ThreadData::TrackingStatus() {
765 void ThreadData::SetAlternateTimeSource(NowFunction* now_function) {
772 void ThreadData::EnableProfilerTiming() {
777 TrackedTime ThreadData::Now() {
786 void ThreadData::EnsureCleanupWasCalled(
802 void ThreadData::ShutdownSingleThreadedCleanup(bool leak) {
808 ThreadData* thread_data_list;
816 ThreadData* worker = first_retired_worker_;
834 ThreadData* thread_data = thread_data_list;
843 // Do actual recursive delete in all ThreadData instances.
845 ThreadData* next_thread_data = thread_data_list;
880 start_time_ = ThreadData::Now();
882 current_thread_data_ = ThreadData::Get();
898 const TrackedTime end_time = ThreadData::Now();
942 ThreadData* TaskStopwatch::GetThreadData() const {