Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Typedefs | Functions | Variables
cache.h File Reference
#include <stdbool.h>
#include "util.h"
#include "strbuf.h"
#include "../perf.h"

Go to the source code of this file.

Macros

#define CMD_EXEC_PATH   "--exec-path"
 
#define CMD_PERF_DIR   "--perf-dir="
 
#define CMD_WORK_TREE   "--work-tree="
 
#define CMD_DEBUGFS_DIR   "--debugfs-dir="
 
#define PERF_DIR_ENVIRONMENT   "PERF_DIR"
 
#define PERF_WORK_TREE_ENVIRONMENT   "PERF_WORK_TREE"
 
#define EXEC_PATH_ENVIRONMENT   "PERF_EXEC_PATH"
 
#define DEFAULT_PERF_DIR_ENVIRONMENT   ".perf"
 
#define PERF_DEBUGFS_ENVIRONMENT   "PERF_DEBUGFS_DIR"
 
#define alloc_nr(x)   (((x)+16)*3/2)
 
#define ALLOC_GROW(x, nr, alloc)
 

Typedefs

typedef int(* config_fn_t )(const char *, const char *, void *)
 

Functions

int perf_default_config (const char *, const char *, void *)
 
int perf_config (config_fn_t fn, void *)
 
int perf_config_int (const char *, const char *)
 
int perf_config_bool (const char *, const char *)
 
int config_error_nonbool (const char *)
 
const charperf_config_dirname (const char *, const char *)
 
void setup_pager (void)
 
int pager_in_use (void)
 
charalias_lookup (const char *alias)
 
int split_cmdline (char *cmdline, const char ***argv)
 
const charmake_nonrelative_path (const char *path)
 
charstrip_path_suffix (const char *path, const char *suffix)
 
charmkpath (const char *fmt,...) __attribute__((format(printf
 
char charperf_path (const char *fmt,...) __attribute__((format(printf
 
char char charperf_pathdup (const char *fmt,...) __attribute__((format(printf
 
char char char size_t strlcpy (char *dest, const char *src, size_t size)
 

Variables

const charpager_program
 
int pager_use_color
 
int use_browser
 

Macro Definition Documentation

#define ALLOC_GROW (   x,
  nr,
  alloc 
)
Value:
do { \
if ((nr) > alloc) { \
if (alloc_nr(alloc) < (nr)) \
alloc = (nr); \
else \
alloc = alloc_nr(alloc); \
x = xrealloc((x), alloc * sizeof(*(x))); \
} \
} while(0)

Definition at line 84 of file cache.h.

#define alloc_nr (   x)    (((x)+16)*3/2)

Definition at line 75 of file cache.h.

#define CMD_DEBUGFS_DIR   "--debugfs-dir="

Definition at line 12 of file cache.h.

#define CMD_EXEC_PATH   "--exec-path"

Definition at line 9 of file cache.h.

#define CMD_PERF_DIR   "--perf-dir="

Definition at line 10 of file cache.h.

#define CMD_WORK_TREE   "--work-tree="

Definition at line 11 of file cache.h.

#define DEFAULT_PERF_DIR_ENVIRONMENT   ".perf"

Definition at line 17 of file cache.h.

#define EXEC_PATH_ENVIRONMENT   "PERF_EXEC_PATH"

Definition at line 16 of file cache.h.

#define PERF_DEBUGFS_ENVIRONMENT   "PERF_DEBUGFS_DIR"

Definition at line 18 of file cache.h.

#define PERF_DIR_ENVIRONMENT   "PERF_DIR"

Definition at line 14 of file cache.h.

#define PERF_WORK_TREE_ENVIRONMENT   "PERF_WORK_TREE"

Definition at line 15 of file cache.h.

Typedef Documentation

typedef int(* config_fn_t)(const char *, const char *, void *)

Definition at line 20 of file cache.h.

Function Documentation

char* alias_lookup ( const char alias)

Definition at line 18 of file alias.c.

int config_error_nonbool ( const char )

Definition at line 456 of file config.c.

const char* make_nonrelative_path ( const char path)

Definition at line 22 of file abspath.c.

char* mkpath ( const char fmt,
  ... 
)
int pager_in_use ( void  )

Definition at line 91 of file pager.c.

int perf_config ( config_fn_t  fn,
void  
)

Definition at line 404 of file config.c.

int perf_config_bool ( const char ,
const char  
)

Definition at line 332 of file config.c.

const char* perf_config_dirname ( const char ,
const char  
)

Definition at line 338 of file config.c.

int perf_config_int ( const char ,
const char  
)

Definition at line 309 of file config.c.

int perf_default_config ( const char ,
const char ,
void  
)
char char* perf_path ( const char fmt,
  ... 
)
char char char* perf_pathdup ( const char fmt,
  ... 
)
void setup_pager ( void  )

Definition at line 47 of file pager.c.

int split_cmdline ( char cmdline,
const char ***  argv 
)

Definition at line 26 of file alias.c.

char* strip_path_suffix ( const char path,
const char suffix 
)

Definition at line 136 of file path.c.

char char char size_t strlcpy ( char dest,
const char src,
size_t  size 
)

strlcpy - Copy a NUL terminated string into a sized buffer : Where to copy the string to : Where to copy the string from : size of destination buffer

Compatible with *BSD: the result is always a valid NUL-terminated string that fits in the buffer (unless, of course, the buffer size is zero). It does not pad out the result like strncpy() does.

Definition at line 94 of file string.c.

Variable Documentation

const char* pager_program

Definition at line 8 of file environment.c.

int pager_use_color

Definition at line 9 of file environment.c.

int use_browser

Definition at line 25 of file perf.c.