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

Issue 1845753006: Don't create redundant ThreadData for Worker Threads (Closed)

Created:
4 years, 8 months ago by Zhenyu Shan
Modified:
4 years, 6 months ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Don't create redundant ThreadData for Worker Threads Before creating tracked_objects::ThreadData for a thread, see if it's a WorkerThread. If is, try reusing ThreadData instance for previously finished WorkerThread. This stops unneccessary |ThreadData| instance to be created, reduces a small portion of memory usage, especially on long running renderer processes. BUG=599820 Committed: https://crrev.com/a55ed003ab5d1a34d0b7b00e2a662aae272d71d8 Cr-Commit-Position: refs/heads/master@{#398369}

Patch Set 1 #

Total comments: 3

Patch Set 2 : Early return in InitializeThreadContext #

Total comments: 8

Patch Set 3 : #

Total comments: 4

Patch Set 4 : #

Patch Set 5 : update comment #

Total comments: 1

Patch Set 6 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+9 lines, -6 lines) Patch
M base/threading/platform_thread.h View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M base/tracked_objects.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M base/tracked_objects.cc View 1 2 3 4 5 4 chunks +6 lines, -3 lines 0 comments Download

Messages

Total messages: 67 (26 generated)
Zhenyu Shan
PTAL, thanks!
4 years, 8 months ago (2016-04-01 09:32:12 UTC) #3
dcheng
https://codereview.chromium.org/1845753006/diff/1/base/threading/platform_thread.h File base/threading/platform_thread.h (right): https://codereview.chromium.org/1845753006/diff/1/base/threading/platform_thread.h#newcode147 base/threading/platform_thread.h:147: static void SetName(const std::string& name, bool is_worker_thread = false); ...
4 years, 8 months ago (2016-04-01 10:52:31 UTC) #4
dcheng
Also, do we have any measurements on how this affects performance? I'm wondering if the ...
4 years, 8 months ago (2016-04-01 18:07:35 UTC) #5
Zhenyu Shan
On 2016/04/01 10:52:31, dcheng wrote: > https://codereview.chromium.org/1845753006/diff/1/base/threading/platform_thread.h > File base/threading/platform_thread.h (right): > > https://codereview.chromium.org/1845753006/diff/1/base/threading/platform_thread.h#newcode147 > ...
4 years, 8 months ago (2016-04-06 08:35:14 UTC) #6
Zhenyu Shan
On 2016/04/01 18:07:35, dcheng wrote: > Also, do we have any measurements on how this ...
4 years, 8 months ago (2016-04-06 08:52:16 UTC) #7
Zhenyu Shan
On 2016/04/01 18:07:35, dcheng wrote: > Also, do we have any measurements on how this ...
4 years, 8 months ago (2016-04-19 12:47:05 UTC) #8
jar (doing other things)
I'm trying to understand the consequences of the original status quo. Is the current code ...
4 years, 8 months ago (2016-04-19 21:10:22 UTC) #10
dcheng
On 2016/04/19 at 21:10:22, jar wrote: > I'm trying to understand the consequences of the ...
4 years, 8 months ago (2016-04-19 21:21:51 UTC) #11
jar (doing other things)
It has been years since I originally wrote a lot of this... and I think ...
4 years, 8 months ago (2016-04-20 04:34:51 UTC) #12
jar (doing other things)
It has been years since I originally wrote a lot of this... and I think ...
4 years, 8 months ago (2016-04-20 04:34:53 UTC) #13
Zhenyu Shan
https://codereview.chromium.org/1845753006/diff/20001/base/threading/platform_thread.h File base/threading/platform_thread.h (right): https://codereview.chromium.org/1845753006/diff/20001/base/threading/platform_thread.h#newcode146 base/threading/platform_thread.h:146: // otherwise. On 2016/04/20 04:34:51, jar (doing other things) ...
4 years, 7 months ago (2016-05-04 23:33:03 UTC) #14
Zhenyu Shan
On 2016/04/20 04:34:53, jar (doing other things) wrote: > It has been years since I ...
4 years, 7 months ago (2016-05-04 23:38:23 UTC) #15
Zhenyu Shan
On 2016/05/04 23:38:23, Zhenyu Shan wrote: > On 2016/04/20 04:34:53, jar (doing other things) wrote: ...
4 years, 7 months ago (2016-05-05 01:00:21 UTC) #16
jar (doing other things)
LGTM Thanks for answering my questions. This seems like a very positive change.
4 years, 7 months ago (2016-05-08 03:04:09 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1845753006/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1845753006/40001
4 years, 7 months ago (2016-05-09 02:01:05 UTC) #19
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/179482)
4 years, 7 months ago (2016-05-09 02:07:44 UTC) #21
Zhenyu Shan
Could you file owners for base/ take a look at this? Thanks!
4 years, 7 months ago (2016-05-09 02:19:39 UTC) #23
Zhenyu Shan
ping PTAL, thanks!
4 years, 7 months ago (2016-05-12 10:07:49 UTC) #25
Lei Zhang
Please try to pick an OWNER rather than many. It could be that we all ...
4 years, 7 months ago (2016-05-12 17:25:47 UTC) #27
Lei Zhang
I agree plumbing it through SetName() is a bit weird, but I don't have a ...
4 years, 7 months ago (2016-05-12 19:47:40 UTC) #28
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1845753006/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1845753006/60001
4 years, 7 months ago (2016-05-13 02:45:45 UTC) #30
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/221029)
4 years, 7 months ago (2016-05-13 03:19:32 UTC) #32
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1845753006/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1845753006/80001
4 years, 7 months ago (2016-05-13 03:24:59 UTC) #35
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-13 04:58:54 UTC) #37
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1845753006/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1845753006/100001
4 years, 7 months ago (2016-05-13 06:41:04 UTC) #39
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_asan_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/160935) mac_chromium_gn_rel on ...
4 years, 7 months ago (2016-05-13 08:41:49 UTC) #41
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1845753006/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1845753006/100001
4 years, 7 months ago (2016-05-13 09:02:28 UTC) #43
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-05-13 10:17:56 UTC) #45
Zhenyu Shan
https://codereview.chromium.org/1845753006/diff/40001/base/tracked_objects.cc File base/tracked_objects.cc (right): https://codereview.chromium.org/1845753006/diff/40001/base/tracked_objects.cc#newcode359 base/tracked_objects.cc:359: if (is_worker_thread) On 2016/05/12 19:47:40, Lei Zhang wrote: > ...
4 years, 7 months ago (2016-05-16 02:05:35 UTC) #46
Zhenyu Shan
Anyone there? Could you please take a look at the new patch set? Thanks in ...
4 years, 7 months ago (2016-05-20 06:39:33 UTC) #47
Zhenyu Shan
On 2016/05/20 06:39:33, Zhenyu Shan wrote: > Anyone there? Could you please take a look ...
4 years, 7 months ago (2016-05-27 06:49:58 UTC) #48
Lei Zhang
Idea - instead of adding an is_worker boolean to SetName(), can ThreadData::InitializeThreadContext() just check base::WorkerPool::RunsTasksOnCurrentThread() ...
4 years, 6 months ago (2016-05-31 21:43:24 UTC) #49
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1845753006/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1845753006/120001
4 years, 6 months ago (2016-06-03 09:20:40 UTC) #51
Zhenyu Shan
On 2016/05/31 21:43:24, Lei Zhang (OOO) wrote: > Idea - instead of adding an is_worker ...
4 years, 6 months ago (2016-06-03 09:22:52 UTC) #52
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-06-03 11:26:03 UTC) #54
Lei Zhang
On 2016/06/03 09:22:52, Zhenyu Shan wrote: > On 2016/05/31 21:43:24, Lei Zhang (OOO) wrote: > ...
4 years, 6 months ago (2016-06-06 22:25:53 UTC) #55
Zhenyu Shan
On 2016/06/06 22:25:53, Lei Zhang (Slow) wrote: > On 2016/06/03 09:22:52, Zhenyu Shan wrote: > ...
4 years, 6 months ago (2016-06-07 13:41:42 UTC) #58
Lei Zhang
On 2016/06/07 13:41:42, Zhenyu Shan wrote: > Done Thanks. I did a bit of light ...
4 years, 6 months ago (2016-06-07 17:47:41 UTC) #60
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1845753006/120001
4 years, 6 months ago (2016-06-07 17:48:09 UTC) #63
commit-bot: I haz the power
Committed patchset #6 (id:120001)
4 years, 6 months ago (2016-06-07 21:05:52 UTC) #65
commit-bot: I haz the power
4 years, 6 months ago (2016-06-07 21:07:28 UTC) #67
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/a55ed003ab5d1a34d0b7b00e2a662aae272d71d8
Cr-Commit-Position: refs/heads/master@{#398369}

Powered by Google App Engine
This is Rietveld 408576698