diff options
author | jar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-07 20:27:08 +0000 |
---|---|---|
committer | jar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-02-07 20:27:08 +0000 |
commit | 24f1756baceb15fec9b84482bf3ea69718d4760b (patch) | |
tree | f407096520964d4867fed4ec7f02c64c87a92be3 | |
parent | cf20483084539712d2898cd43dbec7247ea15f38 (diff) | |
download | chromium_src-24f1756baceb15fec9b84482bf3ea69718d4760b.zip chromium_src-24f1756baceb15fec9b84482bf3ea69718d4760b.tar.gz chromium_src-24f1756baceb15fec9b84482bf3ea69718d4760b.tar.bz2 |
Revert 120789 - Propogate status setting for profiler to track parents
[There is a TSAN race report... so I'm reverting]
This allows child processes to track ancestry, and report
it to the browser process.
Parent tracking is only turned on based on an
environment variable.
r=rtenneti
Review URL: https://chromiumcodereview.appspot.com/9181002
TBR=jar@chromium.org
Review URL: https://chromiumcodereview.appspot.com/9348028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@120818 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | base/profiler/tracked_time_unittest.cc | 7 | ||||
-rw-r--r-- | base/tracked_objects.cc | 31 | ||||
-rw-r--r-- | base/tracked_objects.h | 10 | ||||
-rw-r--r-- | base/tracked_objects_unittest.cc | 49 | ||||
-rw-r--r-- | chrome/browser/chrome_browser_main.cc | 10 | ||||
-rw-r--r-- | content/browser/profiler_controller_impl.cc | 14 | ||||
-rw-r--r-- | content/browser/profiler_controller_impl.h | 9 | ||||
-rw-r--r-- | content/browser/profiler_message_filter.cc | 7 | ||||
-rw-r--r-- | content/browser/renderer_host/render_process_host_impl.cc | 5 | ||||
-rw-r--r-- | content/common/child_process_messages.h | 7 | ||||
-rw-r--r-- | content/common/child_thread.cc | 7 | ||||
-rw-r--r-- | content/common/child_thread.h | 5 | ||||
-rw-r--r-- | content/public/browser/profiler_controller.h | 7 |
13 files changed, 64 insertions, 104 deletions
diff --git a/base/profiler/tracked_time_unittest.cc b/base/profiler/tracked_time_unittest.cc index b85411d..6491a2f 100644 --- a/base/profiler/tracked_time_unittest.cc +++ b/base/profiler/tracked_time_unittest.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -76,7 +76,7 @@ TEST(TrackedTimeTest, TrackedTimerVsTimeTicks) { TEST(TrackedTimeTest, TrackedTimerDisabled) { // Check to be sure disabling the collection of data induces a null time // (which we know will return much faster). - if (!ThreadData::InitializeAndSetTrackingStatus(ThreadData::DEACTIVATED)) + if (!ThreadData::InitializeAndSetTrackingStatus(false)) return; // Since we disabled tracking, we should get a null response. TrackedTime track_now = ThreadData::Now(); @@ -88,8 +88,7 @@ TEST(TrackedTimeTest, TrackedTimerDisabled) { } TEST(TrackedTimeTest, TrackedTimerEnabled) { - if (!ThreadData::InitializeAndSetTrackingStatus( - ThreadData::PROFILING_CHILDREN_ACTIVE)) + if (!ThreadData::InitializeAndSetTrackingStatus(true)) return; // Make sure that when we enable tracking, we get a real timer result. diff --git a/base/tracked_objects.cc b/base/tracked_objects.cc index 87af8dc..e7d7bd1 100644 --- a/base/tracked_objects.cc +++ b/base/tracked_objects.cc @@ -393,7 +393,7 @@ Births* ThreadData::TallyABirthIfActive(const Location& location) { if (!kTrackAllTaskObjects) return NULL; // Not compiled in. - if (!TrackingStatus()) + if (!tracking_status()) return NULL; ThreadData* current_thread_data = Get(); if (!current_thread_data) @@ -622,31 +622,28 @@ bool ThreadData::Initialize() { } // static -bool ThreadData::InitializeAndSetTrackingStatus(Status status) { - DCHECK_GE(status, DEACTIVATED); - DCHECK_LE(status, PROFILING_CHILDREN_ACTIVE); - +bool ThreadData::InitializeAndSetTrackingStatus(bool status) { if (!Initialize()) // No-op if already initialized. return false; // Not compiled in. - if (!kTrackParentChildLinks && status > DEACTIVATED) - status = PROFILING_ACTIVE; - status_ = status; + if (!status) { + status_ = DEACTIVATED; + } else { + if (kTrackParentChildLinks) + status_ = PROFILING_CHILDREN_ACTIVE; + else + status_ = PROFILING_ACTIVE; + } return true; } // static -ThreadData::Status ThreadData::status() { - return status_; -} - -// static -bool ThreadData::TrackingStatus() { +bool ThreadData::tracking_status() { return status_ > DEACTIVATED; } // static -bool ThreadData::TrackingParentChildStatus() { +bool ThreadData::tracking_parent_child_status() { return status_ >= PROFILING_CHILDREN_ACTIVE; } @@ -667,7 +664,7 @@ TrackedTime ThreadData::NowForEndOfRun() { // static TrackedTime ThreadData::Now() { - if (kTrackAllTaskObjects && TrackingStatus()) + if (kTrackAllTaskObjects && tracking_status()) return TrackedTime::Now(); return TrackedTime(); // Super fast when disabled, or not compiled. } @@ -689,7 +686,7 @@ void ThreadData::ShutdownSingleThreadedCleanup(bool leak) { // This is only called from test code, where we need to cleanup so that // additional tests can be run. // We must be single threaded... but be careful anyway. - if (!InitializeAndSetTrackingStatus(DEACTIVATED)) + if (!InitializeAndSetTrackingStatus(false)) return; ThreadData* thread_data_list; { diff --git a/base/tracked_objects.h b/base/tracked_objects.h index c0674cc..9b7f111 100644 --- a/base/tracked_objects.h +++ b/base/tracked_objects.h @@ -442,17 +442,15 @@ class BASE_EXPORT ThreadData { // PROFILING_ACTIVE (i.e., it can't be set to a higher level than what is // compiled into the binary, and parent-child tracking at the // PROFILING_CHILDREN_ACTIVE level might not be compiled in). - static bool InitializeAndSetTrackingStatus(Status status); - - static Status status(); + static bool InitializeAndSetTrackingStatus(bool status); // Indicate if any sort of profiling is being done (i.e., we are more than // DEACTIVATED). - static bool TrackingStatus(); + static bool tracking_status(); // For testing only, indicate if the status of parent-child tracking is turned - // on. This is currently a compiled option, atop TrackingStatus(). - static bool TrackingParentChildStatus(); + // on. This is currently a compiled option, atop tracking_status(). + static bool tracking_parent_child_status(); // Special versions of Now() for getting times at start and end of a tracked // run. They are super fast when tracking is disabled, and have some internal diff --git a/base/tracked_objects_unittest.cc b/base/tracked_objects_unittest.cc index d57ddee..68911bb 100644 --- a/base/tracked_objects_unittest.cc +++ b/base/tracked_objects_unittest.cc @@ -35,8 +35,7 @@ class TrackedObjectsTest : public testing::Test { TEST_F(TrackedObjectsTest, MinimalStartupShutdown) { // Minimal test doesn't even create any tasks. - if (!ThreadData::InitializeAndSetTrackingStatus( - ThreadData::PROFILING_CHILDREN_ACTIVE)) + if (!ThreadData::InitializeAndSetTrackingStatus(true)) return; EXPECT_FALSE(ThreadData::first()); // No activity even on this thread. @@ -56,8 +55,7 @@ TEST_F(TrackedObjectsTest, MinimalStartupShutdown) { ShutdownSingleThreadedCleanup(false); // Do it again, just to be sure we reset state completely. - ThreadData::InitializeAndSetTrackingStatus( - ThreadData::PROFILING_CHILDREN_ACTIVE); + ThreadData::InitializeAndSetTrackingStatus(true); EXPECT_FALSE(ThreadData::first()); // No activity even on this thread. data = ThreadData::Get(); EXPECT_TRUE(ThreadData::first()); // Now class was constructed. @@ -73,8 +71,7 @@ TEST_F(TrackedObjectsTest, MinimalStartupShutdown) { } TEST_F(TrackedObjectsTest, TinyStartupShutdown) { - if (!ThreadData::InitializeAndSetTrackingStatus( - ThreadData::PROFILING_CHILDREN_ACTIVE)) + if (!ThreadData::InitializeAndSetTrackingStatus(true)) return; // Instigate tracking on a single tracked object, on our thread. @@ -116,7 +113,7 @@ TEST_F(TrackedObjectsTest, TinyStartupShutdown) { EXPECT_EQ(2, birth_map.begin()->second->birth_count()); // 2 births. EXPECT_EQ(1u, death_map.size()); // 1 location. EXPECT_EQ(1, death_map.begin()->second.count()); // 1 death. - if (ThreadData::TrackingParentChildStatus()) { + if (ThreadData::tracking_parent_child_status()) { EXPECT_EQ(1u, parent_child_set.size()); // 1 child. EXPECT_EQ(parent_child_set.begin()->first, parent_child_set.begin()->second); @@ -129,10 +126,9 @@ TEST_F(TrackedObjectsTest, TinyStartupShutdown) { } TEST_F(TrackedObjectsTest, ParentChildTest) { - if (!ThreadData::InitializeAndSetTrackingStatus( - ThreadData::PROFILING_CHILDREN_ACTIVE)) + if (!ThreadData::InitializeAndSetTrackingStatus(true)) return; - if (!ThreadData::TrackingParentChildStatus()) + if (!ThreadData::tracking_parent_child_status()) return; // Feature not compiled in. // Instigate tracking on a single tracked object, on our thread. @@ -215,8 +211,7 @@ TEST_F(TrackedObjectsTest, ParentChildTest) { } TEST_F(TrackedObjectsTest, DeathDataTest) { - if (!ThreadData::InitializeAndSetTrackingStatus( - ThreadData::PROFILING_CHILDREN_ACTIVE)) + if (!ThreadData::InitializeAndSetTrackingStatus(true)) return; scoped_ptr<DeathData> data(new DeathData()); @@ -275,7 +270,7 @@ TEST_F(TrackedObjectsTest, DeathDataTest) { TEST_F(TrackedObjectsTest, DeactivatedBirthOnlyToValueWorkerThread) { // Transition to Deactivated state before doing anything. - if (!ThreadData::InitializeAndSetTrackingStatus(ThreadData::DEACTIVATED)) + if (!ThreadData::InitializeAndSetTrackingStatus(false)) return; // We don't initialize system with a thread name, so we're viewed as a worker // thread. @@ -301,7 +296,7 @@ TEST_F(TrackedObjectsTest, DeactivatedBirthOnlyToValueWorkerThread) { TEST_F(TrackedObjectsTest, DeactivatedBirthOnlyToValueMainThread) { // Start in the deactivated state. - if (!ThreadData::InitializeAndSetTrackingStatus(ThreadData::DEACTIVATED)) + if (!ThreadData::InitializeAndSetTrackingStatus(false)) return; // Use a well named thread. @@ -328,8 +323,7 @@ TEST_F(TrackedObjectsTest, DeactivatedBirthOnlyToValueMainThread) { } TEST_F(TrackedObjectsTest, BirthOnlyToValueWorkerThread) { - if (!ThreadData::InitializeAndSetTrackingStatus( - ThreadData::PROFILING_CHILDREN_ACTIVE)) + if (!ThreadData::InitializeAndSetTrackingStatus(true)) return; // We don't initialize system with a thread name, so we're viewed as a worker // thread. @@ -371,8 +365,7 @@ TEST_F(TrackedObjectsTest, BirthOnlyToValueWorkerThread) { } TEST_F(TrackedObjectsTest, BirthOnlyToValueMainThread) { - if (!ThreadData::InitializeAndSetTrackingStatus( - ThreadData::PROFILING_CHILDREN_ACTIVE)) + if (!ThreadData::InitializeAndSetTrackingStatus(true)) return; // Use a well named thread. @@ -416,8 +409,7 @@ TEST_F(TrackedObjectsTest, BirthOnlyToValueMainThread) { } TEST_F(TrackedObjectsTest, LifeCycleToValueMainThread) { - if (!ThreadData::InitializeAndSetTrackingStatus( - ThreadData::PROFILING_CHILDREN_ACTIVE)) + if (!ThreadData::InitializeAndSetTrackingStatus(true)) return; // Use a well named thread. @@ -478,8 +470,7 @@ TEST_F(TrackedObjectsTest, LifeCycleToValueMainThread) { // our tallied births are matched by tallied deaths (except for when the // task is still running, or is queued). TEST_F(TrackedObjectsTest, LifeCycleMidDeactivatedToValueMainThread) { - if (!ThreadData::InitializeAndSetTrackingStatus( - ThreadData::PROFILING_CHILDREN_ACTIVE)) + if (!ThreadData::InitializeAndSetTrackingStatus(true)) return; // Use a well named thread. @@ -500,8 +491,7 @@ TEST_F(TrackedObjectsTest, LifeCycleMidDeactivatedToValueMainThread) { pending_task.time_posted = kTimePosted; // Overwrite implied Now(). // Turn off tracking now that we have births. - EXPECT_TRUE(ThreadData::InitializeAndSetTrackingStatus( - ThreadData::DEACTIVATED)); + EXPECT_TRUE(ThreadData::InitializeAndSetTrackingStatus(false)); const TrackedTime kStartOfRun = TrackedTime() + Duration::FromMilliseconds(5); @@ -542,7 +532,7 @@ TEST_F(TrackedObjectsTest, LifeCycleMidDeactivatedToValueMainThread) { // We will deactivate tracking before starting a life cycle, and neither // the birth nor the death will be recorded. TEST_F(TrackedObjectsTest, LifeCyclePreDeactivatedToValueMainThread) { - if (!ThreadData::InitializeAndSetTrackingStatus(ThreadData::DEACTIVATED)) + if (!ThreadData::InitializeAndSetTrackingStatus(false)) return; // Use a well named thread. @@ -581,8 +571,7 @@ TEST_F(TrackedObjectsTest, LifeCyclePreDeactivatedToValueMainThread) { } TEST_F(TrackedObjectsTest, LifeCycleToValueWorkerThread) { - if (!ThreadData::InitializeAndSetTrackingStatus( - ThreadData::PROFILING_CHILDREN_ACTIVE)) + if (!ThreadData::InitializeAndSetTrackingStatus(true)) return; // Don't initialize thread, so that we appear as a worker thread. @@ -673,8 +662,7 @@ TEST_F(TrackedObjectsTest, LifeCycleToValueWorkerThread) { } TEST_F(TrackedObjectsTest, TwoLives) { - if (!ThreadData::InitializeAndSetTrackingStatus( - ThreadData::PROFILING_CHILDREN_ACTIVE)) + if (!ThreadData::InitializeAndSetTrackingStatus(true)) return; // Use a well named thread. @@ -739,8 +727,7 @@ TEST_F(TrackedObjectsTest, TwoLives) { } TEST_F(TrackedObjectsTest, DifferentLives) { - if (!ThreadData::InitializeAndSetTrackingStatus( - ThreadData::PROFILING_CHILDREN_ACTIVE)) + if (!ThreadData::InitializeAndSetTrackingStatus(true)) return; // Use a well named thread. diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc index 867414b..85aa36b 100644 --- a/chrome/browser/chrome_browser_main.cc +++ b/chrome/browser/chrome_browser_main.cc @@ -1147,19 +1147,13 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { browser_process_.reset(new BrowserProcessImpl(parsed_command_line())); } - // Default to basic profiling (no parent child support). - tracked_objects::ThreadData::Status status = - tracked_objects::ThreadData::PROFILING_ACTIVE; if (parsed_command_line().HasSwitch(switches::kEnableProfiling)) { // User wants to override default tracking status. std::string flag = parsed_command_line().GetSwitchValueASCII(switches::kEnableProfiling); - if (flag.compare("0") != 0) - status = tracked_objects::ThreadData::DEACTIVATED; - else if (flag.compare("child") != 0) - status = tracked_objects::ThreadData::PROFILING_CHILDREN_ACTIVE; + bool enabled = flag.compare("0") != 0; + tracked_objects::ThreadData::InitializeAndSetTrackingStatus(enabled); } - tracked_objects::ThreadData::InitializeAndSetTrackingStatus(status); // This forces the TabCloseableStateWatcher to be created and, on chromeos, // register for the notifications it needs to track the closeable state of diff --git a/content/browser/profiler_controller_impl.cc b/content/browser/profiler_controller_impl.cc index b3e40e8..1954da8 100644 --- a/content/browser/profiler_controller_impl.cc +++ b/content/browser/profiler_controller_impl.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -121,16 +121,14 @@ void ProfilerControllerImpl::GetProfilerData(int sequence_number) { sequence_number)); } -void ProfilerControllerImpl::SetProfilerStatusInChildProcesses( - tracked_objects::ThreadData::Status status) { +void ProfilerControllerImpl::SetProfilerStatusInChildProcesses(bool enable) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); for (BrowserChildProcessHostIterator iter; !iter.Done(); ++iter) - iter.Send(new ChildProcessMsg_SetProfilerStatus(status)); + iter.Send(new ChildProcessMsg_SetProfilerStatus(enable)); } -void ProfilerControllerImpl::SetProfilerStatus( - tracked_objects::ThreadData::Status status) { +void ProfilerControllerImpl::SetProfilerStatus(bool enable) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); BrowserThread::PostTask( @@ -138,12 +136,12 @@ void ProfilerControllerImpl::SetProfilerStatus( FROM_HERE, base::Bind(&ProfilerControllerImpl::SetProfilerStatusInChildProcesses, base::Unretained(this), - status)); + enable)); for (content::RenderProcessHost::iterator it( content::RenderProcessHost::AllHostsIterator()); !it.IsAtEnd(); it.Advance()) { - it.GetCurrentValue()->Send(new ChildProcessMsg_SetProfilerStatus(status)); + it.GetCurrentValue()->Send(new ChildProcessMsg_SetProfilerStatus(enable)); } } } // namespace content diff --git a/content/browser/profiler_controller_impl.h b/content/browser/profiler_controller_impl.h index ff361ea..eca522a 100644 --- a/content/browser/profiler_controller_impl.h +++ b/content/browser/profiler_controller_impl.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -6,7 +6,6 @@ #define CONTENT_BROWSER_PROFILER_CONTROLLER_IMPL_H_ #include "base/memory/singleton.h" -#include "base/tracked_objects.h" #include "content/common/content_export.h" #include "content/public/browser/profiler_controller.h" @@ -35,8 +34,7 @@ class CONTENT_EXPORT ProfilerControllerImpl : public ProfilerController { virtual void Register(ProfilerSubscriber* subscriber) OVERRIDE; virtual void Unregister(ProfilerSubscriber* subscriber) OVERRIDE; virtual void GetProfilerData(int sequence_number) OVERRIDE; - virtual void SetProfilerStatus( - tracked_objects::ThreadData::Status status) OVERRIDE; + virtual void SetProfilerStatus(bool enable) OVERRIDE; private: friend struct DefaultSingletonTraits<ProfilerControllerImpl>; @@ -45,8 +43,7 @@ class CONTENT_EXPORT ProfilerControllerImpl : public ProfilerController { void GetProfilerDataFromChildProcesses(int sequence_number); // Contact child processes and set profiler status to |enable|. - void SetProfilerStatusInChildProcesses( - tracked_objects::ThreadData::Status status); + void SetProfilerStatusInChildProcesses(bool enable); ProfilerSubscriber* subscriber_; diff --git a/content/browser/profiler_message_filter.cc b/content/browser/profiler_message_filter.cc index e0f5979..7df676e 100644 --- a/content/browser/profiler_message_filter.cc +++ b/content/browser/profiler_message_filter.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -21,9 +21,8 @@ ProfilerMessageFilter::~ProfilerMessageFilter() { void ProfilerMessageFilter::OnChannelConnected(int32 peer_pid) { BrowserMessageFilter::OnChannelConnected(peer_pid); - tracked_objects::ThreadData::Status status = - tracked_objects::ThreadData::status(); - Send(new ChildProcessMsg_SetProfilerStatus(status)); + bool enable = tracked_objects::ThreadData::tracking_status(); + Send(new ChildProcessMsg_SetProfilerStatus(enable)); } bool ProfilerMessageFilter::OnMessageReceived(const IPC::Message& message, diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc index adae16b..7e32b8d 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc @@ -909,9 +909,8 @@ void RenderProcessHostImpl::OnChannelConnected(int32 peer_pid) { IPC::Logging::GetInstance()->Enabled())); #endif - tracked_objects::ThreadData::Status status = - tracked_objects::ThreadData::status(); - Send(new ChildProcessMsg_SetProfilerStatus(status)); + bool enable = tracked_objects::ThreadData::tracking_status(); + Send(new ChildProcessMsg_SetProfilerStatus(enable)); } void RenderProcessHostImpl::OnChannelError() { diff --git a/content/common/child_process_messages.h b/content/common/child_process_messages.h index ab56be0..0e679b8 100644 --- a/content/common/child_process_messages.h +++ b/content/common/child_process_messages.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -6,14 +6,11 @@ // Multiply-included message file, hence no include guard. #include "base/shared_memory.h" -#include "base/tracked_objects.h" #include "base/values.h" #include "content/common/content_export.h" #include "googleurl/src/gurl.h" #include "ipc/ipc_message_macros.h" -IPC_ENUM_TRAITS(tracked_objects::ThreadData::Status) - #undef IPC_MESSAGE_EXPORT #define IPC_MESSAGE_EXPORT CONTENT_EXPORT @@ -44,7 +41,7 @@ IPC_MESSAGE_CONTROL0(ChildProcessMsg_GetTraceBufferPercentFull) // Tell the child process to enable or disable the profiler status. IPC_MESSAGE_CONTROL1(ChildProcessMsg_SetProfilerStatus, - tracked_objects::ThreadData::Status /* profiler status */) + bool /* profiler status */) // Send to all the child processes to send back profiler data (ThreadData in // tracked_objects). diff --git a/content/common/child_thread.cc b/content/common/child_thread.cc index 1514256..9152a44 100644 --- a/content/common/child_thread.cc +++ b/content/common/child_thread.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -218,9 +218,8 @@ void ChildThread::OnSetIPCLoggingEnabled(bool enable) { } #endif // IPC_MESSAGE_LOG_ENABLED -void ChildThread::OnSetProfilerStatus( - tracked_objects::ThreadData::Status status) { - tracked_objects::ThreadData::InitializeAndSetTrackingStatus(status); +void ChildThread::OnSetProfilerStatus(bool enable) { + tracked_objects::ThreadData::InitializeAndSetTrackingStatus(enable); } void ChildThread::OnGetChildProfilerData( diff --git a/content/common/child_thread.h b/content/common/child_thread.h index 4155a59..220985a 100644 --- a/content/common/child_thread.h +++ b/content/common/child_thread.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -9,7 +9,6 @@ #include "base/basictypes.h" #include "base/memory/scoped_ptr.h" #include "base/shared_memory.h" -#include "base/tracked_objects.h" #include "content/common/content_export.h" #include "content/common/message_router.h" #include "webkit/glue/resource_loader_bridge.h" @@ -93,7 +92,7 @@ class CONTENT_EXPORT ChildThread : public IPC::Channel::Listener, virtual void OnSetIPCLoggingEnabled(bool enable); #endif - virtual void OnSetProfilerStatus(tracked_objects::ThreadData::Status status); + virtual void OnSetProfilerStatus(bool enable); virtual void OnGetChildProfilerData(int sequence_number, const std::string& process_type); diff --git a/content/public/browser/profiler_controller.h b/content/public/browser/profiler_controller.h index dfa6a5d..0814581 100644 --- a/content/public/browser/profiler_controller.h +++ b/content/public/browser/profiler_controller.h @@ -1,4 +1,4 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -10,8 +10,6 @@ #include "content/common/content_export.h" -#include "base/tracked_objects.h" - namespace base { class DictionaryValue; } @@ -45,8 +43,7 @@ class CONTENT_EXPORT ProfilerController { virtual void GetProfilerData(int sequence_number) = 0; // Contact all processes and set profiler status to |enable|. - virtual void SetProfilerStatus( - tracked_objects::ThreadData::Status status) = 0; + virtual void SetProfilerStatus(bool enable) = 0; }; |