This is an archive of the discontinued LLVM Phabricator instance.

[clangd] Implemented tracing using Context
ClosedPublic

Authored by ilya-biryukov on Nov 27 2017, 4:52 AM.

Event Timeline

ilya-biryukov created this revision.Nov 27 2017, 4:52 AM
ilya-biryukov planned changes to this revision.Nov 27 2017, 4:57 AM
ilya-biryukov added inline comments.
clangd/JSONRPCDispatcher.h
80 ↗(On Diff #124357)

This is still wrong, Context is used by Tracer internally and should not be moved.

  • Updated tracing to use the new Context implementation.
  • Restored global tracer.
  • Use getExistingKey instead of getPtr in JSONRPCDispatcher.

Updated the patch after changes to Context

  • Use derive(key, value) instead of derive().add(key, value).

Merged with head

sammccall accepted this revision.Dec 14 2017, 1:22 AM
sammccall added inline comments.
clangd/Trace.cpp
123

This is a little unfortunate. Oh, well.

clangd/Trace.h
42

hmm, trace::TracingSession seems redundant? Up to you

This revision is now accepted and ready to land.Dec 14 2017, 1:22 AM
  • Renamed TracingSession to Session (it is always used qualified via trace::Session anyway)
ilya-biryukov marked an inline comment as done.Dec 14 2017, 7:04 AM
This revision was automatically updated to reflect the committed changes.