Linux Perf
intel-bts.c File Reference
#include <errno.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/bitops.h>
#include <linux/log2.h>
#include "../../util/cpumap.h"
#include "../../util/evsel.h"
#include "../../util/evlist.h"
#include "../../util/session.h"
#include "../../util/util.h"
#include "../../util/pmu.h"
#include "../../util/debug.h"
#include "../../util/tsc.h"
#include "../../util/auxtrace.h"
#include "../../util/intel-bts.h"
Include dependency graph for intel-bts.c:

Go to the source code of this file.

Classes

struct  intel_bts_snapshot_ref
 
struct  intel_bts_recording
 
struct  branch
 

Macros

#define KiB(x)   ((x) * 1024)
 
#define MiB(x)   ((x) * 1024 * 1024)
 
#define KiB_MASK(x)   (KiB(x) - 1)
 
#define MiB_MASK(x)   (MiB(x) - 1)
 

Functions

static size_t intel_bts_info_priv_size (struct auxtrace_record *itr __maybe_unused, struct perf_evlist *evlist __maybe_unused)
 
static int intel_bts_info_fill (struct auxtrace_record *itr, struct perf_session *session, struct auxtrace_info_event *auxtrace_info, size_t priv_size)
 
static int intel_bts_recording_options (struct auxtrace_record *itr, struct perf_evlist *evlist, struct record_opts *opts)
 
static int intel_bts_parse_snapshot_options (struct auxtrace_record *itr, struct record_opts *opts, const char *str)
 
static u64 intel_bts_reference (struct auxtrace_record *itr __maybe_unused)
 
static int intel_bts_alloc_snapshot_refs (struct intel_bts_recording *btsr, int idx)
 
static void intel_bts_free_snapshot_refs (struct intel_bts_recording *btsr)
 
static void intel_bts_recording_free (struct auxtrace_record *itr)
 
static int intel_bts_snapshot_start (struct auxtrace_record *itr)
 
static int intel_bts_snapshot_finish (struct auxtrace_record *itr)
 
static bool intel_bts_first_wrap (u64 *data, size_t buf_size)
 
static int intel_bts_find_snapshot (struct auxtrace_record *itr, int idx, struct auxtrace_mmap *mm, unsigned char *data, u64 *head, u64 *old)
 
static int intel_bts_read_finish (struct auxtrace_record *itr, int idx)
 
struct auxtrace_recordintel_bts_recording_init (int *err)
 

Macro Definition Documentation

◆ KiB

#define KiB (   x)    ((x) * 1024)

Definition at line 33 of file intel-bts.c.

◆ KiB_MASK

#define KiB_MASK (   x)    (KiB(x) - 1)

Definition at line 35 of file intel-bts.c.

◆ MiB

#define MiB (   x)    ((x) * 1024 * 1024)

Definition at line 34 of file intel-bts.c.

◆ MiB_MASK

#define MiB_MASK (   x)    (MiB(x) - 1)

Definition at line 36 of file intel-bts.c.

Function Documentation

◆ intel_bts_alloc_snapshot_refs()

static int intel_bts_alloc_snapshot_refs ( struct intel_bts_recording btsr,
int  idx 
)
static

Definition at line 278 of file intel-bts.c.

Here is the call graph for this function:

◆ intel_bts_find_snapshot()

static int intel_bts_find_snapshot ( struct auxtrace_record itr,
int  idx,
struct auxtrace_mmap mm,
unsigned char *  data,
u64 *  head,
u64 *  old 
)
static

Definition at line 364 of file intel-bts.c.

Here is the call graph for this function:

◆ intel_bts_first_wrap()

static bool intel_bts_first_wrap ( u64 *  data,
size_t  buf_size 
)
static

Definition at line 347 of file intel-bts.c.

◆ intel_bts_free_snapshot_refs()

static void intel_bts_free_snapshot_refs ( struct intel_bts_recording btsr)
static

Definition at line 303 of file intel-bts.c.

◆ intel_bts_info_fill()

static int intel_bts_info_fill ( struct auxtrace_record itr,
struct perf_session session,
struct auxtrace_info_event auxtrace_info,
size_t  priv_size 
)
static

Definition at line 67 of file intel-bts.c.

Here is the call graph for this function:

◆ intel_bts_info_priv_size()

static size_t intel_bts_info_priv_size ( struct auxtrace_record *itr  __maybe_unused,
struct perf_evlist *evlist  __maybe_unused 
)
static

Definition at line 61 of file intel-bts.c.

◆ intel_bts_parse_snapshot_options()

static int intel_bts_parse_snapshot_options ( struct auxtrace_record itr,
struct record_opts opts,
const char *  str 
)
static

Definition at line 250 of file intel-bts.c.

◆ intel_bts_read_finish()

static int intel_bts_read_finish ( struct auxtrace_record itr,
int  idx 
)
static

Definition at line 416 of file intel-bts.c.

Here is the call graph for this function:

◆ intel_bts_recording_free()

static void intel_bts_recording_free ( struct auxtrace_record itr)
static

Definition at line 312 of file intel-bts.c.

Here is the call graph for this function:

◆ intel_bts_recording_init()

struct auxtrace_record* intel_bts_recording_init ( int *  err)

Definition at line 430 of file intel-bts.c.

Here is the call graph for this function:

◆ intel_bts_recording_options()

static int intel_bts_recording_options ( struct auxtrace_record itr,
struct perf_evlist evlist,
struct record_opts opts 
)
static

Definition at line 110 of file intel-bts.c.

Here is the call graph for this function:

◆ intel_bts_reference()

static u64 intel_bts_reference ( struct auxtrace_record *itr  __maybe_unused)
static

Definition at line 273 of file intel-bts.c.

Here is the call graph for this function:

◆ intel_bts_snapshot_finish()

static int intel_bts_snapshot_finish ( struct auxtrace_record itr)
static

Definition at line 334 of file intel-bts.c.

Here is the call graph for this function:

◆ intel_bts_snapshot_start()

static int intel_bts_snapshot_start ( struct auxtrace_record itr)
static

Definition at line 321 of file intel-bts.c.

Here is the call graph for this function: