From 3740cb9b54f6a5d28c3501b650b7c179101568eb Mon Sep 17 00:00:00 2001 From: "viettrungluu@chromium.org" Date: Sat, 19 Dec 2009 04:50:04 +0000 Subject: Revert 35025 - Revert 34994, maybe it regressed startup perf Fix cpu/memory measurements on OS X. Right now, this only works for the current process; support for child processes will be added in a later CL. BUG=13156,25454 TEST=Hook up task manager (connect menu item to commandDispatch:, give it the right tag). Stats for the browser process should now be right, and %cpu should be 0 (for now) for all other processes. Review URL: http://codereview.chromium.org/500118 TBR=thakis@chromium.org Review URL: http://codereview.chromium.org/504068 TBR=thakis@chromium.org Review URL: http://codereview.chromium.org/505056 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35043 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/safe_browsing/safe_browsing_database_unittest.cc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'chrome/browser/safe_browsing') diff --git a/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc b/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc index 3d244c0..30f9de4 100644 --- a/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc +++ b/chrome/browser/safe_browsing/safe_browsing_database_unittest.cc @@ -1078,7 +1078,12 @@ void PeformUpdate(const std::wstring& initial_db, Time before_time = Time::Now(); base::ProcessHandle handle = base::Process::Current().handle(); scoped_ptr metric( +#if !defined(OS_MACOSX) base::ProcessMetrics::CreateProcessMetrics(handle)); +#else + // Getting stats only for the current process is enough, so NULL is fine. + base::ProcessMetrics::CreateProcessMetrics(handle, NULL)); +#endif CHECK(metric->GetIOCounters(&before)); std::vector lists; -- cgit v1.1