clang-tools  7.0.0
Classes | Functions
clang::clangd::trace Namespace Reference

Classes

class  EventTracer
 A consumer of trace events. More...
 
class  Session
 Sets up a global EventTracer that consumes events produced by Span and trace::log. More...
 
class  Span
 Records an event whose duration is the lifetime of the Span object. More...
 

Functions

std::unique_ptr< EventTracercreateJSONTracer (llvm::raw_ostream &OS, bool Pretty=false)
 Create an instance of EventTracer that produces an output in the Trace Event format supported by Chrome's trace viewer (chrome://tracing). More...
 
void log (const Twine &Message)
 
static Context makeSpanContext (llvm::Twine Name, json::Object *Args)
 
void log (const llvm::Twine &Name)
 Records a single instant event, associated with the current thread. More...
 

Function Documentation

◆ createJSONTracer()

std::unique_ptr< EventTracer > clang::clangd::trace::createJSONTracer ( llvm::raw_ostream &  OS,
bool  Pretty = false 
)

Create an instance of EventTracer that produces an output in the Trace Event format supported by Chrome's trace viewer (chrome://tracing).

The format is documented here: https://docs.google.com/document/d/1CvAClvFfyA5R-PhYUmn5OOQtYMH4h6I0nSsKchNAySU/preview

Definition at line 198 of file Trace.cpp.

◆ log() [1/2]

void clang::clangd::trace::log ( const llvm::Twine &  Name)

Records a single instant event, associated with the current thread.

◆ log() [2/2]

void clang::clangd::trace::log ( const Twine &  Message)

Definition at line 203 of file Trace.cpp.

References clang::clangd::Object.

◆ makeSpanContext()

static Context clang::clangd::trace::makeSpanContext ( llvm::Twine  Name,
json::Object Args 
)
static

Definition at line 210 of file Trace.cpp.