diff options
author | Steve Block <steveblock@google.com> | 2011-10-19 09:42:43 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-10-19 09:42:43 -0700 |
commit | a9e4cb016c4bc9a182b5da4f5662c36e14b689f4 (patch) | |
tree | 914c88c1e5c17dce631969dd4d427f0188bd7801 | |
parent | 9914abdf90c42a1729fcf3113a1150a928945f37 (diff) | |
parent | eaa86de4aa5278c05c8f4798a564a26ad2b1b0bc (diff) | |
download | external_chromium-a9e4cb016c4bc9a182b5da4f5662c36e14b689f4.zip external_chromium-a9e4cb016c4bc9a182b5da4f5662c36e14b689f4.tar.gz external_chromium-a9e4cb016c4bc9a182b5da4f5662c36e14b689f4.tar.bz2 |
am eaa86de4: Remove temporary debug logging
* commit 'eaa86de4aa5278c05c8f4798a564a26ad2b1b0bc':
Remove temporary debug logging
-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); |