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

Issue 6696112: Fast TLS support.

Created:
9 years, 9 months ago by Vitaly Repeshko
Modified:
9 years, 9 months ago
Reviewers:
antonm
CC:
v8-dev
Visibility:
Public.

Description

Fast TLS support. This patch adds common infrastructure for fast TLS support and implementation on win32. More implementations will be added soon. Fast TLS is controlled by V8_FAST_TLS define which is enabled by default in our gyp and scons builds. The scons build has fasttls={on,off} option so that we can see the effects of slow TLS when needed.

Patch Set 1 #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+147 lines, -1 line) Patch
M SConstruct View 2 chunks +8 lines, -0 lines 2 comments Download
M src/isolate.h View 1 chunk +2 lines, -1 line 0 comments Download
M src/platform.h View 2 chunks +14 lines, -0 lines 2 comments Download
A src/platform-tls.h View 1 chunk +48 lines, -0 lines 2 comments Download
A src/platform-tls-win32.h View 1 chunk +62 lines, -0 lines 2 comments Download
M tools/gyp/v8.gyp View 2 chunks +3 lines, -0 lines 0 comments Download
M tools/v8.xcodeproj/project.pbxproj View 2 chunks +2 lines, -0 lines 0 comments Download
M tools/visual_studio/v8_base.vcproj View 1 chunk +8 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Vitaly Repeshko
9 years, 9 months ago (2011-03-25 16:33:08 UTC) #1
antonm
LGTM I hope that this fast way to read TLS is covered by the current ...
9 years, 9 months ago (2011-03-25 16:44:44 UTC) #2
Vitaly Repeshko
9 years, 9 months ago (2011-03-27 15:54:48 UTC) #3
Anton, thanks for reviewing this! I addressed most of your comments and added a
unit test for TLS stores/reads.


-- Vitaly

http://codereview.chromium.org/6696112/diff/1/SConstruct
File SConstruct (right):

http://codereview.chromium.org/6696112/diff/1/SConstruct#newcode794
SConstruct:794: 'help': 'enable fast thread local storage support'
On 2011/03/25 16:44:44, antonm wrote:
> maybe add something like 'if supported for the given platform'

Done.

http://codereview.chromium.org/6696112/diff/1/src/platform-tls-win32.h
File src/platform-tls-win32.h (right):

http://codereview.chromium.org/6696112/diff/1/src/platform-tls-win32.h#newcode43
src/platform-tls-win32.h:43: const intptr_t kTibInlineTlsOffset = 0xE10;
On 2011/03/25 16:44:44, antonm wrote:
> nit: do not we use lower case in hex constants?

Upper case seems to be more common.

http://codereview.chromium.org/6696112/diff/1/src/platform-tls.h
File src/platform-tls.h (right):

http://codereview.chromium.org/6696112/diff/1/src/platform-tls.h#newcode39
src/platform-tls.h:39: // provided fast TLS support for the current platform and
architecture
On 2011/03/25 16:44:44, antonm wrote:
> nit: provided -> provides?

Done.

http://codereview.chromium.org/6696112/diff/1/src/platform.h
File src/platform.h (right):

http://codereview.chromium.org/6696112/diff/1/src/platform.h#newcode433
src/platform.h:433: static inline void* GetExistingThreadLocal(LocalStorageKey
key) {
On 2011/03/25 16:44:44, antonm wrote:
> maybe make this method a template by a return type?

I'd like to avoid significant interface changes in this patch.

Powered by Google App Engine
This is Rietveld 408576698