Linux Perf
builtin-mem.c File Reference
#include <inttypes.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include "builtin.h"
#include "perf.h"
#include <subcmd/parse-options.h>
#include "util/trace-event.h"
#include "util/tool.h"
#include "util/session.h"
#include "util/data.h"
#include "util/mem-events.h"
#include "util/debug.h"
#include "util/symbol.h"
Include dependency graph for builtin-mem.c:

Go to the source code of this file.

Classes

struct  perf_mem
 
struct  mem_mode
 

Macros

#define MEM_OPERATION_LOAD   0x1
 
#define MEM_OPERATION_STORE   0x2
 
#define MEM_OPT(n, m)   { .name = n, .mode = (m) }
 
#define MEM_END   { .name = NULL }
 

Functions

static int parse_record_events (const struct option *opt, const char *str, int unset __maybe_unused)
 
static int __cmd_record (int argc, const char **argv, struct perf_mem *mem)
 
static int dump_raw_samples (struct perf_tool *tool, union perf_event *event, struct perf_sample *sample, struct machine *machine)
 
static int process_sample_event (struct perf_tool *tool, union perf_event *event, struct perf_sample *sample, struct perf_evsel *evsel __maybe_unused, struct machine *machine)
 
static int report_raw_events (struct perf_mem *mem)
 
static int report_events (int argc, const char **argv, struct perf_mem *mem)
 
static int parse_mem_ops (const struct option *opt, const char *str, int unset)
 
int cmd_mem (int argc, const char **argv)
 

Variables

static const char *const __usage []
 
static const char *const * record_mem_usage = __usage
 
static const struct mem_mode mem_modes []
 

Macro Definition Documentation

◆ MEM_END

#define MEM_END   { .name = NULL }

Definition at line 325 of file builtin-mem.c.

◆ MEM_OPERATION_LOAD

#define MEM_OPERATION_LOAD   0x1

Definition at line 18 of file builtin-mem.c.

◆ MEM_OPERATION_STORE

#define MEM_OPERATION_STORE   0x2

Definition at line 19 of file builtin-mem.c.

◆ MEM_OPT

#define MEM_OPT (   n,
 
)    { .name = n, .mode = (m) }

Definition at line 322 of file builtin-mem.c.

Function Documentation

◆ __cmd_record()

static int __cmd_record ( int  argc,
const char **  argv,
struct perf_mem mem 
)
static

Definition at line 67 of file builtin-mem.c.

Here is the call graph for this function:

◆ cmd_mem()

int cmd_mem ( int  argc,
const char **  argv 
)

Definition at line 386 of file builtin-mem.c.

Here is the call graph for this function:

◆ dump_raw_samples()

static int dump_raw_samples ( struct perf_tool tool,
union perf_event event,
struct perf_sample sample,
struct machine machine 
)
static

Definition at line 149 of file builtin-mem.c.

Here is the call graph for this function:

◆ parse_mem_ops()

static int parse_mem_ops ( const struct option *  opt,
const char *  str,
int  unset 
)
static

Definition at line 334 of file builtin-mem.c.

Here is the call graph for this function:

◆ parse_record_events()

static int parse_record_events ( const struct option *  opt,
const char *  str,
int unset  __maybe_unused 
)
static

Definition at line 33 of file builtin-mem.c.

Here is the call graph for this function:

◆ process_sample_event()

static int process_sample_event ( struct perf_tool tool,
union perf_event event,
struct perf_sample sample,
struct perf_evsel *evsel  __maybe_unused,
struct machine machine 
)
static

Definition at line 229 of file builtin-mem.c.

Here is the call graph for this function:

◆ report_events()

static int report_events ( int  argc,
const char **  argv,
struct perf_mem mem 
)
static

Definition at line 277 of file builtin-mem.c.

Here is the call graph for this function:

◆ report_raw_events()

static int report_raw_events ( struct perf_mem mem)
static

Definition at line 238 of file builtin-mem.c.

Here is the call graph for this function:

Variable Documentation

◆ __usage

const char* const __usage[]
static
Initial value:
= {
"perf mem record [<options>] [<command>]",
"perf mem record [<options>] -- <command> [<options>]",
NULL
}

Definition at line 59 of file builtin-mem.c.

◆ mem_modes

const struct mem_mode mem_modes[]
static
Initial value:
={
}
#define MEM_END
Definition: builtin-mem.c:325
#define MEM_OPERATION_LOAD
Definition: builtin-mem.c:18
#define MEM_OPERATION_STORE
Definition: builtin-mem.c:19
#define MEM_OPT(n, m)
Definition: builtin-mem.c:322

Definition at line 327 of file builtin-mem.c.

◆ record_mem_usage

const char* const* record_mem_usage = __usage
static

Definition at line 65 of file builtin-mem.c.