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

Issue 1620673003: base: Implement GetCurrentThreadPriority. (Closed)

Created:
4 years, 11 months ago by erikchen
Modified:
4 years, 9 months ago
Reviewers:
Mark Mentovai, gab
CC:
chromium-reviews, vmpstr+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

base: Implement GetCurrentThreadPriority. The Chrome thread priority is saved in the thread dictionary during SetCurrentThreadPriority(). This seemed a better approach than using thread_policy_get(), since there are 4 Chrome priorities which won't cleanly map to thread flavors. BUG=554651 Committed: https://crrev.com/42655dd168d884f60c0194e8a74606c68a3e6378 Cr-Commit-Position: refs/heads/master@{#381102}

Patch Set 1 #

Patch Set 2 : Fix const. #

Patch Set 3 : Comments from mark. #

Patch Set 4 : #

Total comments: 4

Patch Set 5 : Comments from mark. #

Patch Set 6 : Rebase error. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+32 lines, -18 lines) Patch
M base/threading/platform_thread.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M base/threading/platform_thread_mac.mm View 1 2 3 4 3 chunks +30 lines, -5 lines 1 comment Download
M base/threading/platform_thread_unittest.cc View 1 2 3 4 5 1 chunk +1 line, -8 lines 0 comments Download
M components/startup_metric_utils/browser/startup_metric_utils.cc View 1 2 3 4 2 chunks +0 lines, -4 lines 0 comments Download

Messages

Total messages: 30 (13 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1620673003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1620673003/1
4 years, 11 months ago (2016-01-23 01:37:43 UTC) #2
commit-bot: I haz the power
Dry run: 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/138396)
4 years, 11 months ago (2016-01-23 01:47:42 UTC) #4
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1620673003/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1620673003/20001
4 years, 11 months ago (2016-01-23 02:11:52 UTC) #6
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 11 months ago (2016-01-23 03:18:03 UTC) #8
erikchen
mark: Please review.
4 years, 11 months ago (2016-01-25 20:05:51 UTC) #10
Mark Mentovai
What’s the point of doing this if all we’re actually doing is stashing a meaningless ...
4 years, 11 months ago (2016-01-25 20:38:33 UTC) #11
erikchen
On 2016/01/25 20:38:33, Mark Mentovai wrote: > What’s the point of doing this if all ...
4 years, 11 months ago (2016-01-25 20:48:38 UTC) #12
Mark Mentovai
If the Set allows all 4, then this makes a little more sense. Without that, ...
4 years, 11 months ago (2016-01-25 21:24:24 UTC) #13
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1620673003/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1620673003/60001
4 years, 11 months ago (2016-01-26 18:47:15 UTC) #15
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 11 months ago (2016-01-26 19:50:36 UTC) #17
erikchen
On 2016/01/26 19:50:36, commit-bot: I haz the power wrote: > Dry run: This issue passed ...
4 years, 10 months ago (2016-02-01 23:26:14 UTC) #18
Mark Mentovai
LGTM https://codereview.chromium.org/1620673003/diff/60001/base/threading/platform_thread_mac.mm File base/threading/platform_thread_mac.mm (right): https://codereview.chromium.org/1620673003/diff/60001/base/threading/platform_thread_mac.mm#newcode27 base/threading/platform_thread_mac.mm:27: NSString* const kThreadPriorityKey = @"kThreadPriorityKey"; No leading k ...
4 years, 10 months ago (2016-02-02 16:38:27 UTC) #19
erikchen
https://codereview.chromium.org/1620673003/diff/60001/base/threading/platform_thread_mac.mm File base/threading/platform_thread_mac.mm (right): https://codereview.chromium.org/1620673003/diff/60001/base/threading/platform_thread_mac.mm#newcode27 base/threading/platform_thread_mac.mm:27: NSString* const kThreadPriorityKey = @"kThreadPriorityKey"; On 2016/02/02 16:38:27, Mark ...
4 years, 9 months ago (2016-03-14 21:09:49 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1620673003/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1620673003/100001
4 years, 9 months ago (2016-03-14 21:12:55 UTC) #25
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 9 months ago (2016-03-14 22:54:25 UTC) #26
commit-bot: I haz the power
Patchset 6 (id:??) landed as https://crrev.com/42655dd168d884f60c0194e8a74606c68a3e6378 Cr-Commit-Position: refs/heads/master@{#381102}
4 years, 9 months ago (2016-03-14 22:55:21 UTC) #28
gab
4 years, 9 months ago (2016-03-15 02:37:07 UTC) #30
Message was sent while issue was closed.
Woot! Thanks for doing this :-), minor nit/tip as I glanced over the code out of
curiosity.

Cheers,
Gab

https://codereview.chromium.org/1620673003/diff/100001/base/threading/platfor...
File base/threading/platform_thread_mac.mm (right):

https://codereview.chromium.org/1620673003/diff/100001/base/threading/platfor...
base/threading/platform_thread_mac.mm:205: return ThreadPriority::NORMAL;
nit: Prefer putting these two lines outside the switch statement and removing
the "default" statement. That way if a new ThreadPriority is added, clang will
throw an error when compiling the switch instead of silently providing an
undesired implementation.

Powered by Google App Engine
This is Rietveld 408576698