14#ifndef LLVM_TELEMETRY_TELEMETRY_H
15#define LLVM_TELEMETRY_TELEMETRY_H
49 template <
typename T,
typename =
typename T::mapped_type>
51 static_assert(std::is_convertible_v<typename T::key_type, StringRef>,
52 "KeyType must be convertible to string");
54 for (
const auto &KeyVal : Map)
55 write(KeyVal.first, KeyVal.second);
81 virtual std::optional<std::string>
makeSessionId() {
return std::nullopt; }
168 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
Manager & operator=(Manager const &)=delete
virtual ~Manager()=default
virtual Error preDispatch(TelemetryInfo *Entry)
void addDestination(std::unique_ptr< Destination > Destination)
virtual Error dispatch(TelemetryInfo *Entry)
Manager(Manager const &)=delete
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.
static constexpr bool BuildTimeEnableTelemetry
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