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

Issue 12869: Implement GetCPUUsage; it was causing link errors because of its absence on t... (Closed)

Created:
12 years ago by Avi (use Gerrit)
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Implement GetCPUUsage; it was causing link errors because of its absence on the Mac, so we'll implement it for everyone. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=6221

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+53 lines, -5 lines) Patch
M base/process_util_linux.cc View 1 chunk +0 lines, -5 lines 0 comments Download
M base/process_util_posix.cc View 2 chunks +53 lines, -0 lines 5 comments Download

Messages

Total messages: 3 (0 generated)
Avi (use Gerrit)
Dan-- This should fix things.
12 years ago (2008-12-02 16:01:06 UTC) #1
pink (ping after 24hrs)
http://codereview.chromium.org/12869/diff/1/2 File base/process_util_posix.cc (right): http://codereview.chromium.org/12869/diff/1/2#newcode63 Line 63: int retval; declare retval where it's initialized or ...
12 years ago (2008-12-02 19:36:11 UTC) #2
Avi (use Gerrit)
12 years ago (2008-12-02 19:40:31 UTC) #3
http://codereview.chromium.org/12869/diff/1/2
File base/process_util_posix.cc (right):

http://codereview.chromium.org/12869/diff/1/2#newcode76
Line 76: processor_count_;
On 2008/12/02 19:36:11, pink wrote:
> does |processor_count_| get scaled to an int64 or do the other values get
scaled
> down to 32bits? just making sure.

I'm pretty sure int64/int32 causes the int32 to be promoted.

http://codereview.chromium.org/12869/diff/1/2#newcode79
Line 79: if ((last_system_time_ == 0) || (last_time_ == 0)) {
On 2008/12/02 19:36:11, pink wrote:
> don't need the extra parens, but not a biggie.

Straight from the Windows code.

Powered by Google App Engine
This is Rietveld 408576698