LLDB mainline
|
This class indicates the time interval in which a thread was running continuously on a cpu core. More...
#include <PerfContextSwitchDecoder.h>
Public Types | |
enum class | Variant { Complete , HintedStart , HintedEnd , OnlyStart , OnlyEnd } |
In most cases both the start and end of a continuous execution can be accurately recovered from the context switch trace, but in some cases one of these endpoints might be guessed or not known at all, due to contention problems in the trace or because tracing was interrupted, e.g. More... | |
Public Member Functions | |
uint64_t | GetLowestKnownTSC () const |
uint64_t | GetStartTSC () const |
uint64_t | GetEndTSC () const |
Static Public Member Functions | |
static ThreadContinuousExecution | CreateCompleteExecution (lldb::cpu_id_t cpu_id, lldb::tid_t tid, lldb::pid_t pid, uint64_t start, uint64_t end) |
Constructors for the different variants of this object. | |
static ThreadContinuousExecution | CreateHintedStartExecution (lldb::cpu_id_t cpu_id, lldb::tid_t tid, lldb::pid_t pid, uint64_t hinted_start, uint64_t end) |
static ThreadContinuousExecution | CreateHintedEndExecution (lldb::cpu_id_t cpu_id, lldb::tid_t tid, lldb::pid_t pid, uint64_t start, uint64_t hinted_end) |
static ThreadContinuousExecution | CreateOnlyEndExecution (lldb::cpu_id_t cpu_id, lldb::tid_t tid, lldb::pid_t pid, uint64_t end) |
static ThreadContinuousExecution | CreateOnlyStartExecution (lldb::cpu_id_t cpu_id, lldb::tid_t tid, lldb::pid_t pid, uint64_t start) |
Public Attributes | |
enum lldb_private::trace_intel_pt::ThreadContinuousExecution::Variant | variant |
union { | |
struct { | |
uint64_t start | |
uint64_t end | |
} complete | |
struct { | |
uint64_t start | |
} only_start | |
struct { | |
uint64_t end | |
} only_end | |
struct { | |
uint64_t hinted_start | |
uint64_t end | |
} hinted_start | |
The following 'hinted' structures are useful when there are contention problems in the trace. More... | |
struct { | |
uint64_t start | |
uint64_t hinted_end | |
} hinted_end | |
} | tscs |
lldb::cpu_id_t | cpu_id |
lldb::tid_t | tid |
lldb::pid_t | pid |
Private Member Functions | |
ThreadContinuousExecution (lldb::cpu_id_t cpu_id, lldb::tid_t tid, lldb::pid_t pid) | |
We keep this constructor private to force the usage of the static named constructors. | |
This class indicates the time interval in which a thread was running continuously on a cpu core.
Definition at line 23 of file PerfContextSwitchDecoder.h.
|
strong |
In most cases both the start and end of a continuous execution can be accurately recovered from the context switch trace, but in some cases one of these endpoints might be guessed or not known at all, due to contention problems in the trace or because tracing was interrupted, e.g.
with ioctl calls, which causes gaps in the trace. Because of that, we identify which situation we fall into with the following variants.
Definition at line 31 of file PerfContextSwitchDecoder.h.
|
inlineprivate |
We keep this constructor private to force the usage of the static named constructors.
Definition at line 117 of file PerfContextSwitchDecoder.h.
|
static |
|
static |
Definition at line 166 of file PerfContextSwitchDecoder.cpp.
References cpu_id, hinted_end, HintedEnd, pid, start, tid, tscs, and variant.
Referenced by RecoverExecutionsFromConsecutiveRecords().
|
static |
Definition at line 156 of file PerfContextSwitchDecoder.cpp.
References cpu_id, end, hinted_start, HintedStart, pid, tid, tscs, and variant.
Referenced by RecoverExecutionsFromConsecutiveRecords().
|
static |
|
static |
Definition at line 184 of file PerfContextSwitchDecoder.cpp.
References cpu_id, only_start, OnlyStart, pid, start, tid, tscs, and variant.
uint64_t ThreadContinuousExecution::GetEndTSC | ( | ) | const |
Definition at line 131 of file PerfContextSwitchDecoder.cpp.
References Complete, HintedEnd, HintedStart, OnlyEnd, OnlyStart, tscs, and variant.
uint64_t ThreadContinuousExecution::GetLowestKnownTSC | ( | ) | const |
Definition at line 101 of file PerfContextSwitchDecoder.cpp.
References Complete, HintedEnd, HintedStart, OnlyEnd, OnlyStart, tscs, and variant.
uint64_t ThreadContinuousExecution::GetStartTSC | ( | ) | const |
Definition at line 116 of file PerfContextSwitchDecoder.cpp.
References Complete, HintedEnd, HintedStart, OnlyEnd, OnlyStart, tscs, and variant.
struct { ... } lldb_private::trace_intel_pt::ThreadContinuousExecution::complete |
Referenced by CreateCompleteExecution().
lldb::cpu_id_t lldb_private::trace_intel_pt::ThreadContinuousExecution::cpu_id |
Definition at line 110 of file PerfContextSwitchDecoder.h.
Referenced by CreateCompleteExecution(), CreateHintedEndExecution(), CreateHintedStartExecution(), CreateOnlyEndExecution(), and CreateOnlyStartExecution().
uint64_t lldb_private::trace_intel_pt::ThreadContinuousExecution::end |
Definition at line 90 of file PerfContextSwitchDecoder.h.
Referenced by CreateCompleteExecution(), CreateHintedStartExecution(), and CreateOnlyEndExecution().
uint64_t lldb_private::trace_intel_pt::ThreadContinuousExecution::hinted_end |
Definition at line 106 of file PerfContextSwitchDecoder.h.
Referenced by CreateHintedEndExecution().
struct { ... } lldb_private::trace_intel_pt::ThreadContinuousExecution::hinted_end |
uint64_t lldb_private::trace_intel_pt::ThreadContinuousExecution::hinted_start |
Definition at line 101 of file PerfContextSwitchDecoder.h.
Referenced by CreateHintedStartExecution().
struct { ... } lldb_private::trace_intel_pt::ThreadContinuousExecution::hinted_start |
The following 'hinted' structures are useful when there are contention problems in the trace.
struct { ... } lldb_private::trace_intel_pt::ThreadContinuousExecution::only_end |
Referenced by CreateOnlyEndExecution().
struct { ... } lldb_private::trace_intel_pt::ThreadContinuousExecution::only_start |
Referenced by CreateOnlyStartExecution().
lldb::pid_t lldb_private::trace_intel_pt::ThreadContinuousExecution::pid |
Definition at line 112 of file PerfContextSwitchDecoder.h.
Referenced by CreateCompleteExecution(), CreateHintedEndExecution(), CreateHintedStartExecution(), CreateOnlyEndExecution(), and CreateOnlyStartExecution().
uint64_t lldb_private::trace_intel_pt::ThreadContinuousExecution::start |
Definition at line 89 of file PerfContextSwitchDecoder.h.
Referenced by CreateCompleteExecution(), CreateHintedEndExecution(), and CreateOnlyStartExecution().
lldb::tid_t lldb_private::trace_intel_pt::ThreadContinuousExecution::tid |
Definition at line 111 of file PerfContextSwitchDecoder.h.
Referenced by CreateCompleteExecution(), CreateHintedEndExecution(), CreateHintedStartExecution(), CreateOnlyEndExecution(), and CreateOnlyStartExecution().
union { ... } lldb_private::trace_intel_pt::ThreadContinuousExecution::tscs |
enum lldb_private::trace_intel_pt::ThreadContinuousExecution::Variant lldb_private::trace_intel_pt::ThreadContinuousExecution::variant |