Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions | Variables
util.c File Reference
#include "../perf.h"
#include "util.h"
#include <sys/mman.h>
#include <stdio.h>
#include <stdlib.h>

Go to the source code of this file.


void event_attr_init (struct perf_event_attr *attr)
int mkdir_p (char *path, mode_t mode)
int copyfile (const char *from, const char *to)
unsigned long convert_unit (unsigned long value, char *unit)
int readn (int fd, void *buf, size_t n)
size_t hex_width (u64 v)
void dump_stack (void)


bool perf_host = true
bool perf_guest = false

Function Documentation

unsigned long convert_unit ( unsigned long  value,
char unit 

Definition at line 118 of file util.c.

int copyfile ( const char from,
const char to 

Definition at line 79 of file util.c.

void dump_stack ( void  )

Definition at line 184 of file util.c.

void event_attr_init ( struct perf_event_attr attr)

Definition at line 16 of file util.c.

size_t hex_width ( u64  v)

Definition at line 157 of file util.c.

int mkdir_p ( char path,
mode_t  mode 

Definition at line 26 of file util.c.

int readn ( int  fd,
void buf,
size_t  n 

Definition at line 140 of file util.c.

Variable Documentation

bool perf_guest = false

Definition at line 14 of file util.c.

bool perf_host = true

Definition at line 13 of file util.c.