Skip to content

Commit 6ca87e5

Browse files
committed
convert comments to doxygen style
1 parent 14b5234 commit 6ca87e5

File tree

3 files changed

+38
-25
lines changed

3 files changed

+38
-25
lines changed

llvm/include/llvm/Telemetry/Telemetry.h

Lines changed: 38 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,13 @@
3636
namespace llvm {
3737
namespace telemetry {
3838

39-
// Configuration for the Telemeter class.
40-
// This struct can be extended as needed.
39+
/// Configuration for the Telemeter class.
40+
/// This stores configurations from both users and vendors and is passed
41+
/// to the Telemeter upon contruction. (Any changes to the config after
42+
/// the Telemeter's construction will not have effect on it).
43+
///
44+
/// This struct can be extended as needed to add additional configuration
45+
/// points specific to a vendor's implementation.
4146
struct Config {
4247
// If true, telemetry will be enabled.
4348
bool EnableTelemetry;
@@ -51,11 +56,11 @@ struct Config {
5156
std::vector<std::string> AdditionalDestinations;
5257
};
5358

54-
// Defines a convenient type for timestamp of various events.
55-
// This is used by the EventStats below.
59+
/// Defines a convenient type for timestamp of various events.
60+
/// This is used by the EventStats below.
5661
using SteadyTimePoint = std::chrono::time_point<std::chrono::steady_clock>;
5762

58-
// Various time (and possibly memory) statistics of an event.
63+
/// Various time (and possibly memory) statistics of an event.
5964
struct EventStats {
6065
// REQUIRED: Start time of an event
6166
SteadyTimePoint Start;
@@ -69,25 +74,34 @@ struct EventStats {
6974
: Start(Start), End(End) {}
7075
};
7176

77+
/// Describes the exit signal of an event.
78+
/// This is used by TelemetryInfo below.
7279
struct ExitDescription {
7380
int ExitCode;
7481
std::string Description;
7582
};
7683

77-
// For isa, dyn_cast, etc operations on TelemetryInfo.
84+
/// For isa, dyn_cast, etc operations on TelemetryInfo.
7885
typedef unsigned KindType;
79-
// The EntryKind is defined as a struct because it is expectend to be
80-
// extended by subclasses which may have additional TelemetryInfo
81-
// types defined.
86+
/// This struct is used by TelemetryInfo to support isa<>, dyn_cast<>
87+
/// operations.
88+
/// It is defined as a struct(rather than an enum) because it is
89+
/// expectend to be extended by subclasses which may have
90+
/// additional TelemetryInfo types defined to describe different events.
8291
struct EntryKind {
8392
static const KindType Base = 0;
8493
};
8594

86-
// TelemetryInfo is the data courier, used to forward data from
87-
// the tool being monitored to the Telemery framework.
88-
//
89-
// This base class contains only the basic set of telemetry data.
90-
// Downstream implementations can add more fields as needed.
95+
/// TelemetryInfo is the data courier, used to move instrumented data
96+
/// the tool being monitored to the Telemery framework.
97+
///
98+
/// This base class contains only the basic set of telemetry data.
99+
/// Downstream implementations can add more fields as needed to describe
100+
/// additional events.
101+
///
102+
/// For eg., The LLDB debugger can define a DebugCommandInfo subclass
103+
/// which has additional fields about the debug-command being instrumented,
104+
/// such as `CommandArguments` or `CommandName`.
91105
struct TelemetryInfo {
92106
// This represents a unique-id, conventionally corresponding to
93107
// a tools' session - ie., every time the tool starts until it exits.
@@ -123,23 +137,23 @@ struct TelemetryInfo {
123137
}
124138
};
125139

126-
// This class presents a data sink to which the Telemetry framework
127-
// sends data.
128-
//
129-
// Its implementation is transparent to the framework.
130-
// It is up to the vendor to decide which pieces of data to forward
131-
// and where to forward them.
140+
/// This class presents a data sink to which the Telemetry framework
141+
/// sends data.
142+
///
143+
/// Its implementation is transparent to the framework.
144+
/// It is up to the vendor to decide which pieces of data to forward
145+
/// and where to forward them.
132146
class Destination {
133147
public:
134148
virtual ~Destination() = default;
135149
virtual Error emitEntry(const TelemetryInfo *Entry) = 0;
136150
virtual std::string name() const = 0;
137151
};
138152

139-
// This class is the main interaction point between any LLVM tool
140-
// and this framework.
141-
// It is responsible for collecting telemetry data from the tool being
142-
// monitored.
153+
/// This class is the main interaction point between any LLVM tool
154+
/// and this framework.
155+
/// It is responsible for collecting telemetry data from the tool being
156+
/// monitored and transmitting the data elsewhere.
143157
class Telemeter {
144158
public:
145159
// Invoked upon tool startup

llvm/unittests/Telemetry/TelemetryTest.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
#include "llvm/Support/SourceMgr.h"
2020
#include "llvm/Support/raw_ostream.h"
2121
#include "gtest/gtest.h"
22-
2322
#include <chrono>
2423
#include <ctime>
2524
#include <vector>

0 commit comments

Comments
 (0)