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

Issue 308683011: Use the intrinsic version of the Interlocked* functions. (Closed)

Created:
6 years, 6 months ago by Sébastien Marchand
Modified:
6 years, 6 months ago
CC:
chromium-reviews, erikwright+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Use the intrinsic version of the Interlocked* functions. This save us a system call and allows this code to be instrumented by the memory testing tools. BUG= Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=276701

Patch Set 1 : #

Total comments: 2

Patch Set 2 : #

Total comments: 4

Patch Set 3 : Remove the ifdefs x86|x64 #

Total comments: 4

Patch Set 4 : Remove the intrinsics declaration. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+5 lines, -3 lines) Patch
M base/atomicops_internals_x86_msvc.h View 1 2 3 4 chunks +5 lines, -3 lines 0 comments Download

Messages

Total messages: 30 (0 generated)
Sébastien Marchand
PTAL. Do you think that I should also use the intrinsic version of InterlockedExchange* (like ...
6 years, 6 months ago (2014-06-02 19:05:31 UTC) #1
Sigurður Ásgeirsson
nice - do you need to do this for the ia32 and the x64 #ifdef ...
6 years, 6 months ago (2014-06-02 19:43:08 UTC) #2
Sébastien Marchand
I've put this between ifdefs, it seems to work fine... I'll do more tests later. ...
6 years, 6 months ago (2014-06-03 14:39:48 UTC) #3
Sigurður Ásgeirsson
nice! https://codereview.chromium.org/308683011/diff/40001/base/atomicops_internals_x86_msvc.h File base/atomicops_internals_x86_msvc.h (right): https://codereview.chromium.org/308683011/diff/40001/base/atomicops_internals_x86_msvc.h#newcode29 base/atomicops_internals_x86_msvc.h:29: #pragma intrinsic(_InterlockedCompareExchange) Stupid question, but why do you ...
6 years, 6 months ago (2014-06-03 15:03:08 UTC) #4
Sébastien Marchand
After second thought I've removed the ifdefs x86|x64... I don't think that this is necessary ...
6 years, 6 months ago (2014-06-03 19:58:46 UTC) #5
Sigurður Ásgeirsson
missing upload?
6 years, 6 months ago (2014-06-04 14:48:35 UTC) #6
Sébastien Marchand
Yeah sorry, I've switched to another branch before uploading... I'll ping you once I've uploaded ...
6 years, 6 months ago (2014-06-04 14:49:44 UTC) #7
Sébastien Marchand
And here it is.
6 years, 6 months ago (2014-06-04 15:07:21 UTC) #8
Sigurður Ásgeirsson
nice, still more nits :) https://codereview.chromium.org/308683011/diff/60001/base/atomicops_internals_x86_msvc.h File base/atomicops_internals_x86_msvc.h (right): https://codereview.chromium.org/308683011/diff/60001/base/atomicops_internals_x86_msvc.h#newcode30 base/atomicops_internals_x86_msvc.h:30: #pragma intrinsic(_InterlockedCompareExchange) do you ...
6 years, 6 months ago (2014-06-04 15:12:54 UTC) #9
Sébastien Marchand
https://codereview.chromium.org/308683011/diff/60001/base/atomicops_internals_x86_msvc.h File base/atomicops_internals_x86_msvc.h (right): https://codereview.chromium.org/308683011/diff/60001/base/atomicops_internals_x86_msvc.h#newcode30 base/atomicops_internals_x86_msvc.h:30: #pragma intrinsic(_InterlockedCompareExchange) On 2014/06/04 15:12:54, Sigurður Ásgeirsson wrote: > ...
6 years, 6 months ago (2014-06-04 15:21:02 UTC) #10
Sébastien Marchand
nvm, we already enable it for the official builds (https://code.google.com/p/chromium/codesearch#chromium/src/build/internal/release_impl_official.gypi&q=EnableIntrinsicFunctions&sq=package:chromium&type=cs&l=10)
6 years, 6 months ago (2014-06-04 15:25:03 UTC) #11
Sigurður Ásgeirsson
Nice - is this also true for ASAN builds? On Wed, Jun 4, 2014 at ...
6 years, 6 months ago (2014-06-04 15:29:25 UTC) #12
Sébastien Marchand
Yeah, but he /Oi flag seems to only apply to the CRT functions , we ...
6 years, 6 months ago (2014-06-04 15:32:35 UTC) #13
Sigurður Ásgeirsson
I see no difference in the generated test code, whether I declare the intrinsic or ...
6 years, 6 months ago (2014-06-04 15:33:42 UTC) #14
Sébastien Marchand
Hum, Here's my test case: class Foo : public base::RefCountedThreadSafe<Foo> { int test; }; TEST_F(HeapTest, ...
6 years, 6 months ago (2014-06-04 15:37:49 UTC) #15
Sigurður Ásgeirsson
Is this both in debug and release? On Wed, Jun 4, 2014 at 11:37 AM, ...
6 years, 6 months ago (2014-06-04 15:47:27 UTC) #16
Sébastien Marchand
Release only, Here's my test case (I'm playing with the /Oi flag to see if ...
6 years, 6 months ago (2014-06-04 15:50:03 UTC) #17
Sébastien Marchand
I've tried this patch on an instrumented Official build and I'm having the same result, ...
6 years, 6 months ago (2014-06-05 17:27:38 UTC) #18
Sigurður Ásgeirsson
lgtm https://codereview.chromium.org/308683011/diff/60001/base/atomicops_internals_x86_msvc.h File base/atomicops_internals_x86_msvc.h (right): https://codereview.chromium.org/308683011/diff/60001/base/atomicops_internals_x86_msvc.h#newcode28 base/atomicops_internals_x86_msvc.h:28: // The Interlocked* functions doesn't resolve to their ...
6 years, 6 months ago (2014-06-05 17:41:09 UTC) #19
Sébastien Marchand
It looks like that I don't even have to declare the intrinsics on x86... Including ...
6 years, 6 months ago (2014-06-10 20:27:36 UTC) #20
Sébastien Marchand
+ajwong@ for owner approval.
6 years, 6 months ago (2014-06-11 13:13:30 UTC) #21
awong
LGTM
6 years, 6 months ago (2014-06-11 17:04:14 UTC) #22
Sébastien Marchand
The CQ bit was checked by sebmarchand@chromium.org
6 years, 6 months ago (2014-06-11 17:26:17 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sebmarchand@chromium.org/308683011/80001
6 years, 6 months ago (2014-06-11 17:29:19 UTC) #24
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_chromium_x64_rel on tryserver.chromium ...
6 years, 6 months ago (2014-06-11 21:04:04 UTC) #25
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-11 21:36:53 UTC) #26
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/win_chromium_x64_rel/builds/19604)
6 years, 6 months ago (2014-06-11 21:36:54 UTC) #27
Sébastien Marchand
The CQ bit was checked by sebmarchand@chromium.org
6 years, 6 months ago (2014-06-12 13:44:35 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sebmarchand@chromium.org/308683011/80001
6 years, 6 months ago (2014-06-12 13:46:16 UTC) #29
commit-bot: I haz the power
6 years, 6 months ago (2014-06-12 16:17:31 UTC) #30
Message was sent while issue was closed.
Change committed as 276701

Powered by Google App Engine
This is Rietveld 408576698