LLDB  mainline
TraceIntelPTConstants.h
Go to the documentation of this file.
1 //===-- TraceIntelPTConstants.h ---------------------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLDB_SOURCE_PLUGINS_TRACE_INTEL_PT_CONSTANTS_H
10 #define LLDB_SOURCE_PLUGINS_TRACE_INTEL_PT_CONSTANTS_H
11 
12 #include "lldb/lldb-types.h"
13 #include <cstddef>
14 #include <llvm/ADT/Optional.h>
15 
16 namespace lldb_private {
17 namespace trace_intel_pt {
18 
19 const size_t kDefaultIptTraceSize = 4 * 1024; // 4KB
20 const size_t kDefaultProcessBufferSizeLimit = 5 * 1024 * 1024; // 500MB
21 const bool kDefaultEnableTscValue = false;
22 const llvm::Optional<size_t> kDefaultPsbPeriod = llvm::None;
23 const bool kDefaultPerCpuTracing = false;
24 const bool kDefaultDisableCgroupFiltering = false;
25 
26 // Physical address where the kernel is loaded in x86 architecture. Refer to
27 // https://github.com/torvalds/linux/blob/master/Documentation/x86/x86_64/mm.rst
28 // for the start address of kernel text section.
29 // The kernel entry point is 0x1000000 by default when KASLR is disabled.
30 const lldb::addr_t kDefaultKernelLoadAddress = 0xffffffff81000000;
32 
33 } // namespace trace_intel_pt
34 } // namespace lldb_private
35 
36 #endif // LLDB_SOURCE_PLUGINS_TRACE_INTEL_PT_CONSTANTS_H
lldb_private::trace_intel_pt::kDefaultPerCpuTracing
const bool kDefaultPerCpuTracing
Definition: TraceIntelPTConstants.h:23
lldb::addr_t
uint64_t addr_t
Definition: lldb-types.h:83
lldb_private::trace_intel_pt::kDefaultKernelLoadAddress
const lldb::addr_t kDefaultKernelLoadAddress
Definition: TraceIntelPTConstants.h:30
lldb_private::trace_intel_pt::kDefaultProcessBufferSizeLimit
const size_t kDefaultProcessBufferSizeLimit
Definition: TraceIntelPTConstants.h:20
lldb_private::trace_intel_pt::kDefaultEnableTscValue
const bool kDefaultEnableTscValue
Definition: TraceIntelPTConstants.h:21
lldb-types.h
lldb_private::trace_intel_pt::kDefaultKernelProcessID
const lldb::pid_t kDefaultKernelProcessID
Definition: TraceIntelPTConstants.h:31
lldb::pid_t
uint64_t pid_t
Definition: lldb-types.h:85
lldb_private::trace_intel_pt::kDefaultDisableCgroupFiltering
const bool kDefaultDisableCgroupFiltering
Definition: TraceIntelPTConstants.h:24
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::trace_intel_pt::kDefaultPsbPeriod
const llvm::Optional< size_t > kDefaultPsbPeriod
Definition: TraceIntelPTConstants.h:22
lldb_private::trace_intel_pt::kDefaultIptTraceSize
const size_t kDefaultIptTraceSize
Definition: TraceIntelPTConstants.h:19