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

Issue 12741012: base: Support setting thread priorities generically. (Closed)

Created:
7 years, 9 months ago by epenner
Modified:
7 years, 7 months ago
CC:
chromium-reviews, erikwright+watch_chromium.org, sail+watch_chromium.org, aelias_OOO_until_Jul13, jam, brettw
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Reland: base: Support setting thread priorities generically. This patch supports setting priorities across platforms at the PlatformThread level, by stashing thread id into the thread handle on linux/android. Since this adds more platform specific code, and #ifdefs were starting to get unwieldy, all platform specific code is moved into _platform.cc files, with the exception of the 'default' implementation, which stay in _posix. BUG=170549 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=201202 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=201389

Patch Set 1 #

Patch Set 2 : Fix win build. #

Patch Set 3 : Added back JNI for Audio. #

Total comments: 12

Patch Set 4 : Rebase. #

Total comments: 2

Patch Set 5 : Add id to handle. #

Total comments: 21

Patch Set 6 : Address feedback. #

Patch Set 7 : Fix win bots. #

Patch Set 8 : Rebase. #

Total comments: 14

Patch Set 9 : Address feedback. #

Total comments: 2

Patch Set 10 : Fix private member access. #

Patch Set 11 : Rebase, fix bots. #

Patch Set 12 : Remove static initializers. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+448 lines, -202 lines) Patch
M base/base.gypi View 1 2 3 4 5 3 chunks +13 lines, -2 lines 0 comments Download
M base/debug/trace_event_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M base/synchronization/lock_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +7 lines, -7 lines 0 comments Download
M base/threading/platform_thread.h View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +52 lines, -12 lines 0 comments Download
A base/threading/platform_thread_android.cc View 1 2 3 4 5 1 chunk +105 lines, -0 lines 0 comments Download
A base/threading/platform_thread_linux.cc View 1 2 3 4 5 1 chunk +103 lines, -0 lines 0 comments Download
M base/threading/platform_thread_mac.mm View 1 2 3 4 5 3 chunks +47 lines, -1 line 0 comments Download
M base/threading/platform_thread_posix.cc View 1 2 3 4 5 6 7 8 9 10 chunks +60 lines, -141 lines 0 comments Download
M base/threading/platform_thread_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +2 lines, -2 lines 0 comments Download
M base/threading/platform_thread_win.cc View 1 2 3 4 5 6 7 8 9 10 11 7 chunks +17 lines, -9 lines 0 comments Download
M base/threading/thread.h View 1 chunk +3 lines, -0 lines 0 comments Download
M base/threading/thread.cc View 1 2 3 4 1 chunk +7 lines, -0 lines 0 comments Download
M base/threading/thread_restrictions.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/content_settings/content_settings_pref_provider_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/printing/print_job.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M chrome_frame/chrome_frame_automation.h View 1 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download
M content/renderer/media/webrtc_local_audio_track_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +4 lines, -4 lines 0 comments Download
M media/audio/audio_device_thread.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +6 lines, -6 lines 0 comments Download
M media/audio/cross_process_notification_win.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +6 lines, -4 lines 0 comments Download
M media/filters/video_renderer_base.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +6 lines, -6 lines 0 comments Download
M remoting/base/auto_thread.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +4 lines, -4 lines 0 comments Download

Messages

Total messages: 46 (0 generated)
epenner
This is a continuation of this patch (I had to switch my dev branch): https://codereview.chromium.org/11934002/ ...
7 years, 9 months ago (2013-03-26 03:36:12 UTC) #1
Wei James(wistoch)
The code for Android may not be removed. we need to use Java API to ...
7 years, 9 months ago (2013-03-26 05:04:54 UTC) #2
epennerAtGoogle
On 2013/03/26 05:04:54, Wei James(wistoch) wrote: > The code for Android may not be removed. ...
7 years, 9 months ago (2013-03-26 05:15:17 UTC) #3
Wei James(wistoch)
On 2013/03/26 05:15:17, epennerAtGoogle wrote: > On 2013/03/26 05:04:54, Wei James(wistoch) wrote: > > The ...
7 years, 9 months ago (2013-03-26 05:23:45 UTC) #4
Wei James(wistoch)
On 2013/03/26 05:23:45, Wei James(wistoch) wrote: > On 2013/03/26 05:15:17, epennerAtGoogle wrote: > > On ...
7 years, 9 months ago (2013-03-26 05:34:36 UTC) #5
qinmin
for cgroups, check set_sched_policy() in android/system/core/libcutils/sched_policy.c On 2013/03/26 05:34:36, Wei James(wistoch) wrote: > On 2013/03/26 ...
7 years, 9 months ago (2013-03-26 05:41:00 UTC) #6
epennerAtGoogle
On 2013/03/26 05:41:00, qinmin wrote: > for cgroups, check set_sched_policy() in > android/system/core/libcutils/sched_policy.c > > ...
7 years, 9 months ago (2013-03-26 05:52:53 UTC) #7
epenner
Sorry for the long delay. I added back the JNI call for Audio. Please take ...
7 years, 8 months ago (2013-04-18 23:25:51 UTC) #8
Wei James(wistoch)
On 2013/04/18 23:25:51, epenner wrote: > Sorry for the long delay. I added back the ...
7 years, 8 months ago (2013-04-19 01:14:19 UTC) #9
jar (doing other things)
Rather than putting in a ton of ifdefs, can you consider landing in some platform ...
7 years, 8 months ago (2013-04-24 01:04:57 UTC) #10
epennerAtGoogle
Thanks for the feedback! Most comments seems straight forward to address, but let me address ...
7 years, 8 months ago (2013-04-24 04:57:14 UTC) #11
epenner
Ptal. I've addressed the feedback and broken it up into platforms. https://codereview.chromium.org/12741012/diff/14001/base/threading/platform_thread.h File base/threading/platform_thread.h (left): ...
7 years, 7 months ago (2013-04-30 04:37:08 UTC) #12
epenner
Rebase. Ptal.
7 years, 7 months ago (2013-05-02 21:29:04 UTC) #13
jar (doing other things)
https://codereview.chromium.org/12741012/diff/55001/base/threading/platform_thread_posix.cc File base/threading/platform_thread_posix.cc (right): https://codereview.chromium.org/12741012/diff/55001/base/threading/platform_thread_posix.cc#newcode211 base/threading/platform_thread_posix.cc:211: #if !defined(OS_MACOSX) This section is still messy (lines 193-230) ...
7 years, 7 months ago (2013-05-03 23:54:07 UTC) #14
epennerAtGoogle
https://codereview.chromium.org/12741012/diff/55001/base/threading/platform_thread_posix.cc File base/threading/platform_thread_posix.cc (right): https://codereview.chromium.org/12741012/diff/55001/base/threading/platform_thread_posix.cc#newcode211 base/threading/platform_thread_posix.cc:211: #if !defined(OS_MACOSX) On 2013/05/03 23:54:07, jar wrote: > This ...
7 years, 7 months ago (2013-05-04 01:09:45 UTC) #15
epennerAtGoogle
If we do thunk the interface, I don't think there is a clean place to ...
7 years, 7 months ago (2013-05-04 01:16:51 UTC) #16
reveman
On 2013/04/24 04:57:14, epennerAtGoogle wrote: > Thanks for the feedback! Most comments seems straight forward ...
7 years, 7 months ago (2013-05-07 18:17:38 UTC) #17
reveman
Not clear to me why virtual methods would be needed here. All PlatformThread functions are ...
7 years, 7 months ago (2013-05-07 18:58:56 UTC) #18
epennerAtGoogle
Yeah this is along the lines of my first option. I really prefer that as ...
7 years, 7 months ago (2013-05-07 20:34:06 UTC) #19
epennerAtGoogle
On 2013/05/07 18:17:38, David Reveman wrote: > On 2013/04/24 04:57:14, epennerAtGoogle wrote: > > Thanks ...
7 years, 7 months ago (2013-05-07 20:37:01 UTC) #20
reveman
On 2013/05/07 20:37:01, epennerAtGoogle wrote: > On 2013/05/07 18:17:38, David Reveman wrote: > > On ...
7 years, 7 months ago (2013-05-08 02:32:15 UTC) #21
epenner
> Do we need to support that? If someone creates a platform specific thread handle ...
7 years, 7 months ago (2013-05-09 19:44:16 UTC) #22
jar (doing other things)
https://codereview.chromium.org/12741012/diff/78016/base/threading/platform_thread.h File base/threading/platform_thread.h (right): https://codereview.chromium.org/12741012/diff/78016/base/threading/platform_thread.h#newcode22 base/threading/platform_thread.h:22: #include <ostream> nit: probably alphabetize by placing before line ...
7 years, 7 months ago (2013-05-15 02:18:36 UTC) #23
epennerAtGoogle
I was trying to mimic the integer handle type before. But I went ahead and ...
7 years, 7 months ago (2013-05-15 05:09:08 UTC) #24
epenner
Rebase. Ptal. https://codereview.chromium.org/12741012/diff/78016/base/threading/platform_thread.h File base/threading/platform_thread.h (right): https://codereview.chromium.org/12741012/diff/78016/base/threading/platform_thread.h#newcode22 base/threading/platform_thread.h:22: #include <ostream> On 2013/05/15 02:18:36, jar wrote: ...
7 years, 7 months ago (2013-05-17 19:18:13 UTC) #25
jar (doing other things)
Mostly style nits, but one request below to get brett or jam to approve (see ...
7 years, 7 months ago (2013-05-17 22:51:47 UTC) #26
epenner
Fixed Nits. I'll add other owners and Brett/Jam for the restrictions issue. https://codereview.chromium.org/12741012/diff/156001/base/threading/platform_thread.h File base/threading/platform_thread.h ...
7 years, 7 months ago (2013-05-17 23:46:35 UTC) #27
epenner
+brettw / jar Can you have a look at thread_restrictions and let me know if ...
7 years, 7 months ago (2013-05-18 00:04:48 UTC) #28
Sergey Ulanov
remoting - lgtm https://codereview.chromium.org/12741012/diff/181001/remoting/base/auto_thread.cc File remoting/base/auto_thread.cc (right): https://codereview.chromium.org/12741012/diff/181001/remoting/base/auto_thread.cc#newcode95 remoting/base/auto_thread.cc:95: thread_(0), nit: I think this can ...
7 years, 7 months ago (2013-05-18 00:05:56 UTC) #29
Ami GONE FROM CHROMIUM
LGTM for media/
7 years, 7 months ago (2013-05-18 00:14:37 UTC) #30
jar (doing other things)
lgtm
7 years, 7 months ago (2013-05-18 00:18:53 UTC) #31
ananta
lgtm ChromeFrame LGTM
7 years, 7 months ago (2013-05-18 01:25:07 UTC) #32
tommi (sloooow) - chröme
lgtm for chrome_frame.
7 years, 7 months ago (2013-05-18 04:35:37 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/epenner@chromium.org/12741012/199001
7 years, 7 months ago (2013-05-20 21:42:35 UTC) #34
commit-bot: I haz the power
Retried try job too often on chromium_presubmit for step(s) presubmit http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=chromium_presubmit&number=3810
7 years, 7 months ago (2013-05-20 21:52:50 UTC) #35
epenner
+abodenha for printing OWNERS lgtm.
7 years, 7 months ago (2013-05-20 22:18:05 UTC) #36
Albert Bodenhamer
LGTM for printing.
7 years, 7 months ago (2013-05-20 22:36:57 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/epenner@chromium.org/12741012/199001
7 years, 7 months ago (2013-05-20 22:38:19 UTC) #38
commit-bot: I haz the power
Change committed as 201202
7 years, 7 months ago (2013-05-21 03:15:51 UTC) #39
epenner
On 2013/05/21 03:15:51, I haz the power (commit-bot) wrote: > Change committed as 201202 Second ...
7 years, 7 months ago (2013-05-21 07:24:02 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/epenner@chromium.org/12741012/220001
7 years, 7 months ago (2013-05-21 07:25:01 UTC) #41
commit-bot: I haz the power
Retried try job too often on chromium_presubmit for step(s) presubmit http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=chromium_presubmit&number=3902
7 years, 7 months ago (2013-05-21 07:33:17 UTC) #42
epenner
On 2013/05/21 07:33:17, I haz the power (commit-bot) wrote: > Retried try job too often ...
7 years, 7 months ago (2013-05-21 19:05:14 UTC) #43
Bernhard Bauer
content_settings LGTM. In general, feel free to TBR OWNERS for just updating method signatures when ...
7 years, 7 months ago (2013-05-21 19:45:16 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/epenner@chromium.org/12741012/220001
7 years, 7 months ago (2013-05-21 19:47:47 UTC) #45
commit-bot: I haz the power
7 years, 7 months ago (2013-05-22 00:01:46 UTC) #46
Message was sent while issue was closed.
Change committed as 201389

Powered by Google App Engine
This is Rietveld 408576698