Linux Perf
bp_account.c File Reference
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <sys/ioctl.h>
#include <time.h>
#include <fcntl.h>
#include <signal.h>
#include <sys/mman.h>
#include <linux/compiler.h>
#include <linux/hw_breakpoint.h>
#include "tests.h"
#include "debug.h"
#include "perf.h"
#include "cloexec.h"
Include dependency graph for bp_account.c:

Go to the source code of this file.

Macros

#define __SANE_USERSPACE_TYPES__
 

Functions

static noinline int test_function (void)
 
static int __event (bool is_x, void *addr, struct perf_event_attr *attr)
 
static int wp_event (void *addr, struct perf_event_attr *attr)
 
static int bp_event (void *addr, struct perf_event_attr *attr)
 
static int bp_accounting (int wp_cnt, int share)
 
static int detect_cnt (bool is_x)
 
static int detect_ioctl (void)
 
static int detect_share (int wp_cnt, int bp_cnt)
 
int test__bp_accounting (struct test *test __maybe_unused, int subtest __maybe_unused)
 

Variables

volatile long the_var
 

Macro Definition Documentation

◆ __SANE_USERSPACE_TYPES__

#define __SANE_USERSPACE_TYPES__

Definition at line 5 of file bp_account.c.

Function Documentation

◆ __event()

static int __event ( bool  is_x,
void *  addr,
struct perf_event_attr *  attr 
)
static

Definition at line 32 of file bp_account.c.

Here is the call graph for this function:

◆ bp_accounting()

static int bp_accounting ( int  wp_cnt,
int  share 
)
static

Definition at line 71 of file bp_account.c.

Here is the call graph for this function:

◆ bp_event()

static int bp_event ( void *  addr,
struct perf_event_attr *  attr 
)
static

Definition at line 66 of file bp_account.c.

Here is the call graph for this function:

◆ detect_cnt()

static int detect_cnt ( bool  is_x)
static

Definition at line 103 of file bp_account.c.

Here is the call graph for this function:

◆ detect_ioctl()

static int detect_ioctl ( void  )
static

Definition at line 127 of file bp_account.c.

Here is the call graph for this function:

◆ detect_share()

static int detect_share ( int  wp_cnt,
int  bp_cnt 
)
static

Definition at line 141 of file bp_account.c.

Here is the call graph for this function:

◆ test__bp_accounting()

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

Definition at line 179 of file bp_account.c.

Here is the call graph for this function:

◆ test_function()

static noinline int test_function ( void  )
static

Definition at line 27 of file bp_account.c.

◆ wp_event()

static int wp_event ( void *  addr,
struct perf_event_attr *  attr 
)
static

Definition at line 61 of file bp_account.c.

Here is the call graph for this function:

Variable Documentation

◆ the_var

volatile long the_var

Definition at line 25 of file bp_account.c.