14#ifndef LLVM_TELEMETRY_TELEMETRY_H
15#define LLVM_TELEMETRY_TELEMETRY_H
48 template <
typename T,
typename =
typename T::mapped_type>
50 static_assert(std::is_convertible_v<typename T::key_type, StringRef>,
51 "KeyType must be convertible to string");
53 for (
const auto &KeyVal : Map)
54 write(KeyVal.first, KeyVal.second);
73 virtual std::optional<std::string>
makeSessionId() {
return std::nullopt; }
154 std::vector<std::unique_ptr<Destination>> Destinations;
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
This file defines the DenseMap class.
Lightweight error class with error context and mandatory checking.
A wrapper around a string literal that serves as a proxy for constructing global tables of StringRefs...
StringRef - Represent a constant reference to a string, i.e.
LLVM Value Representation.
This class presents a data sink to which the Telemetry framework sends data.
virtual Error receiveEntry(const TelemetryInfo *Entry)=0
virtual StringLiteral name() const =0
virtual ~Destination()=default
This class is the main interaction point between any LLVM tool and this framework.
virtual Error preDispatch(TelemetryInfo *Entry)=0
virtual ~Manager()=default
void addDestination(std::unique_ptr< Destination > Destination)
virtual Error dispatch(TelemetryInfo *Entry)
virtual void write(StringRef KeyName, unsigned long Value)=0
virtual ~Serializer()=default
virtual void write(StringRef KeyName, unsigned int Value)=0
virtual void write(StringRef KeyName, bool Value)=0
virtual void write(StringRef KeyName, long long Value)=0
virtual Error finalize()=0
virtual void write(StringRef KeyName, int Value)=0
virtual void write(StringRef KeyName, long Value)=0
virtual void beginObject(StringRef KeyName)=0
virtual void write(StringRef KeyName, StringRef Value)=0
virtual void write(StringRef KeyName, unsigned long long Value)=0
void write(StringRef KeyName, const T &Map)
virtual void endObject()=0
unsigned KindType
For isa, dyn_cast, etc operations on TelemetryInfo.
This is an optimization pass for GlobalISel generic memory operations.
Configuration for the Manager class.
const bool EnableTelemetry
virtual ~Config()=default
virtual std::optional< std::string > makeSessionId()
This struct is used by TelemetryInfo to support isa<>, dyn_cast<> operations.
static const KindType Base
TelemetryInfo is the data courier, used to move instrumented data from the tool being monitored to th...
virtual void serialize(Serializer &serializer) const
virtual KindType getKind() const
static bool classof(const TelemetryInfo *T)
virtual ~TelemetryInfo()=default