[PATCH] D84499: [clangd] Add more logs and attach tracers to remote index server routines

2020-07-27 Thread Kirill Bobyrev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG731043c0c494: [clangd] Add more logs and attach tracers to remote index server routines (authored by kbobyrev). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D84499: [clangd] Add more logs and attach tracers to remote index server routines

2020-07-27 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 280997. kbobyrev marked an inline comment as done. kbobyrev added a comment. Switch from llvm::errs() to elog() Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84499/new/ https://reviews.llvm.org/D84499 Files:

[PATCH] D84499: [clangd] Add more logs and attach tracers to remote index server routines

2020-07-27 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev marked an inline comment as not done. kbobyrev added inline comments. Comment at: clang-tools-extra/clangd/index/remote/server/Server.cpp:203 + TracerStream.reset(); + llvm::errs() << "Error while opening trace file " << TraceFile << ": " +

[PATCH] D84499: [clangd] Add more logs and attach tracers to remote index server routines

2020-07-27 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 280993. kbobyrev marked 2 inline comments as done. kbobyrev added a comment. Resolve all but 1 post-LGTM comment and rebase on top of master. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84499/new/

[PATCH] D84499: [clangd] Add more logs and attach tracers to remote index server routines

2020-07-27 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet accepted this revision. kadircet added a comment. This revision is now accepted and ready to land. thanks, LGTM apart from templated-lambdas. Comment at: clang-tools-extra/clangd/index/remote/server/Server.cpp:86 +unsigned FailedToSend = 0; +Index->lookup(Req,

[PATCH] D84499: [clangd] Add more logs and attach tracers to remote index server routines

2020-07-27 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 280848. kbobyrev added a comment. Fix code. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84499/new/ https://reviews.llvm.org/D84499 Files: clang-tools-extra/clangd/index/remote/Client.cpp

[PATCH] D84499: [clangd] Add more logs and attach tracers to remote index server routines

2020-07-27 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev marked 3 inline comments as done. kbobyrev added inline comments. Comment at: clang-tools-extra/clangd/index/remote/server/Server.cpp:73 private: + template kbobyrev wrote: > sammccall wrote: > > you don't need both RequestT and ClangdRequest as

[PATCH] D84499: [clangd] Add more logs and attach tracers to remote index server routines

2020-07-27 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 280846. kbobyrev marked 3 inline comments as done. kbobyrev added a comment. Move back to duplicated code. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84499/new/ https://reviews.llvm.org/D84499 Files:

[PATCH] D84499: [clangd] Add more logs and attach tracers to remote index server routines

2020-07-27 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev planned changes to this revision. kbobyrev added a comment. As discussed in PM, should move back to duplicated code  Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84499/new/ https://reviews.llvm.org/D84499

[PATCH] D84499: [clangd] Add more logs and attach tracers to remote index server routines

2020-07-27 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clang-tools-extra/clangd/index/remote/server/Server.cpp:73 private: + template sammccall wrote: > you don't need both RequestT and ClangdRequest as template params: > - the things you're currently doing are all

[PATCH] D84499: [clangd] Add more logs and attach tracers to remote index server routines

2020-07-27 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 280812. kbobyrev marked 14 inline comments as done. kbobyrev added a comment. Resolve most review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84499/new/ https://reviews.llvm.org/D84499 Files:

[PATCH] D84499: [clangd] Add more logs and attach tracers to remote index server routines

2020-07-26 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev planned changes to this revision. kbobyrev added a comment. Need to resolve remaining comments and improve readability. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84499/new/ https://reviews.llvm.org/D84499

[PATCH] D84499: [clangd] Add more logs and attach tracers to remote index server routines

2020-07-25 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/clangd/index/remote/server/Server.cpp:96 +} Counter(Request->DebugString()); +return std::forward(Call)( +*Index, ClangdRequest, [&](const StreamType ) { kbobyrev wrote: > sammccall

[PATCH] D84499: [clangd] Add more logs and attach tracers to remote index server routines

2020-07-25 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clang-tools-extra/clangd/index/remote/server/Server.cpp:96 +} Counter(Request->DebugString()); +return std::forward(Call)( +*Index, ClangdRequest, [&](const StreamType ) { sammccall wrote: > I don't

[PATCH] D84499: [clangd] Add more logs and attach tracers to remote index server routines

2020-07-24 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/clangd/index/remote/server/Server.cpp:73 private: + template you don't need both RequestT and ClangdRequest as template params: - the things you're currently doing are all available through

[PATCH] D84499: [clangd] Add more logs and attach tracers to remote index server routines

2020-07-24 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added inline comments. Comment at: clang-tools-extra/clangd/index/remote/Client.cpp:61 Callback(*Response); + ++Received; } kadircet wrote: > shouldn't we increment this before the `continue` above ? (or rename this to > `successful`

[PATCH] D84499: [clangd] Add more logs and attach tracers to remote index server routines

2020-07-24 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 280587. kbobyrev marked 7 inline comments as done. kbobyrev added a comment. Resolve most review comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84499/new/ https://reviews.llvm.org/D84499 Files:

[PATCH] D84499: [clangd] Add more logs and attach tracers to remote index server routines

2020-07-24 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/index/remote/Client.cpp:61 Callback(*Response); + ++Received; } shouldn't we increment this before the `continue` above ? (or rename this to `successful` rather than

[PATCH] D84499: [clangd] Add more logs and attach tracers to remote index server routines

2020-07-24 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 280391. kbobyrev added a comment. Fix (un)successful message numbers reporting. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84499/new/ https://reviews.llvm.org/D84499 Files:

[PATCH] D84499: [clangd] Add more logs and attach tracers to remote index server routines

2020-07-24 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev planned changes to this revision. kbobyrev added a comment. Tracer messages for sent and failed to parse items are not correct. Have to figure out how to print them _after_ the callback. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D84499: [clangd] Add more logs and attach tracers to remote index server routines

2020-07-24 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev updated this revision to Diff 280381. kbobyrev added a comment. Abstract out the client request into a single function call. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D84499/new/ https://reviews.llvm.org/D84499 Files:

[PATCH] D84499: [clangd] Add more logs and attach tracers to remote index server routines

2020-07-24 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev added a comment. The first iteration is D83831 but the diffs are clobbered and I can't change the history there :( So, creating a new one is maybe the best solution. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D84499: [clangd] Add more logs and attach tracers to remote index server routines

2020-07-24 Thread Kirill Bobyrev via Phabricator via cfe-commits
kbobyrev created this revision. kbobyrev added a reviewer: kadircet. Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D84499 Files: