Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
map.h File Reference
#include <linux/compiler.h>
#include <linux/list.h>
#include <linux/rbtree.h>
#include <stdio.h>
#include <stdbool.h>
#include "types.h"

Go to the source code of this file.

Data Structures

struct  map
 
struct  kmap
 
struct  map_groups
 
struct  machine
 

Macros

#define MAP__NR_TYPES   (MAP__VARIABLE + 1)
 
#define HOST_KERNEL_ID   (-1)
 
#define DEFAULT_GUEST_KERNEL_ID   (0)
 

Typedefs

typedef int(* symbol_filter_t )(struct map *map, struct symbol *sym)
 
typedef void(* machine__process_t )(struct machine *self, void *data)
 

Enumerations

enum  map_type { map_wb, map_uc, MAP__FUNCTION = 0, MAP__VARIABLE }
 

Functions

u64 map__rip_2objdump (struct map *map, u64 rip)
 
void map__init (struct map *self, enum map_type type, u64 start, u64 end, u64 pgoff, struct dso *dso)
 
struct mapmap__new (struct list_head *dsos__list, u64 start, u64 len, u64 pgoff, u32 pid, char *filename, enum map_type type)
 
struct mapmap__new2 (u64 start, struct dso *dso, enum map_type type)
 
void map__delete (struct map *self)
 
struct mapmap__clone (struct map *self)
 
int map__overlap (struct map *l, struct map *r)
 
size_t map__fprintf (struct map *self, FILE *fp)
 
size_t map__fprintf_dsoname (struct map *map, FILE *fp)
 
int map__load (struct map *self, symbol_filter_t filter)
 
struct symbolmap__find_symbol (struct map *self, u64 addr, symbol_filter_t filter)
 
struct symbolmap__find_symbol_by_name (struct map *self, const char *name, symbol_filter_t filter)
 
void map__fixup_start (struct map *self)
 
void map__fixup_end (struct map *self)
 
void map__reloc_vmlinux (struct map *self)
 
size_t __map_groups__fprintf_maps (struct map_groups *mg, enum map_type type, int verbose, FILE *fp)
 
void maps__insert (struct rb_root *maps, struct map *map)
 
void maps__remove (struct rb_root *maps, struct map *map)
 
struct mapmaps__find (struct rb_root *maps, u64 addr)
 
void map_groups__init (struct map_groups *mg)
 
void map_groups__exit (struct map_groups *mg)
 
int map_groups__clone (struct map_groups *mg, struct map_groups *parent, enum map_type type)
 
size_t map_groups__fprintf (struct map_groups *mg, int verbose, FILE *fp)
 
size_t map_groups__fprintf_maps (struct map_groups *mg, int verbose, FILE *fp)
 
void machines__process (struct rb_root *self, machine__process_t process, void *data)
 
struct machinemachines__add (struct rb_root *self, pid_t pid, const char *root_dir)
 
struct machinemachines__find_host (struct rb_root *self)
 
struct machinemachines__find (struct rb_root *self, pid_t pid)
 
struct machinemachines__findnew (struct rb_root *self, pid_t pid)
 
void machines__set_id_hdr_size (struct rb_root *self, u16 id_hdr_size)
 
charmachine__mmap_name (struct machine *self, char *bf, size_t size)
 
int machine__init (struct machine *self, const char *root_dir, pid_t pid)
 
void machine__exit (struct machine *self)
 
void machine__delete (struct machine *self)
 
int machine__resolve_callchain (struct machine *machine, struct perf_evsel *evsel, struct thread *thread, struct perf_sample *sample, struct symbol **parent)
 
int maps__set_kallsyms_ref_reloc_sym (struct map **maps, const char *symbol_name, u64 addr)
 
struct symbolmap_groups__find_symbol (struct map_groups *mg, enum map_type type, u64 addr, struct map **mapp, symbol_filter_t filter)
 
struct symbolmap_groups__find_symbol_by_name (struct map_groups *mg, enum map_type type, const char *name, struct map **mapp, symbol_filter_t filter)
 
struct threadmachine__findnew_thread (struct machine *machine, pid_t pid)
 
void machine__remove_thread (struct machine *machine, struct thread *th)
 
size_t machine__fprintf (struct machine *machine, FILE *fp)
 
int map_groups__fixup_overlappings (struct map_groups *mg, struct map *map, int verbose, FILE *fp)
 
struct mapmap_groups__find_by_name (struct map_groups *mg, enum map_type type, const char *name)
 
struct mapmachine__new_module (struct machine *self, u64 start, const char *filename)
 
void map_groups__flush (struct map_groups *mg)
 

Variables

const charmap_type__name [MAP__NR_TYPES]
 

Macro Definition Documentation

#define DEFAULT_GUEST_KERNEL_ID   (0)

Definition at line 62 of file map.h.

#define HOST_KERNEL_ID   (-1)

Definition at line 61 of file map.h.

#define MAP__NR_TYPES   (MAP__VARIABLE + 1)

Definition at line 16 of file map.h.

Typedef Documentation

typedef void(* machine__process_t)(struct machine *self, void *data)

Definition at line 146 of file map.h.

typedef int(* symbol_filter_t)(struct map *map, struct symbol *sym)

Definition at line 110 of file map.h.

Enumeration Type Documentation

enum map_type
Enumerator:
map_wb 
map_uc 
MAP__FUNCTION 
MAP__VARIABLE 

Definition at line 11 of file map.h.

Function Documentation

size_t __map_groups__fprintf_maps ( struct map_groups mg,
enum map_type  type,
int  verbose,
FILE *  fp 
)

Definition at line 373 of file map.c.

void machine__delete ( struct machine self)

Definition at line 643 of file map.c.

void machine__exit ( struct machine self)

Definition at line 634 of file map.c.

struct thread* machine__findnew_thread ( struct machine machine,
pid_t  pid 
)
read

Definition at line 63 of file thread.c.

size_t machine__fprintf ( struct machine machine,
FILE *  fp 
)

Definition at line 127 of file thread.c.

int machine__init ( struct machine self,
const char root_dir,
pid_t  pid 
)

Definition at line 593 of file map.c.

char* machine__mmap_name ( struct machine self,
char bf,
size_t  size 
)

Definition at line 747 of file map.c.

struct map* machine__new_module ( struct machine self,
u64  start,
const char filename 
)
read

Definition at line 1286 of file symbol.c.

void machine__remove_thread ( struct machine machine,
struct thread th 
)

Definition at line 218 of file session.c.

int machine__resolve_callchain ( struct machine machine,
struct perf_evsel evsel,
struct thread thread,
struct perf_sample sample,
struct symbol **  parent 
)

Definition at line 372 of file session.c.

struct machine* machines__add ( struct rb_root self,
pid_t  pid,
const char root_dir 
)
read

Definition at line 649 of file map.c.

struct machine* machines__find ( struct rb_root self,
pid_t  pid 
)
read

Definition at line 679 of file map.c.

struct machine* machines__find_host ( struct rb_root self)
read
struct machine* machines__findnew ( struct rb_root self,
pid_t  pid 
)
read

Definition at line 702 of file map.c.

void machines__process ( struct rb_root self,
machine__process_t  process,
void data 
)

Definition at line 737 of file map.c.

void machines__set_id_hdr_size ( struct rb_root self,
u16  id_hdr_size 
)

Definition at line 759 of file map.c.

struct map* map__clone ( struct map self)
read

Definition at line 212 of file map.c.

void map__delete ( struct map self)

Definition at line 114 of file map.c.

struct symbol* map__find_symbol ( struct map self,
u64  addr,
symbol_filter_t  filter 
)
read

Definition at line 191 of file map.c.

struct symbol* map__find_symbol_by_name ( struct map self,
const char name,
symbol_filter_t  filter 
)
read

Definition at line 200 of file map.c.

void map__fixup_end ( struct map self)

Definition at line 129 of file map.c.

void map__fixup_start ( struct map self)

Definition at line 119 of file map.c.

size_t map__fprintf ( struct map self,
FILE *  fp 
)

Definition at line 238 of file map.c.

size_t map__fprintf_dsoname ( struct map map,
FILE *  fp 
)

Definition at line 244 of file map.c.

void map__init ( struct map self,
enum map_type  type,
u64  start,
u64  end,
u64  pgoff,
struct dso dso 
)

Definition at line 30 of file map.c.

int map__load ( struct map self,
symbol_filter_t  filter 
)

Definition at line 141 of file map.c.

struct map* map__new ( struct list_head dsos__list,
u64  start,
u64  len,
u64  pgoff,
u32  pid,
char filename,
enum map_type  type 
)
read

Definition at line 46 of file map.c.

struct map* map__new2 ( u64  start,
struct dso dso,
enum map_type  type 
)
read

Definition at line 100 of file map.c.

int map__overlap ( struct map l,
struct map r 
)

Definition at line 224 of file map.c.

void map__reloc_vmlinux ( struct map self)

Definition at line 529 of file map.c.

u64 map__rip_2objdump ( struct map map,
u64  rip 
)

Definition at line 262 of file map.c.

int map_groups__clone ( struct map_groups mg,
struct map_groups parent,
enum map_type  type 
)

Definition at line 505 of file map.c.

void map_groups__exit ( struct map_groups mg)

Definition at line 303 of file map.c.

struct map* map_groups__find_by_name ( struct map_groups mg,
enum map_type  type,
const char name 
)
read

Definition at line 1145 of file symbol.c.

struct symbol* map_groups__find_symbol ( struct map_groups mg,
enum map_type  type,
u64  addr,
struct map **  mapp,
symbol_filter_t  filter 
)
read

Definition at line 335 of file map.c.

struct symbol* map_groups__find_symbol_by_name ( struct map_groups mg,
enum map_type  type,
const char name,
struct map **  mapp,
symbol_filter_t  filter 
)
read

Definition at line 351 of file map.c.

int map_groups__fixup_overlappings ( struct map_groups mg,
struct map map,
int  verbose,
FILE *  fp 
)

Definition at line 434 of file map.c.

void map_groups__flush ( struct map_groups mg)

Definition at line 313 of file map.c.

size_t map_groups__fprintf ( struct map_groups mg,
int  verbose,
FILE *  fp 
)

Definition at line 427 of file map.c.

size_t map_groups__fprintf_maps ( struct map_groups mg,
int  verbose,
FILE *  fp 
)

Definition at line 392 of file map.c.

void map_groups__init ( struct map_groups mg)

Definition at line 270 of file map.c.

struct map* maps__find ( struct rb_root maps,
u64  addr 
)
read

Definition at line 573 of file map.c.

void maps__insert ( struct rb_root maps,
struct map map 
)

Definition at line 548 of file map.c.

void maps__remove ( struct rb_root maps,
struct map map 
)

Definition at line 568 of file map.c.

int maps__set_kallsyms_ref_reloc_sym ( struct map **  maps,
const char symbol_name,
u64  addr 
)

Definition at line 1497 of file session.c.

Variable Documentation

const char* map_type__name[MAP__NR_TYPES]

Definition at line 14 of file map.c.