LLVM 20.0.0git
Telemetry.cpp
Go to the documentation of this file.
2
3namespace llvm {
4namespace telemetry {
5
6void TelemetryInfo::serialize(Serializer &serializer) const {
7 serializer.write("SessionId", SessionId);
8}
9
11 if (Error Err = preDispatch(Entry))
12 return Err;
13
14 Error AllErrs = Error::success();
15 for (auto &Dest : Destinations) {
16 AllErrs = joinErrors(std::move(AllErrs), Dest->receiveEntry(Entry));
17 }
18 return AllErrs;
19}
20
21void Manager::addDestination(std::unique_ptr<Destination> Dest) {
22 Destinations.push_back(std::move(Dest));
23}
24
25} // namespace telemetry
26} // namespace llvm
This file provides the basic framework for Telemetry.
Lightweight error class with error context and mandatory checking.
Definition: Error.h:160
static ErrorSuccess success()
Create a success value.
Definition: Error.h:337
virtual Error preDispatch(TelemetryInfo *Entry)=0
void addDestination(std::unique_ptr< Destination > Destination)
Definition: Telemetry.cpp:21
virtual Error dispatch(TelemetryInfo *Entry)
Definition: Telemetry.cpp:10
virtual void write(StringRef KeyName, bool Value)=0
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
Error joinErrors(Error E1, Error E2)
Concatenate errors.
Definition: Error.h:438
TelemetryInfo is the data courier, used to move instrumented data from the tool being monitored to th...
Definition: Telemetry.h:97
virtual void serialize(Serializer &serializer) const
Definition: Telemetry.cpp:6