Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(202)

Issue 500118: Fix cpu/memory measurements on OS X. (Closed)

Created:
11 years ago by Nico
Modified:
4 years, 7 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

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. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=34994

Patch Set 1 #

Patch Set 2 : foobar #

Total comments: 22
Unified diffs Side-by-side diffs Delta from patch set Stats (+225 lines, -64 lines) Patch
M base/process_util.h View 4 chunks +32 lines, -0 lines 6 comments Download
M base/process_util_mac.mm View 1 2 chunks +131 lines, -7 lines 16 comments Download
M base/process_util_posix.cc View 2 chunks +20 lines, -47 lines 0 comments Download
M base/trace_event.cc View 1 chunk +7 lines, -0 lines 0 comments Download
M chrome/browser/safe_browsing/safe_browsing_database_unittest.cc View 1 chunk +5 lines, -0 lines 0 comments Download
M chrome/browser/task_manager.cc View 2 chunks +10 lines, -3 lines 0 comments Download
M chrome/common/mach_ipc_mac.h View 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/common/mach_ipc_mac.mm View 1 chunk +4 lines, -4 lines 0 comments Download
M chrome/test/chrome_process_util.h View 1 chunk +6 lines, -1 line 0 comments Download
M webkit/glue/webkitclient_impl.cc View 1 chunk +7 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (1 generated)
Nico
First actual CL for the task manager data stuff. No IPC in this CL :-) ...
11 years ago (2009-12-17 23:29:27 UTC) #1
Avi (use Gerrit)
Looks plausible but I don't know enough Mach to say yes or no.
11 years ago (2009-12-18 19:34:14 UTC) #2
Nico
Trung, Mark says you're into Mach.
11 years ago (2009-12-18 20:37:40 UTC) #3
Mark Mentovai
lgo http://codereview.chromium.org/500118/diff/3001/3002 File base/process_util.h (right): http://codereview.chromium.org/500118/diff/3001/3002#newcode372 base/process_util.h:372: // Should return the mach task for |process| ...
11 years ago (2009-12-18 22:18:24 UTC) #4
Nico
Thanks; submitting. http://codereview.chromium.org/500118/diff/3001/3002 File base/process_util.h (right): http://codereview.chromium.org/500118/diff/3001/3002#newcode372 base/process_util.h:372: // Should return the mach task for ...
11 years ago (2009-12-18 22:46:52 UTC) #5
kexinli365
4 years, 7 months ago (2016-05-08 01:09:32 UTC) #7
Message was sent while issue was closed.
https://codereview.chromium.org/500118/diff/3001/base/process_util_mac.mm
File base/process_util_mac.mm (right):

https://codereview.chromium.org/500118/diff/3001/base/process_util_mac.mm#new...
base/process_util_mac.mm:188: // call. Child processes ipc their port, so return
something if available, else
On 2009/12/18 22:18:24, Mark Mentovai wrote:
> When speaking English, "otherwise" is friendlier than "else."

Acknowledged.

https://codereview.chromium.org/500118/diff/3001/base/process_util_mac.mm#new...
base/process_util_mac.mm:218: kern_return_t kr = task_info(task,
On 2009/12/18 22:18:24, Mark Mentovai wrote:
> Refactor into a common function to populate a task_basic_info_64, and share
that
> function between GetPageFileUsage, GetWorkingSetSize, and maybe other things
> that I haven't gotten to yet.

Done.

Powered by Google App Engine
This is Rietveld 408576698