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

Issue 1580813003: Use atomic operations to increment/decrement memory usage counts as multiple threads could be alloc… (Closed)

Created:
4 years, 11 months ago by siva
Modified:
4 years, 10 months ago
Reviewers:
Ivan Posva
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Base URL:
git@github.com:dart-lang/sdk.git@master
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Use atomic operations to increment/decrement memory usage counts as multiple threads could be allocating at the same time. Committed: https://github.com/dart-lang/sdk/commit/7e05c6c1f0001290659fd874f26054167511a1ea

Patch Set 1 #

Patch Set 2 : self-code-review #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+108 lines, -17 lines) Patch
M runtime/vm/atomic.h View 1 chunk +4 lines, -2 lines 0 comments Download
M runtime/vm/atomic_android.h View 1 chunk +12 lines, -0 lines 0 comments Download
M runtime/vm/atomic_linux.h View 1 chunk +12 lines, -0 lines 0 comments Download
M runtime/vm/atomic_macos.h View 1 chunk +12 lines, -0 lines 0 comments Download
M runtime/vm/atomic_test.cc View 1 1 chunk +16 lines, -0 lines 0 comments Download
M runtime/vm/atomic_win.h View 2 chunks +32 lines, -0 lines 0 comments Download
M runtime/vm/pages.cc View 7 chunks +20 lines, -15 lines 2 comments Download

Messages

Total messages: 6 (2 generated)
siva
4 years, 11 months ago (2016-01-13 00:31:40 UTC) #2
Ivan Posva
LGTMwC -Ivan https://codereview.chromium.org/1580813003/diff/20001/runtime/vm/pages.cc File runtime/vm/pages.cc (right): https://codereview.chromium.org/1580813003/diff/20001/runtime/vm/pages.cc#newcode385 runtime/vm/pages.cc:385: AtomicOperations::FetchAndIncrementBy(&(usage_.used_in_words), I am wondering whether we could ...
4 years, 10 months ago (2016-01-29 18:54:07 UTC) #3
siva
Committed patchset #2 (id:20001) manually as 7e05c6c1f0001290659fd874f26054167511a1ea (presubmit successful).
4 years, 10 months ago (2016-01-29 20:46:25 UTC) #5
siva
4 years, 10 months ago (2016-01-29 20:52:17 UTC) #6
Message was sent while issue was closed.
https://codereview.chromium.org/1580813003/diff/20001/runtime/vm/pages.cc
File runtime/vm/pages.cc (right):

https://codereview.chromium.org/1580813003/diff/20001/runtime/vm/pages.cc#new...
runtime/vm/pages.cc:385:
AtomicOperations::FetchAndIncrementBy(&(usage_.used_in_words),
On 2016/01/29 18:54:07, Ivan Posva wrote:
> I am wondering whether we could make this a per thread value that is synced
only
> occasionally.

Yes, we could do that, I will do it in a new CL.

Powered by Google App Engine
This is Rietveld 408576698