Linux Perf
dso-data.c File Reference
#include <dirent.h>
#include <stdlib.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <string.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <api/fs/fs.h>
#include "util.h"
#include "machine.h"
#include "symbol.h"
#include "tests.h"
#include "debug.h"
Include dependency graph for dso-data.c:

Go to the source code of this file.

Classes

struct  test_data_offset
 

Macros

#define TEMPL   "/tmp/perf-test-XXXXXX"
 
#define TEST_FILE_SIZE   (DSO__DATA_CACHE_SIZE * 20)
 
#define BUFSIZE   10
 
#define dso_0   (dsos[0])
 
#define dso_1   (dsos[1])
 
#define dso_2   (dsos[2])
 

Functions

static char * test_file (int size)
 
static int dso__data_fd (struct dso *dso, struct machine *machine)
 
int test__dso_data (struct test *test __maybe_unused, int subtest __maybe_unused)
 
static long open_files_cnt (void)
 
static int dsos__create (int cnt, int size)
 
static void dsos__delete (int cnt)
 
static int set_fd_limit (int n)
 
int test__dso_data_cache (struct test *test __maybe_unused, int subtest __maybe_unused)
 
int test__dso_data_reopen (struct test *test __maybe_unused, int subtest __maybe_unused)
 

Variables

struct test_data_offset offsets []
 
static struct dso ** dsos
 

Macro Definition Documentation

◆ BUFSIZE

#define BUFSIZE   10

◆ dso_0

#define dso_0   (dsos[0])

◆ dso_1

#define dso_1   (dsos[1])

◆ dso_2

#define dso_2   (dsos[2])

◆ TEMPL

#define TEMPL   "/tmp/perf-test-XXXXXX"

◆ TEST_FILE_SIZE

#define TEST_FILE_SIZE   (DSO__DATA_CACHE_SIZE * 20)

Definition at line 52 of file dso-data.c.

Function Documentation

◆ dso__data_fd()

static int dso__data_fd ( struct dso dso,
struct machine machine 
)
static

Definition at line 106 of file dso-data.c.

Here is the call graph for this function:

◆ dsos__create()

static int dsos__create ( int  cnt,
int  size 
)
static

Definition at line 204 of file dso-data.c.

Here is the call graph for this function:

◆ dsos__delete()

static void dsos__delete ( int  cnt)
static

Definition at line 224 of file dso-data.c.

Here is the call graph for this function:

◆ open_files_cnt()

static long open_files_cnt ( void  )
static

Definition at line 177 of file dso-data.c.

◆ set_fd_limit()

static int set_fd_limit ( int  n)
static

Definition at line 238 of file dso-data.c.

◆ test__dso_data()

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

Definition at line 116 of file dso-data.c.

Here is the call graph for this function:

◆ test__dso_data_cache()

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

Definition at line 251 of file dso-data.c.

Here is the call graph for this function:

◆ test__dso_data_reopen()

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

Definition at line 311 of file dso-data.c.

Here is the call graph for this function:

◆ test_file()

static char* test_file ( int  size)
static

Definition at line 18 of file dso-data.c.

Here is the call graph for this function:

Variable Documentation

◆ dsos

struct dso** dsos
static

Definition at line 202 of file dso-data.c.

◆ offsets

struct test_data_offset offsets[]

Definition at line 60 of file dso-data.c.