[llvm-branch-commits] [clang-tools-extra-branch] r354980 - Merging r353422:

Hans Wennborg via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Feb 27 06:52:42 PST 2019


Author: hans
Date: Wed Feb 27 06:52:42 2019
New Revision: 354980

URL: http://llvm.org/viewvc/llvm-project?rev=354980&view=rev
Log:
Merging r353422:
------------------------------------------------------------------------
r353422 | kadircet | 2019-02-07 17:04:30 +0100 (Thu, 07 Feb 2019) | 18 lines

[clangd] Reduce number of threads used by BackgroundIndex to number of physical cores.

Summary:
clangd is using as many threads as logical cores for BackgroundIndex
by default. We observed that it increases latency of foreground tasks.

This patch aims to change that default to number of physical cores to get rid of
that extra latency.

Reviewers: ilya-biryukov

Reviewed By: ilya-biryukov

Subscribers: ioeric, MaskRay, jkorous, arphaman, cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D57819
------------------------------------------------------------------------

Modified:
    clang-tools-extra/branches/release_80/   (props changed)
    clang-tools-extra/branches/release_80/clangd/index/Background.h

Propchange: clang-tools-extra/branches/release_80/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Feb 27 06:52:42 2019
@@ -1 +1 @@
-/clang-tools-extra/trunk:351463,351466-351468,351531,351686,351738,351788,352040,352231,353327
+/clang-tools-extra/trunk:351463,351466-351468,351531,351686,351738,351788,352040,352231,353327,353422

Modified: clang-tools-extra/branches/release_80/clangd/index/Background.h
URL: http://llvm.org/viewvc/llvm-project/clang-tools-extra/branches/release_80/clangd/index/Background.h?rev=354980&r1=354979&r2=354980&view=diff
==============================================================================
--- clang-tools-extra/branches/release_80/clangd/index/Background.h (original)
+++ clang-tools-extra/branches/release_80/clangd/index/Background.h Wed Feb 27 06:52:42 2019
@@ -68,11 +68,12 @@ public:
   /// If BuildIndexPeriodMs is greater than 0, the symbol index will only be
   /// rebuilt periodically (one per \p BuildIndexPeriodMs); otherwise, index is
   /// rebuilt for each indexed file.
-  BackgroundIndex(Context BackgroundContext, const FileSystemProvider &,
-                  const GlobalCompilationDatabase &CDB,
-                  BackgroundIndexStorage::Factory IndexStorageFactory,
-                  size_t BuildIndexPeriodMs = 0,
-                  size_t ThreadPoolSize = llvm::hardware_concurrency());
+  BackgroundIndex(
+      Context BackgroundContext, const FileSystemProvider &,
+      const GlobalCompilationDatabase &CDB,
+      BackgroundIndexStorage::Factory IndexStorageFactory,
+      size_t BuildIndexPeriodMs = 0,
+      size_t ThreadPoolSize = llvm::heavyweight_hardware_concurrency());
   ~BackgroundIndex(); // Blocks while the current task finishes.
 
   // Enqueue translation units for indexing.




More information about the llvm-branch-commits mailing list