LLDB mainline
lldb_private::telemetry::CommandInfo Struct Reference

#include <Telemetry.h>

Inheritance diagram for lldb_private::telemetry::CommandInfo:
[legend]

Public Member Functions

 CommandInfo ()=default
llvm::telemetry::KindType getKind () const override
void serialize (llvm::telemetry::Serializer &serializer) const override
Public Member Functions inherited from lldb_private::telemetry::LLDBBaseTelemetryInfo
llvm::telemetry::KindType getKind () const override
void serialize (llvm::telemetry::Serializer &serializer) const override

Static Public Member Functions

static bool classof (const llvm::telemetry::TelemetryInfo *T)
static uint64_t GetNextID ()
Static Public Member Functions inherited from lldb_private::telemetry::LLDBBaseTelemetryInfo
static bool classof (const llvm::telemetry::TelemetryInfo *t)

Public Attributes

UUID target_uuid
 If the command is/can be associated with a target entry this field contains that target's UUID.
uint64_t command_id = 0
 A unique ID for a command so the manager can match the start entry with its end entry.
std::string command_name
 The command name(eg., "breakpoint set")
std::optional< lldb::ReturnStatusret_status
 Return status of a command and any error description in case of error.
std::optional< std::string > error_data
std::optional< std::string > original_command
 These two fields are not collected by default due to PII risks.
std::optional< std::string > args
Public Attributes inherited from lldb_private::telemetry::LLDBBaseTelemetryInfo
SteadyTimePoint start_time
 Start time of an event.
std::optional< SteadyTimePointend_time
 End time of an event - may be empty if not meaningful.
lldb::user_id_t debugger_id = LLDB_INVALID_UID
Debuggerdebugger = nullptr

Static Private Attributes

static std::atomic< uint64_t > g_command_id_seed = 1

Detailed Description

Definition at line 119 of file Telemetry.h.

Constructor & Destructor Documentation

◆ CommandInfo()

lldb_private::telemetry::CommandInfo::CommandInfo ( )
default

Member Function Documentation

◆ classof()

bool lldb_private::telemetry::CommandInfo::classof ( const llvm::telemetry::TelemetryInfo * T)
inlinestatic

Definition at line 148 of file Telemetry.h.

References lldb_private::telemetry::LLDBEntryKind::CommandInfo.

◆ getKind()

llvm::telemetry::KindType lldb_private::telemetry::CommandInfo::getKind ( ) const
inlineoverride

Definition at line 144 of file Telemetry.h.

References lldb_private::telemetry::LLDBEntryKind::CommandInfo.

◆ GetNextID()

uint64_t lldb_private::telemetry::CommandInfo::GetNextID ( )
static

Definition at line 80 of file Telemetry.cpp.

References g_command_id_seed.

Referenced by lldb_private::CommandInterpreter::HandleCommand().

◆ serialize()

void lldb_private::telemetry::CommandInfo::serialize ( llvm::telemetry::Serializer & serializer) const
override

Member Data Documentation

◆ args

std::optional<std::string> lldb_private::telemetry::CommandInfo::args

Definition at line 136 of file Telemetry.h.

Referenced by lldb_private::CommandInterpreter::HandleCommand(), and serialize().

◆ command_id

uint64_t lldb_private::telemetry::CommandInfo::command_id = 0

A unique ID for a command so the manager can match the start entry with its end entry.

These values only need to be unique within the same session. Necessary because we'd send off an entry right before a command's execution and another right after. This is to avoid losing telemetry if the command does not execute successfully.

Definition at line 128 of file Telemetry.h.

Referenced by lldb_private::CommandInterpreter::HandleCommand(), and serialize().

◆ command_name

std::string lldb_private::telemetry::CommandInfo::command_name

The command name(eg., "breakpoint set")

Definition at line 130 of file Telemetry.h.

Referenced by lldb_private::CommandInterpreter::HandleCommand(), and serialize().

◆ error_data

std::optional<std::string> lldb_private::telemetry::CommandInfo::error_data

Definition at line 140 of file Telemetry.h.

Referenced by lldb_private::CommandInterpreter::HandleCommand(), and serialize().

◆ g_command_id_seed

std::atomic< uint64_t > lldb_private::telemetry::CommandInfo::g_command_id_seed = 1
staticprivate

Definition at line 162 of file Telemetry.h.

Referenced by GetNextID().

◆ original_command

std::optional<std::string> lldb_private::telemetry::CommandInfo::original_command

These two fields are not collected by default due to PII risks.

Vendor may allow them by setting the LLDBConfig::detailed_command_telemetry.

Definition at line 135 of file Telemetry.h.

Referenced by lldb_private::CommandInterpreter::HandleCommand(), and serialize().

◆ ret_status

std::optional<lldb::ReturnStatus> lldb_private::telemetry::CommandInfo::ret_status

Return status of a command and any error description in case of error.

Definition at line 139 of file Telemetry.h.

Referenced by lldb_private::CommandInterpreter::HandleCommand(), and serialize().

◆ target_uuid

UUID lldb_private::telemetry::CommandInfo::target_uuid

If the command is/can be associated with a target entry this field contains that target's UUID.

<EMPTY> otherwise.

Definition at line 122 of file Telemetry.h.

Referenced by lldb_private::CommandInterpreter::HandleCommand(), and serialize().


The documentation for this struct was generated from the following files: