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

Issue 1870033002: Fix NiceValueToThreadPriority failing on an unknown nice value. (Closed)

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

Description

Fix NiceValueToThreadPriority failing on an unknown nice value. Previously, NiceValueToThreadPriority assumed that the nice value of a process is one of the predefined set of values, and reached NOTREACHED() when the user set any other nice value. This patch fixes this issue by changing the lookup of the priorities more graceful. Now the function chooses the most reasonable priority from the given nice value. BUG=558314 R=gab@chromium.org Committed: https://crrev.com/445e39d83dfc06a3f40b8547207cd9e12c3a4d3e Cr-Commit-Position: refs/heads/master@{#387280}

Patch Set 1 #

Patch Set 2 : Fix comments. #

Total comments: 6

Patch Set 3 : Apply gab's comments. #

Total comments: 7

Patch Set 4 : One more BASE_EXPORT to fix builds. #

Patch Set 5 : Address Dana's comments. #

Patch Set 6 : Don't run tests on MACOSX or IOS. #

Total comments: 2

Patch Set 7 : Add a comment about exclusion of OSX/iOS. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+79 lines, -9 lines) Patch
M base/threading/platform_thread_internal_posix.h View 1 2 3 3 chunks +7 lines, -2 lines 0 comments Download
M base/threading/platform_thread_internal_posix.cc View 1 2 3 4 3 chunks +11 lines, -7 lines 0 comments Download
M base/threading/platform_thread_unittest.cc View 1 2 3 4 5 6 2 chunks +61 lines, -0 lines 0 comments Download

Messages

Total messages: 34 (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/1870033002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1870033002/1
4 years, 8 months ago (2016-04-08 07:14:49 UTC) #2
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1870033002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1870033002/20001
4 years, 8 months ago (2016-04-08 07:20:50 UTC) #4
Yuta Kitamura
gab: PTAL? I admit I was too lazy to define the tests on all the ...
4 years, 8 months ago (2016-04-08 07:24:34 UTC) #5
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 8 months ago (2016-04-08 08:26:34 UTC) #7
gab
Thanks, lgtm % request to take advantage of structure's order. https://codereview.chromium.org/1870033002/diff/20001/base/threading/platform_thread_internal_posix.cc File base/threading/platform_thread_internal_posix.cc (right): https://codereview.chromium.org/1870033002/diff/20001/base/threading/platform_thread_internal_posix.cc#newcode26 ...
4 years, 8 months ago (2016-04-08 15:50:50 UTC) #8
gab
https://codereview.chromium.org/1870033002/diff/20001/base/threading/platform_thread_unittest.cc File base/threading/platform_thread_unittest.cc (right): https://codereview.chromium.org/1870033002/diff/20001/base/threading/platform_thread_unittest.cc#newcode278 base/threading/platform_thread_unittest.cc:278: EXPECT_EQ(ThreadPriority::BACKGROUND, NiceValueToThreadPriority(19)); To make these cross-platform (well on OS_POSIX) ...
4 years, 8 months ago (2016-04-08 15:52:51 UTC) #9
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1870033002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1870033002/40001
4 years, 8 months ago (2016-04-12 10:16:40 UTC) #11
Yuta Kitamura
gab: PTAL at patchset 2:3. danakj: PTAL as an OWNER. Thanks! https://codereview.chromium.org/1870033002/diff/20001/base/threading/platform_thread_internal_posix.cc File base/threading/platform_thread_internal_posix.cc (right): ...
4 years, 8 months ago (2016-04-12 10:19:00 UTC) #13
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_ninja/builds/158039)
4 years, 8 months ago (2016-04-12 10:20:43 UTC) #15
gab
Very nice, lgtm++, thanks! https://codereview.chromium.org/1870033002/diff/40001/base/threading/platform_thread_internal_posix.cc File base/threading/platform_thread_internal_posix.cc (right): https://codereview.chromium.org/1870033002/diff/40001/base/threading/platform_thread_internal_posix.cc#newcode8 base/threading/platform_thread_internal_posix.cc:8: #include "base/logging.h" nit: empty line ...
4 years, 8 months ago (2016-04-12 13:20:46 UTC) #16
danakj
https://codereview.chromium.org/1870033002/diff/40001/base/threading/platform_thread_internal_posix.cc File base/threading/platform_thread_internal_posix.cc (right): https://codereview.chromium.org/1870033002/diff/40001/base/threading/platform_thread_internal_posix.cc#newcode31 base/threading/platform_thread_internal_posix.cc:31: for (const ThreadPriorityToNiceValuePair& pair : this should use const ...
4 years, 8 months ago (2016-04-12 21:02:26 UTC) #17
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1870033002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1870033002/60001
4 years, 8 months ago (2016-04-13 07:29:28 UTC) #19
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: ios_dbg_simulator_gn on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_gn/builds/18292)
4 years, 8 months ago (2016-04-13 07:34:05 UTC) #21
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1870033002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1870033002/100001
4 years, 8 months ago (2016-04-13 07:47:05 UTC) #23
Yuta Kitamura
danakj: PTAL again? https://codereview.chromium.org/1870033002/diff/40001/base/threading/platform_thread_internal_posix.cc File base/threading/platform_thread_internal_posix.cc (right): https://codereview.chromium.org/1870033002/diff/40001/base/threading/platform_thread_internal_posix.cc#newcode8 base/threading/platform_thread_internal_posix.cc:8: #include "base/logging.h" On 2016/04/12 13:20:46, gab ...
4 years, 8 months ago (2016-04-13 08:49:18 UTC) #24
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 8 months ago (2016-04-13 09:24:06 UTC) #26
danakj
LGTM https://codereview.chromium.org/1870033002/diff/100001/base/threading/platform_thread_unittest.cc File base/threading/platform_thread_unittest.cc (right): https://codereview.chromium.org/1870033002/diff/100001/base/threading/platform_thread_unittest.cc#newcode275 base/threading/platform_thread_unittest.cc:275: #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_IOS) Why not ...
4 years, 8 months ago (2016-04-13 18:43:00 UTC) #27
Yuta Kitamura
Thanks! Landing. https://codereview.chromium.org/1870033002/diff/100001/base/threading/platform_thread_unittest.cc File base/threading/platform_thread_unittest.cc (right): https://codereview.chromium.org/1870033002/diff/100001/base/threading/platform_thread_unittest.cc#newcode275 base/threading/platform_thread_unittest.cc:275: #if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_IOS) On ...
4 years, 8 months ago (2016-04-14 10:11:52 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1870033002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1870033002/120001
4 years, 8 months ago (2016-04-14 10:12:11 UTC) #31
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years, 8 months ago (2016-04-14 11:16:13 UTC) #32
commit-bot: I haz the power
4 years, 8 months ago (2016-04-14 11:17:32 UTC) #34
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/445e39d83dfc06a3f40b8547207cd9e12c3a4d3e
Cr-Commit-Position: refs/heads/master@{#387280}

Powered by Google App Engine
This is Rietveld 408576698