Go to the documentation of this file.
9 #ifndef LLDB_TARGET_STATISTICS_H
10 #define LLDB_TARGET_STATISTICS_H
15 #include "llvm/Support/JSON.h"
29 using Duration = std::chrono::duration<double>;
37 value.fetch_add(std::chrono::duration_cast<InternalDuration>(dur).count(),
38 std::memory_order_relaxed);
90 llvm::json::Value
ToJSON()
const;
98 llvm::json::Value
ToJSON()
const;
124 llvm::json::Value
ToJSON()
const;
181 #endif // LLDB_TARGET_STATISTICS_H
llvm::json::Value ToJSON() const
llvm::json::Value ToJSON() const
static bool g_collecting_stats
bool debug_info_index_loaded_from_cache
StatsSuccessFail & GetExpressionStats()
bool debug_info_index_saved_to_cache
static void SetCollectingStats(bool enable)
StatsDuration & GetCreateTime()
std::chrono::duration< double > Duration
StatsSuccessFail m_frame_var
A class that measures elapsed time in an exception safe way.
A class that represents statistics for a since lldb_private::Target.
bool symtab_saved_to_cache
StatsDuration & operator+=(Duration dur)
std::chrono::duration< uint64_t, std::micro > InternalDuration
llvm::Optional< StatsTimepoint > m_launch_or_attach_time
bool symtab_loaded_from_cache
static double elapsed(const StatsTimepoint &start, const StatsTimepoint &end)
llvm::json::Value ToJSON(Target &target)
A class that represents statistics for a since lldb_private::Module.
std::vector< intptr_t > symfile_modules
std::chrono::high_resolution_clock StatsClock
A class to count success/fail statistics.
void SetFirstPublicStopTime()
std::vector< intptr_t > m_module_identifiers
string(SUBSTRING ${p} 10 -1 pStripped) if($
static bool GetCollectingStats()
static llvm::json::Value ReportStatistics(Debugger &debugger, Target *target)
Get metrics associated with one or all targets in a debugger in JSON format.
StatsSuccessFail(llvm::StringRef n)
std::chrono::time_point< StatsClock > StatsTimepoint
StatsTimepoint m_start_time
Set to the start time when the object is created.
StatsSuccessFail & GetFrameVariableStats()
std::atomic< uint64_t > value
void SetFirstPrivateStopTime()
static MemoryStats GetMemoryStats()
ConstString::MemoryStats stats
ElapsedTime(StatsDuration &opt_time)
StatsSuccessFail m_expr_eval
StatsDuration & m_elapsed_time
Elapsed time in seconds to increment when this object goes out of scope.
A class that represents a running process on the host machine.
llvm::json::Value ToJSON() const
llvm::Optional< StatsTimepoint > m_first_public_stop_time
void CollectStats(Target &target)
StatsDuration m_create_time
llvm::Optional< StatsTimepoint > m_first_private_stop_time
void SetLaunchOrAttachTime()