clang-tools 8.0.0

Classes | Namespaces | Macros | Functions
Trace.h File Reference
`#include "Context.h"`
`#include "Function.h"`
`#include "llvm/ADT/Twine.h"`
`#include "llvm/Support/JSON.h"`
`#include "llvm/Support/raw_ostream.h"`
Include dependency graph for Trace.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

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

## Namespaces
| clang
| ===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
| clang::clangd
| clang::clangd::trace

## Macros
#define | SPAN_ATTACH(S, Name, Expr)
| Attach a key-value pair to a Span event. More...

## Functions
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). More...
void | clang::clangd::trace::log (const llvm::Twine &Name)
| Records a single instant event, associated with the current thread. More...

## Macro Definition Documentation

## ◆ SPAN_ATTACH

#define SPAN_ATTACH | ( |  | S,
|  |  | Name,
|  |  | Expr
| ) |  |

Value:
do { \
if (auto *Args = (S).Args) \
(*Args)[Name] = Expr; \
} while (0)
Name
static constexpr llvm::StringLiteral Name
Definition: UppercaseLiteralSuffixCheck.cpp:28

Attach a key-value pair to a Span event.

This is not threadsafe when used with the same Span.

Definition at line 99 of file Trace.h.