CppInterOp
C++ Language Interoperability Layer
Loading...
Searching...
No Matches
Classes | Namespaces | Macros | Functions | Variables
Tracing.h File Reference
#include "CppInterOp/CppInterOpTypes.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/Support/FormatVariadic.h"
#include "llvm/Support/Timer.h"
#include "llvm/Support/raw_ostream.h"
#include <cassert>
#include <cstdint>
#include <functional>
#include <memory>
#include <optional>
#include <string>
#include <string_view>
#include <type_traits>
#include <unordered_map>
#include <vector>
Include dependency graph for Tracing.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  CppInterOp::Tracing::TraceInfo
 
struct  CppInterOp::Tracing::OutParam
 Marks a function parameter as an output container (e.g. More...
 
struct  CppInterOp::Tracing::ReproBuffer
 Internal helper to stringify arguments into a C++ call format. More...
 
struct  CppInterOp::Tracing::is_pointer_vector< T >
 Matches std::vector<T*> for any pointer element type. More...
 
struct  CppInterOp::Tracing::is_pointer_vector< std::vector< T * > >
 
struct  CppInterOp::Tracing::is_handle_vector< T >
 Detect vector-of-handle types. More...
 
struct  CppInterOp::Tracing::is_handle_vector< std::vector< Cpp::DeclRef > >
 
struct  CppInterOp::Tracing::is_handle_vector< std::vector< Cpp::FuncRef > >
 
struct  CppInterOp::Tracing::TraceData
 Holds all the data that is only needed when tracing is active. More...
 
class  CppInterOp::Tracing::TraceRegion
 
struct  CppInterOp::Tracing::TraceRegion::Proxy
 Helper to allow INTEROP_TRACE() to work with zero or more arguments without relying on non-standard ##__VA_ARGS__ comma elision. More...
 

Namespaces

namespace  CppInterOp
 
namespace  CppInterOp::Tracing
 

Macros

#define CPPINTEROP_TRACE_API
 
#define INTEROP_FUNC_SIG   __PRETTY_FUNCTION__
 
#define INTEROP_TRACE(...)
 
#define INTEROP_RETURN(Val)   _TR.record(Val)
 
#define INTEROP_VOID_RETURN()   (_TR.recordVoid())
 
#define INTEROP_OUT(Var)   CppInterOp::Tracing::MakeOutParam(Var)
 

Functions

void CppInterOp::Tracing::InitTracing ()
 Activate tracing.
 
std::string CppInterOp::Tracing::StartTracing (bool WriteOnStdErr=true)
 Begin recording a traced region.
 
void CppInterOp::Tracing::StopTracing (const std::string &Version="")
 End the traced region and write the reproducer file containing only the calls made between StartTracing() and this call.
 
template<typename Container >
OutParam CppInterOp::Tracing::MakeOutParam (const Container &C)
 Create an OutParam for any container.
 
template<typename T >
OutParam CppInterOp::Tracing::MakeOutParam (T *)
 Scalar pointer overload (e.g.
 

Variables

template<typename T >
constexpr bool CppInterOp::Tracing::is_pointer_vector_v = is_pointer_vector<T>::value
 
template<typename T >
constexpr bool CppInterOp::Tracing::is_handle_v
 Detect opaque handle structs (Cpp::DeclRef, Cpp::TypeRef, etc.)
 
template<typename T >
constexpr bool CppInterOp::Tracing::is_handle_vector_v = is_handle_vector<T>::value
 

Macro Definition Documentation

◆ CPPINTEROP_TRACE_API

#define CPPINTEROP_TRACE_API

Definition at line 23 of file Tracing.h.

◆ INTEROP_FUNC_SIG

#define INTEROP_FUNC_SIG   __PRETTY_FUNCTION__

Definition at line 850 of file Tracing.h.

◆ INTEROP_OUT

#define INTEROP_OUT (   Var)    CppInterOp::Tracing::MakeOutParam(Var)

Definition at line 861 of file Tracing.h.

◆ INTEROP_RETURN

#define INTEROP_RETURN (   Val)    _TR.record(Val)

Definition at line 858 of file Tracing.h.

◆ INTEROP_TRACE

#define INTEROP_TRACE (   ...)
Value:
INTEROP_FUNC_SIG}(__VA_ARGS__)
#define INTEROP_FUNC_SIG
Definition Tracing.h:850
Helper to allow INTEROP_TRACE() to work with zero or more arguments without relying on non-standard #...
Definition Tracing.h:786

Definition at line 853 of file Tracing.h.

◆ INTEROP_VOID_RETURN

#define INTEROP_VOID_RETURN ( )    (_TR.recordVoid())

Definition at line 859 of file Tracing.h.