LLDB mainline
lldb_private::LinuxPerfZeroTscConversion Struct Reference

jLLDBTraceGetState gdb-remote packet More...

#include <TraceIntelPTGDBRemotePackets.h>

Public Member Functions

uint64_t ToNanos (uint64_t tsc) const
 Convert TSC value to nanosecond wall time.
uint64_t ToTSC (uint64_t nanos) const

Public Attributes

uint32_t time_mult
uint16_t time_shift
JSONUINT64 time_zero

Detailed Description

jLLDBTraceGetState gdb-remote packet

TSC to wall time conversion values defined in the Linux perf_event_open API when the capibilities cap_user_time and cap_user_time_zero are set. See the See the documentation of time_zero in https://man7.org/linux/man-pages/man2/perf_event_open.2.html for more information.

Definition at line 90 of file TraceIntelPTGDBRemotePackets.h.

Member Function Documentation

◆ ToNanos()

uint64_t lldb_private::LinuxPerfZeroTscConversion::ToNanos ( uint64_t tsc) const

Convert TSC value to nanosecond wall time.

The beginning of time (0 nanoseconds) is defined by the kernel at boot time and has no particularly useful meaning. On the other hand, this value is constant for an entire trace session. See 'time_zero' section of https://man7.org/linux/man-pages/man2/perf_event_open.2.html

Parameters
[in]tscThe TSC value to be converted.
Returns
Nanosecond wall time.

Definition at line 75 of file TraceIntelPTGDBRemotePackets.cpp.

References time_mult, time_shift, and time_zero.

Referenced by lldb_private::trace_intel_pt::DecodedThread::NanosecondsRange::GetInterpolatedTime().

◆ ToTSC()

uint64_t lldb_private::LinuxPerfZeroTscConversion::ToTSC ( uint64_t nanos) const

Definition at line 82 of file TraceIntelPTGDBRemotePackets.cpp.

References time_mult, time_shift, and time_zero.

Member Data Documentation

◆ time_mult

uint32_t lldb_private::LinuxPerfZeroTscConversion::time_mult

◆ time_shift

uint16_t lldb_private::LinuxPerfZeroTscConversion::time_shift

◆ time_zero

JSONUINT64 lldb_private::LinuxPerfZeroTscConversion::time_zero

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