[PATCH] D81719: [clangd] Drop usage of PreambleStatCache in scanPreamble

2020-06-19 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd2fcc586223c: [clangd] Drop usage of PreambleStatCache in scanPreamble (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81719/new/

[PATCH] D81719: [clangd] Drop usage of PreambleStatCache in scanPreamble

2020-06-19 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 271993. kadircet added a comment. - Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81719/new/ https://reviews.llvm.org/D81719 Files: clang-tools-extra/clangd/Preamble.cpp Index:

[PATCH] D81719: [clangd] Drop usage of PreambleStatCache in scanPreamble

2020-06-16 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 271083. kadircet marked 2 inline comments as done. kadircet added a comment. - Drop VFS usage in scanPreamble completely to avoid IO. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81719/new/

[PATCH] D81719: [clangd] Drop usage of PreambleStatCache in scanPreamble

2020-06-16 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. In D81719#2092589 , @sammccall wrote: > Thanks for all this investigation! > > > 80.710.002330 5 394 374 openat > > I'm curious what the 400 attempts and 20 successes are (I've seen this before > but

[PATCH] D81719: [clangd] Drop usage of PreambleStatCache in scanPreamble

2020-06-15 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Thanks for all this investigation! > 80.710.002330 5 394 374 openat I'm curious what the 400 attempts and 20 successes are (I've seen this before but don't remember now). Probably not worth digging into though unless you happen to have

[PATCH] D81719: [clangd] Drop usage of PreambleStatCache in scanPreamble

2020-06-15 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. Moreover, the most time consuming(well this might be subject to ltrace not counting IO wait times, as an openat above was only 5microsecs/call and a tolower call is 56 microsecs/call :D) bit actually seems like the string comparisons/manipulations done while parsing

[PATCH] D81719: [clangd] Drop usage of PreambleStatCache in scanPreamble

2020-06-15 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. Looked at this more in details, today we call `buildCompilerInvocation` in 3 different places: - Once in TUScheduler whenever we receive an update, later on it propagates into `buildPreamble` and `buildAST`. - Once during signatureHelp/codeCompletion. In theory that

[PATCH] D81719: [clangd] Drop usage of PreambleStatCache in scanPreamble

2020-06-12 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. As discussed offline, the cache is always missing today, but we do have reason to believe we're doing a fair amount of IO in `buildCompilerInvocation` and it should be very cacheable. So dropping the cache here might be the wrong direction vs fixing it. I don't know:

[PATCH] D81719: [clangd] Drop usage of PreambleStatCache in scanPreamble

2020-06-12 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. It was used inside buildCompilerInvocation to speed up stats. But preambleStatCache doesn't contain