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

Issue 2363783002: Add Reclaim Support to ThreadLocalStorage (Closed)

Created:
4 years, 3 months ago by robliao
Modified:
4 years, 2 months ago
Reviewers:
brettw
CC:
chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add Reclaim Support to ThreadLocalStorage Previously, ThreadLocalStorage::StaticSlot::Free() did not actually release the corresponding ThreadLocalStorage slot. It simply cleared out the slot and did not reuse it. As a result, each process had a finite number of calls to ThreadLocalStorage::StaticSlot::Initialize() before running out of slots. This problem would manifest itself in tests where a single process runs many tests that each do their own initialization and uninitialization. Tests that involve TLS usage caused the process to run out of TLS slots because there was no free support in ThreadLocalStorage. This change adds in free support by doing what most operating systems do, lock and track metadata in an array. BUG=590907 Committed: https://crrev.com/783d1f9630c86d816669ab23981d0f3722c96808 Committed: https://crrev.com/45609b5403d73864e5119cd5084bd6f9c7f62076 Cr-Original-Commit-Position: refs/heads/master@{#421320} Cr-Commit-Position: refs/heads/master@{#423911}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+99 lines, -68 lines) Patch
M base/threading/thread_local_storage.cc View 10 chunks +92 lines, -68 lines 0 comments Download
M base/threading/thread_local_storage_unittest.cc View 1 chunk +7 lines, -0 lines 0 comments Download

Messages

Total messages: 38 (26 generated)
robliao
4 years, 3 months ago (2016-09-22 17:47:15 UTC) #4
brettw
This implementation seems very reasonable. My only concern is that it might add a bunch ...
4 years, 3 months ago (2016-09-23 20:29:00 UTC) #9
robliao
On 2016/09/23 20:29:00, brettw (ping on IM after 24h) wrote: > This implementation seems very ...
4 years, 3 months ago (2016-09-23 20:46:12 UTC) #14
robliao
On 2016/09/23 20:46:12, robliao wrote: > On 2016/09/23 20:29:00, brettw (ping on IM after 24h) ...
4 years, 2 months ago (2016-09-27 18:56:22 UTC) #15
brettw
Sorry I dropped this. I just did a test and counted 34 TLS uses which ...
4 years, 2 months ago (2016-09-27 19:14:12 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2363783002/1
4 years, 2 months ago (2016-09-27 20:21:37 UTC) #22
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 2 months ago (2016-09-27 20:28:02 UTC) #24
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/783d1f9630c86d816669ab23981d0f3722c96808 Cr-Commit-Position: refs/heads/master@{#421320}
4 years, 2 months ago (2016-09-27 20:29:37 UTC) #26
robliao
A revert of this CL (patchset #1 id:1) has been created in https://codereview.chromium.org/2395043002/ by robliao@chromium.org. ...
4 years, 2 months ago (2016-10-06 02:08:43 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2363783002/1
4 years, 2 months ago (2016-10-07 18:03:20 UTC) #34
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 2 months ago (2016-10-07 18:09:45 UTC) #36
commit-bot: I haz the power
4 years, 2 months ago (2016-10-07 18:12:47 UTC) #38
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/45609b5403d73864e5119cd5084bd6f9c7f62076
Cr-Commit-Position: refs/heads/master@{#423911}

Powered by Google App Engine
This is Rietveld 408576698