diff options
author | Steve Block <steveblock@google.com> | 2011-10-13 11:22:45 +0100 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2011-10-19 16:03:08 +0100 |
commit | eaa86de4aa5278c05c8f4798a564a26ad2b1b0bc (patch) | |
tree | 914c88c1e5c17dce631969dd4d427f0188bd7801 /base | |
parent | 8d1e40fa83064d70b192f1b5aed95b8fc24e4cac (diff) | |
download | external_chromium-eaa86de4aa5278c05c8f4798a564a26ad2b1b0bc.zip external_chromium-eaa86de4aa5278c05c8f4798a564a26ad2b1b0bc.tar.gz external_chromium-eaa86de4aa5278c05c8f4798a564a26ad2b1b0bc.tar.bz2 |
Remove temporary debug logging
This is a cherry-pick of https://android-git.corp.google.com/g/#/c/141900,
which went into ics-mr0 only.
Bug: 5454995
Change-Id: I970b59f6da4890d0b89566ffa1909c33707f9506
Diffstat (limited to 'base')
-rw-r--r-- | base/synchronization/waitable_event_posix.cc | 9 | ||||
-rw-r--r-- | base/threading/thread.cc | 59 | ||||
-rw-r--r-- | base/threading/thread.h | 6 |
3 files changed, 0 insertions, 74 deletions
diff --git a/base/synchronization/waitable_event_posix.cc b/base/synchronization/waitable_event_posix.cc index 640026b..ae03ead 100644 --- a/base/synchronization/waitable_event_posix.cc +++ b/base/synchronization/waitable_event_posix.cc @@ -150,16 +150,7 @@ class SyncWaiter : public WaitableEvent::Waiter { }; bool WaitableEvent::Wait() { -#if defined(ANDROID) - // For debugging. See http://b/5244039 - bool result = TimedWait(TimeDelta::FromSeconds(-1)); - if (!result) { - LOG(INFO) << "TimedWait() with infinite timeout should never fail!"; - } - return result; -#else return TimedWait(TimeDelta::FromSeconds(-1)); -#endif } bool WaitableEvent::TimedWait(const TimeDelta& max_time) { diff --git a/base/threading/thread.cc b/base/threading/thread.cc index ea81644..7a100ca 100644 --- a/base/threading/thread.cc +++ b/base/threading/thread.cc @@ -53,10 +53,6 @@ Thread::Thread(const char* name) message_loop_(NULL), thread_id_(kInvalidThreadId), name_(name) { -#if defined(ANDROID) - // For debugging. See http://b/5244039 - is_starting_ = false; -#endif } Thread::~Thread() { @@ -64,33 +60,15 @@ Thread::~Thread() { } bool Thread::Start() { -#if defined(ANDROID) - // For debugging. See http://b/5244039 - LOG(INFO) << "Start(), this=" << this << ", name_=" << name_; -#endif return StartWithOptions(Options()); } bool Thread::StartWithOptions(const Options& options) { DCHECK(!message_loop_); -#if defined(ANDROID) - // For debugging. See http://b/5244039 - LOG(INFO) << "StartWithOptions(), this=" << this << ", name_=" << name_; - is_starting_lock_.Acquire(); - CHECK(!is_starting_); - is_starting_ = true; - is_starting_lock_.Release(); -#endif - SetThreadWasQuitProperly(false); StartupData startup_data(options); -#if defined(ANDROID) - // For debugging. See http://b/5244039 - LOG(INFO) << "StartWithOptions() created startup_data, this=" << this - << ", name_=" << name_; -#endif startup_data_ = &startup_data; if (!PlatformThread::Create(options.stack_size, this, &thread_)) { @@ -100,40 +78,17 @@ bool Thread::StartWithOptions(const Options& options) { } // Wait for the thread to start and initialize message_loop_ -#if defined(ANDROID) - // For debugging. See http://b/5244039 - LOG(INFO) << "StartWithOptions() waiting for thread to start, this=" << this - << ", name_=" << name_; -#endif startup_data.event.Wait(); // set it to NULL so we don't keep a pointer to some object on the stack. -#if defined(ANDROID) - // For debugging. See http://b/5244039 - LOG(INFO) << "StartWithOptions() clearing startup_data_, this=" << this - << ", name_=" << name_; - startup_data_ = reinterpret_cast<StartupData*>(0xbbadbeef); -#else startup_data_ = NULL; -#endif started_ = true; -#if defined(ANDROID) - // For debugging. See http://b/5244039 - is_starting_lock_.Acquire(); - is_starting_ = false; - is_starting_lock_.Release(); -#endif - DCHECK(message_loop_); return true; } void Thread::Stop() { -#if defined(ANDROID) - // For debugging. See http://b/5244039 - LOG(INFO) << "Stop(), this=" << this << ", name_=" << name_; -#endif if (!thread_was_started()) return; @@ -153,10 +108,6 @@ void Thread::Stop() { started_ = false; stopping_ = false; -#if defined(ANDROID) - // For debugging. See http://b/5244039 - LOG(INFO) << "Stop() done, this=" << this << ", name_=" << name_; -#endif } void Thread::StopSoon() { @@ -191,11 +142,6 @@ bool Thread::GetThreadWasQuitProperly() { void Thread::ThreadMain() { { -#if defined(ANDROID) - // For debugging. See http://b/5244039 - LOG(INFO) << "ThreadMain() starting, this=" << this - << ", name_=" << name_; -#endif // The message loop for this thread. MessageLoop message_loop(startup_data_->options.message_loop_type); @@ -211,11 +157,6 @@ void Thread::ThreadMain() { // Let's do this before signaling we are started. Init(); -#if defined(ANDROID) - // For debugging. See http://b/5244039 - LOG(INFO) << "ThreadMain() signalling, this=" << this - << ", name_=" << name_; -#endif startup_data_->event.Signal(); // startup_data_ can't be touched anymore since the starting thread is now // unlocked. diff --git a/base/threading/thread.h b/base/threading/thread.h index c3516e7..034cb7d 100644 --- a/base/threading/thread.h +++ b/base/threading/thread.h @@ -185,12 +185,6 @@ class BASE_API Thread : PlatformThread::Delegate { // The name of the thread. Used for debugging purposes. std::string name_; -#if defined(ANDROID) - // For debugging. See http://b/5244039 - Lock is_starting_lock_; - bool is_starting_; -#endif - friend class ThreadQuitTask; DISALLOW_COPY_AND_ASSIGN(Thread); |