aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectScript.cpp
diff options
context:
space:
mode:
authorstk <stk@ableton.com>2022-05-16 10:01:09 +0200
committerSam McCall <sam.mccall@gmail.com>2022-05-16 10:01:49 +0200
commit9902a0945d22cd5757b16ebe85fe07059723aa09 (patch)
treede13070c9114bbd7ec8e5895a28150229bb9d81c /lldb/source/Commands/CommandObjectScript.cpp
parent5bc469fd96192039bafe4bb9f74c85b37f63212e (diff)
downloadllvm-9902a0945d22cd5757b16ebe85fe07059723aa09.zip
llvm-9902a0945d22cd5757b16ebe85fe07059723aa09.tar.gz
llvm-9902a0945d22cd5757b16ebe85fe07059723aa09.tar.bz2
Add ThreadPriority::Low, and use QoS class Utility on Mac
On Apple Silicon Macs, using a Darwin thread priority of PRIO_DARWIN_BG seems to map directly to the QoS class Background. With this priority, the thread is confined to efficiency cores only, which makes background indexing take forever. Introduce a new ThreadPriority "Low" that sits in the middle between Background and Default, and maps to QoS class "Utility" on Mac. Make this new priority the default for indexing. This makes the thread run on all cores, but still lowers priority enough to keep the machine responsive, and not interfere with user-initiated actions. I didn't change the implementations for Windows and Linux; on these systems, both ThreadPriority::Background and ThreadPriority::Low map to the same thread priority. This could be changed as a followup (e.g. by using SCHED_BATCH for Low on Linux). See also https://github.com/clangd/clangd/issues/1119. Reviewed By: sammccall, dgoldman Differential Revision: https://reviews.llvm.org/D124715
Diffstat (limited to 'lldb/source/Commands/CommandObjectScript.cpp')
0 files changed, 0 insertions, 0 deletions