clang-tools 8.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< EventTracer > | 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). More...
void | log (const llvm::Twine &Name)
| Records a single instant event, associated with the current thread. More...
static Context | makeSpanContext (llvm::Twine Name, llvm::json::Object *Args)

## 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 200 of file Trace.cpp.

## ◆ log()

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

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

Definition at line 205 of file Trace.cpp.

Referenced by clang::clangd::StreamLogger::log().

## ◆ makeSpanContext()

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

Definition at line 212 of file Trace.cpp.