LLDB  mainline
Public Member Functions | Public Attributes | List of all members
lldb_private::LinuxPerfZeroTscConversion Struct Reference

jLLDBTraceGetState gdb-remote packet More...

#include <TraceIntelPTGDBRemotePackets.h>

Collaboration diagram for lldb_private::LinuxPerfZeroTscConversion:
Collaboration graph
[legend]

Public Member Functions

uint64_t ToNanos (uint64_t tsc) const
 Convert TSC value to nanosecond wall time. More...
 
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 89 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.

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.

Member Data Documentation

◆ time_mult

uint32_t lldb_private::LinuxPerfZeroTscConversion::time_mult

◆ time_shift

uint16_t lldb_private::LinuxPerfZeroTscConversion::time_shift

Definition at line 107 of file TraceIntelPTGDBRemotePackets.h.

Referenced by lldb_private::fromJSON(), and lldb_private::toJSON().

◆ time_zero

JSONUINT64 lldb_private::LinuxPerfZeroTscConversion::time_zero

Definition at line 108 of file TraceIntelPTGDBRemotePackets.h.

Referenced by lldb_private::fromJSON(), and lldb_private::toJSON().


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