DynamoRIO
 
Loading...
Searching...
No Matches
trace_entry.h File Reference

DrMemtrace trace entry enum types and definitions. More...

#include <stddef.h>
#include <stdint.h>
#include "utils.h"

Data Structures

struct  dynamorio::drmemtrace::_trace_entry_t
 

Namespaces

namespace  dynamorio::drmemtrace
 

Macros

#define DRMEMTRACE_MODULE_LIST_FILENAME   "modules.log"
 
#define DRMEMTRACE_FUNCTION_LIST_FILENAME   "funclist.log"
 
#define DRMEMTRACE_ENCODING_FILENAME   "encodings.bin"
 
#define DRMEMTRACE_SERIAL_SCHEDULE_FILENAME   "serial_schedule.bin"
 
#define DRMEMTRACE_CPU_SCHEDULE_FILENAME   "cpu_schedule.bin.zip"
 
#define DRMEMTRACE_KERNEL_PT_SUBDIR   "kernel.raw"
 
#define DRMEMTRACE_KCORE_FILENAME   "kcore"
 
#define DRMEMTRACE_KALLSYMS_FILENAME   "kallsyms"
 

Typedefs

typedef uintptr_t dynamorio::drmemtrace::addr_t
 
typedef struct _trace_entry_t dynamorio::drmemtrace::trace_entry_t
 

Enumerations

enum  dynamorio::drmemtrace::trace_version_t {
  dynamorio::drmemtrace::TRACE_ENTRY_VERSION_NO_KERNEL_PC = 2 ,
  dynamorio::drmemtrace::TRACE_ENTRY_VERSION_KERNEL_PC = 3 ,
  dynamorio::drmemtrace::TRACE_ENTRY_VERSION_ENCODINGS = 4 ,
  dynamorio::drmemtrace::TRACE_ENTRY_VERSION_BRANCH_INFO = 5 ,
  dynamorio::drmemtrace::TRACE_ENTRY_VERSION = TRACE_ENTRY_VERSION_BRANCH_INFO
}
 
enum  dynamorio::drmemtrace::trace_type_t {
  dynamorio::drmemtrace::TRACE_TYPE_READ ,
  dynamorio::drmemtrace::TRACE_TYPE_WRITE ,
  dynamorio::drmemtrace::TRACE_TYPE_PREFETCH ,
  dynamorio::drmemtrace::TRACE_TYPE_PREFETCHT0 ,
  dynamorio::drmemtrace::TRACE_TYPE_PREFETCH_READ_L1 ,
  dynamorio::drmemtrace::TRACE_TYPE_PREFETCHT1 ,
  dynamorio::drmemtrace::TRACE_TYPE_PREFETCH_READ_L2 ,
  dynamorio::drmemtrace::TRACE_TYPE_PREFETCHT2 ,
  dynamorio::drmemtrace::TRACE_TYPE_PREFETCH_READ_L3 ,
  dynamorio::drmemtrace::TRACE_TYPE_PREFETCHNTA ,
  dynamorio::drmemtrace::TRACE_TYPE_PREFETCH_READ ,
  dynamorio::drmemtrace::TRACE_TYPE_PREFETCH_WRITE ,
  dynamorio::drmemtrace::TRACE_TYPE_PREFETCH_INSTR ,
  dynamorio::drmemtrace::TRACE_TYPE_INSTR ,
  dynamorio::drmemtrace::TRACE_TYPE_INSTR_DIRECT_JUMP ,
  dynamorio::drmemtrace::TRACE_TYPE_INSTR_INDIRECT_JUMP ,
  dynamorio::drmemtrace::TRACE_TYPE_INSTR_CONDITIONAL_JUMP ,
  dynamorio::drmemtrace::TRACE_TYPE_INSTR_DIRECT_CALL ,
  dynamorio::drmemtrace::TRACE_TYPE_INSTR_INDIRECT_CALL ,
  dynamorio::drmemtrace::TRACE_TYPE_INSTR_RETURN ,
  TRACE_TYPE_INSTR_BUNDLE ,
  dynamorio::drmemtrace::TRACE_TYPE_INSTR_FLUSH ,
  TRACE_TYPE_INSTR_FLUSH_END ,
  dynamorio::drmemtrace::TRACE_TYPE_DATA_FLUSH ,
  TRACE_TYPE_DATA_FLUSH_END ,
  TRACE_TYPE_THREAD ,
  dynamorio::drmemtrace::TRACE_TYPE_THREAD_EXIT ,
  TRACE_TYPE_PID ,
  TRACE_TYPE_HEADER ,
  dynamorio::drmemtrace::TRACE_TYPE_FOOTER ,
  dynamorio::drmemtrace::TRACE_TYPE_HARDWARE_PREFETCH ,
  dynamorio::drmemtrace::TRACE_TYPE_MARKER ,
  dynamorio::drmemtrace::TRACE_TYPE_INSTR_NO_FETCH ,
  TRACE_TYPE_INSTR_MAYBE_FETCH ,
  dynamorio::drmemtrace::TRACE_TYPE_INSTR_SYSENTER ,
  dynamorio::drmemtrace::TRACE_TYPE_PREFETCH_READ_L1_NT ,
  dynamorio::drmemtrace::TRACE_TYPE_PREFETCH_READ_L2_NT ,
  dynamorio::drmemtrace::TRACE_TYPE_PREFETCH_READ_L3_NT ,
  dynamorio::drmemtrace::TRACE_TYPE_PREFETCH_INSTR_L1 ,
  dynamorio::drmemtrace::TRACE_TYPE_PREFETCH_INSTR_L1_NT ,
  dynamorio::drmemtrace::TRACE_TYPE_PREFETCH_INSTR_L2 ,
  dynamorio::drmemtrace::TRACE_TYPE_PREFETCH_INSTR_L2_NT ,
  dynamorio::drmemtrace::TRACE_TYPE_PREFETCH_INSTR_L3 ,
  dynamorio::drmemtrace::TRACE_TYPE_PREFETCH_INSTR_L3_NT ,
  dynamorio::drmemtrace::TRACE_TYPE_PREFETCH_WRITE_L1 ,
  dynamorio::drmemtrace::TRACE_TYPE_PREFETCH_WRITE_L1_NT ,
  dynamorio::drmemtrace::TRACE_TYPE_PREFETCH_WRITE_L2 ,
  dynamorio::drmemtrace::TRACE_TYPE_PREFETCH_WRITE_L2_NT ,
  dynamorio::drmemtrace::TRACE_TYPE_PREFETCH_WRITE_L3 ,
  dynamorio::drmemtrace::TRACE_TYPE_PREFETCH_WRITE_L3_NT ,
  TRACE_TYPE_ENCODING ,
  dynamorio::drmemtrace::TRACE_TYPE_INSTR_TAKEN_JUMP ,
  dynamorio::drmemtrace::TRACE_TYPE_INSTR_UNTAKEN_JUMP
}
 
enum  dynamorio::drmemtrace::trace_marker_type_t {
  dynamorio::drmemtrace::TRACE_MARKER_TYPE_KERNEL_EVENT ,
  dynamorio::drmemtrace::TRACE_MARKER_TYPE_KERNEL_XFER ,
  dynamorio::drmemtrace::TRACE_MARKER_TYPE_TIMESTAMP ,
  dynamorio::drmemtrace::TRACE_MARKER_TYPE_CPU_ID ,
  dynamorio::drmemtrace::TRACE_MARKER_TYPE_FUNC_ID ,
  dynamorio::drmemtrace::TRACE_MARKER_TYPE_FUNC_RETADDR ,
  dynamorio::drmemtrace::TRACE_MARKER_TYPE_FUNC_ARG ,
  dynamorio::drmemtrace::TRACE_MARKER_TYPE_FUNC_RETVAL ,
  TRACE_MARKER_TYPE_SPLIT_VALUE ,
  dynamorio::drmemtrace::TRACE_MARKER_TYPE_FILETYPE ,
  dynamorio::drmemtrace::TRACE_MARKER_TYPE_CACHE_LINE_SIZE ,
  dynamorio::drmemtrace::TRACE_MARKER_TYPE_INSTRUCTION_COUNT ,
  dynamorio::drmemtrace::TRACE_MARKER_TYPE_VERSION ,
  dynamorio::drmemtrace::TRACE_MARKER_TYPE_RSEQ_ABORT ,
  dynamorio::drmemtrace::TRACE_MARKER_TYPE_WINDOW_ID ,
  dynamorio::drmemtrace::TRACE_MARKER_TYPE_PHYSICAL_ADDRESS ,
  dynamorio::drmemtrace::TRACE_MARKER_TYPE_PHYSICAL_ADDRESS_NOT_AVAILABLE ,
  dynamorio::drmemtrace::TRACE_MARKER_TYPE_VIRTUAL_ADDRESS ,
  dynamorio::drmemtrace::TRACE_MARKER_TYPE_PAGE_SIZE ,
  dynamorio::drmemtrace::TRACE_MARKER_TYPE_SYSCALL_IDX ,
  dynamorio::drmemtrace::TRACE_MARKER_TYPE_CHUNK_INSTR_COUNT ,
  dynamorio::drmemtrace::TRACE_MARKER_TYPE_CHUNK_FOOTER ,
  dynamorio::drmemtrace::TRACE_MARKER_TYPE_RECORD_ORDINAL ,
  dynamorio::drmemtrace::TRACE_MARKER_TYPE_FILTER_ENDPOINT ,
  dynamorio::drmemtrace::TRACE_MARKER_TYPE_RSEQ_ENTRY ,
  dynamorio::drmemtrace::TRACE_MARKER_TYPE_SYSCALL ,
  dynamorio::drmemtrace::TRACE_MARKER_TYPE_MAYBE_BLOCKING_SYSCALL ,
  dynamorio::drmemtrace::TRACE_MARKER_TYPE_SYSCALL_TRACE_START ,
  dynamorio::drmemtrace::TRACE_MARKER_TYPE_SYSCALL_TRACE_END ,
  TRACE_MARKER_TYPE_BRANCH_TARGET ,
  TRACE_MARKER_TYPE_RESERVED_END = 100
}
 
enum class  dynamorio::drmemtrace::func_trace_t : uint64_t { dynamorio::drmemtrace::TRACE_FUNC_ID_SYSCALL_BASE = 0x100000000ULL }
 
enum  dynamorio::drmemtrace::offline_file_type_t {
}
 

Functions

static bool dynamorio::drmemtrace::type_is_instr (const trace_type_t type)
 
static bool dynamorio::drmemtrace::type_is_instr_branch (const trace_type_t type)
 
static bool dynamorio::drmemtrace::type_is_instr_direct_branch (const trace_type_t type)
 
static bool dynamorio::drmemtrace::type_is_instr_conditional_branch (const trace_type_t type)
 
static bool dynamorio::drmemtrace::type_is_prefetch (const trace_type_t type)
 
static bool dynamorio::drmemtrace::type_has_address (const trace_type_t type)
 
static bool dynamorio::drmemtrace::type_is_data (const trace_type_t type)
 

Detailed Description

DrMemtrace trace entry enum types and definitions.

Macro Definition Documentation

◆ DRMEMTRACE_CPU_SCHEDULE_FILENAME

#define DRMEMTRACE_CPU_SCHEDULE_FILENAME   "cpu_schedule.bin.zip"

The name of the archive file in -offline mode where the cpu thread schedule is written during post-processing. A separate sub-archive is written for each cpu.

◆ DRMEMTRACE_ENCODING_FILENAME

#define DRMEMTRACE_ENCODING_FILENAME   "encodings.bin"

The name of the file in -offline mode where non-module instruction encodings are written. Use drmemtrace_get_encoding_path() to obtain the full path.

◆ DRMEMTRACE_FUNCTION_LIST_FILENAME

#define DRMEMTRACE_FUNCTION_LIST_FILENAME   "funclist.log"

The name of the file in -offline mode where function tracing names are written. Use drmemtrace_get_funclist_path() to obtain the full path.

◆ DRMEMTRACE_KALLSYMS_FILENAME

#define DRMEMTRACE_KALLSYMS_FILENAME   "kallsyms"

The name of the file in -offline mode where kallsyms is stored. This file is copied from '/proc/kallsyms' during tracing.

◆ DRMEMTRACE_KCORE_FILENAME

#define DRMEMTRACE_KCORE_FILENAME   "kcore"

The name of the file in -offline mode where the kernel code segments are stored. This file is copied from '/proc/kcore' during tracing.

◆ DRMEMTRACE_KERNEL_PT_SUBDIR

#define DRMEMTRACE_KERNEL_PT_SUBDIR   "kernel.raw"

The name of the folder in -offline mode where the kernel's per thread PT data is stored. This data is captured during online tracing.

◆ DRMEMTRACE_MODULE_LIST_FILENAME

#define DRMEMTRACE_MODULE_LIST_FILENAME   "modules.log"

The name of the file in -offline mode where module data is written. Its creation can be customized using drmemtrace_custom_module_data() and then modified before passing to raw2trace via drmodtrack_add_custom_data() and drmodtrack_offline_write(). Use drmemtrace_get_modlist_path() to obtain the full path.

◆ DRMEMTRACE_SERIAL_SCHEDULE_FILENAME

#define DRMEMTRACE_SERIAL_SCHEDULE_FILENAME   "serial_schedule.bin"

The base name of the file in -offline mode where the serial thread schedule is written during post-processing. A compression suffix may be appended.