[PATCH] D92381: [clangd] Extract per-dir CDB cache to its own threadsafe class. NFC
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 1 03:50:39 PST 2020
sammccall created this revision.
sammccall added a reviewer: kadircet.
Herald added subscribers: cfe-commits, usaxena95, jfb, arphaman.
Herald added a project: clang.
sammccall requested review of this revision.
Herald added subscribers: MaskRay, ilya-biryukov.
This is a step towards making compile_commands.json reloadable.
The idea is:
- in addition to rare CDB loads we're soon going to have somewhat-rare CDB reloads and fairly-common stat() of files to validate the CDB
- so stop doing all our work under a big global lock, instead using it to acquire per-directory structures with their own locks
- each directory can be refreshed from disk every N seconds, like filecache
- avoid locking these at all in the most common case: directory has no CDB
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D92381
Files:
clang-tools-extra/clangd/GlobalCompilationDatabase.cpp
clang-tools-extra/clangd/GlobalCompilationDatabase.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92381.308611.patch
Type: text/x-patch
Size: 13044 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201201/53268a67/attachment.bin>
More information about the cfe-commits
mailing list