Linux Perf
bp_signal.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_signal.c:

Go to the source code of this file.

Macros

#define __SANE_USERSPACE_TYPES__
 

Functions

static void __test_function (volatile long *ptr)
 
static noinline int test_function (void)
 
static void sig_handler_2 (int signum __maybe_unused, siginfo_t *oh __maybe_unused, void *uc __maybe_unused)
 
static void sig_handler (int signum __maybe_unused, siginfo_t *oh __maybe_unused, void *uc __maybe_unused)
 
static int __event (bool is_x, void *addr, int sig)
 
static int bp_event (void *addr, int sig)
 
static int wp_event (void *addr, int sig)
 
static long long bp_count (int fd)
 
int test__bp_signal (struct test *test __maybe_unused, int subtest __maybe_unused)
 
bool test__bp_signal_is_supported (void)
 

Variables

static int fd1
 
static int fd2
 
static int fd3
 
static int overflows
 
static int overflows_2
 
volatile long the_var
 

Macro Definition Documentation

◆ __SANE_USERSPACE_TYPES__

#define __SANE_USERSPACE_TYPES__

Definition at line 12 of file bp_signal.c.

Function Documentation

◆ __event()

static int __event ( bool  is_x,
void *  addr,
int  sig 
)
static

Definition at line 106 of file bp_signal.c.

Here is the call graph for this function:

◆ __test_function()

static void __test_function ( volatile long *  ptr)
static

Definition at line 60 of file bp_signal.c.

◆ bp_count()

static long long bp_count ( int  fd)
static

Definition at line 154 of file bp_signal.c.

◆ bp_event()

static int bp_event ( void *  addr,
int  sig 
)
static

Definition at line 144 of file bp_signal.c.

Here is the call graph for this function:

◆ sig_handler()

static void sig_handler ( int signum  __maybe_unused,
siginfo_t *oh  __maybe_unused,
void *uc  __maybe_unused 
)
static

Definition at line 85 of file bp_signal.c.

◆ sig_handler_2()

static void sig_handler_2 ( int signum  __maybe_unused,
siginfo_t *oh  __maybe_unused,
void *uc  __maybe_unused 
)
static

Definition at line 73 of file bp_signal.c.

◆ test__bp_signal()

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

Definition at line 168 of file bp_signal.c.

Here is the call graph for this function:

◆ test__bp_signal_is_supported()

bool test__bp_signal_is_supported ( void  )

Definition at line 292 of file bp_signal.c.

◆ test_function()

static noinline int test_function ( void  )
static

Definition at line 66 of file bp_signal.c.

Here is the call graph for this function:

◆ wp_event()

static int wp_event ( void *  addr,
int  sig 
)
static

Definition at line 149 of file bp_signal.c.

Here is the call graph for this function:

Variable Documentation

◆ fd1

int fd1
static

Definition at line 31 of file bp_signal.c.

◆ fd2

int fd2
static

Definition at line 32 of file bp_signal.c.

◆ fd3

int fd3
static

Definition at line 33 of file bp_signal.c.

◆ overflows

int overflows
static

Definition at line 34 of file bp_signal.c.

◆ overflows_2

int overflows_2
static

Definition at line 35 of file bp_signal.c.

◆ the_var

volatile long the_var

Definition at line 37 of file bp_signal.c.