Linux Perf
hists_link.c File Reference
#include "perf.h"
#include "tests.h"
#include "debug.h"
#include "symbol.h"
#include "sort.h"
#include "evsel.h"
#include "evlist.h"
#include "machine.h"
#include "thread.h"
#include "parse-events.h"
#include "hists_common.h"
#include <errno.h>
#include <linux/kernel.h>
Include dependency graph for hists_link.c:

Go to the source code of this file.

Classes

struct  sample
 

Functions

static int add_hist_entries (struct perf_evlist *evlist, struct machine *machine)
 
static int find_sample (struct sample *samples, size_t nr_samples, struct thread *t, struct map *m, struct symbol *s)
 
static int __validate_match (struct hists *hists)
 
static int validate_match (struct hists *leader, struct hists *other)
 
static int __validate_link (struct hists *hists, int idx)
 
static int validate_link (struct hists *leader, struct hists *other)
 
int test__hists_link (struct test *test __maybe_unused, int subtest __maybe_unused)
 

Variables

static struct sample fake_common_samples []
 
static struct sample fake_samples [][5]
 

Function Documentation

◆ __validate_link()

static int __validate_link ( struct hists hists,
int  idx 
)
static

Definition at line 190 of file hists_link.c.

Here is the call graph for this function:

◆ __validate_match()

static int __validate_match ( struct hists hists)
static

Definition at line 142 of file hists_link.c.

Here is the call graph for this function:

◆ add_hist_entries()

static int add_hist_entries ( struct perf_evlist evlist,
struct machine machine 
)
static

Definition at line 65 of file hists_link.c.

Here is the call graph for this function:

◆ find_sample()

static int find_sample ( struct sample samples,
size_t  nr_samples,
struct thread t,
struct map m,
struct symbol s 
)
static

Definition at line 130 of file hists_link.c.

◆ test__hists_link()

int test__hists_link ( struct test *test  __maybe_unused,
int subtest  __maybe_unused 
)

Definition at line 268 of file hists_link.c.

Here is the call graph for this function:

◆ validate_link()

static int validate_link ( struct hists leader,
struct hists other 
)
static

Definition at line 263 of file hists_link.c.

Here is the call graph for this function:

◆ validate_match()

static int validate_match ( struct hists leader,
struct hists other 
)
static

Definition at line 185 of file hists_link.c.

Here is the call graph for this function:

Variable Documentation

◆ fake_common_samples

struct sample fake_common_samples[]
static
Initial value:
= {
{ .pid = FAKE_PID_PERF2, .ip = FAKE_IP_PERF_MAIN, },
{ .pid = FAKE_PID_BASH, .ip = FAKE_IP_BASH_XMALLOC, },
{ .pid = FAKE_PID_BASH, .ip = FAKE_IP_LIBC_MALLOC, },
}
#define FAKE_IP_BASH_XMALLOC
Definition: hists_common.h:27
#define FAKE_IP_LIBC_MALLOC
Definition: hists_common.h:29
#define FAKE_IP_PERF_MAIN
Definition: hists_common.h:23
#define FAKE_IP_KERNEL_SCHEDULE
Definition: hists_common.h:32
#define FAKE_PID_PERF2
Definition: hists_common.h:9
#define FAKE_IP_PERF_CMD_RECORD
Definition: hists_common.h:25
#define FAKE_PID_PERF1
Definition: hists_common.h:8
#define FAKE_PID_BASH
Definition: hists_common.h:10

Definition at line 25 of file hists_link.c.

◆ fake_samples

struct sample fake_samples[][5]
static
Initial value:
= {
{
{ .pid = FAKE_PID_PERF1, .ip = FAKE_IP_LIBC_MALLOC, },
{ .pid = FAKE_PID_BASH, .ip = FAKE_IP_LIBC_FREE, },
},
{
{ .pid = FAKE_PID_PERF2, .ip = FAKE_IP_LIBC_FREE, },
{ .pid = FAKE_PID_BASH, .ip = FAKE_IP_LIBC_MALLOC, },
{ .pid = FAKE_PID_BASH, .ip = FAKE_IP_BASH_XFREE, },
{ .pid = FAKE_PID_BASH, .ip = FAKE_IP_LIBC_REALLOC, },
},
}
#define FAKE_IP_KERNEL_SYS_PERF_EVENT_OPEN
Definition: hists_common.h:34
#define FAKE_IP_BASH_XFREE
Definition: hists_common.h:28
#define FAKE_IP_LIBC_MALLOC
Definition: hists_common.h:29
#define FAKE_IP_LIBC_REALLOC
Definition: hists_common.h:31
#define FAKE_PID_PERF2
Definition: hists_common.h:9
#define FAKE_PID_PERF1
Definition: hists_common.h:8
#define FAKE_IP_PERF_RUN_COMMAND
Definition: hists_common.h:24
#define FAKE_IP_KERNEL_PAGE_FAULT
Definition: hists_common.h:33
#define FAKE_PID_BASH
Definition: hists_common.h:10
#define FAKE_IP_LIBC_FREE
Definition: hists_common.h:30

Definition at line 38 of file hists_link.c.