Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
map.c File Reference
#include "symbol.h"
#include <errno.h>
#include <inttypes.h>
#include <limits.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <unistd.h>
#include "map.h"
#include "thread.h"
#include "strlist.h"
#include "vdso.h"

Go to the source code of this file.

Macros

#define DSO__DELETED   "(deleted)"
 

Functions

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)
 
void map__fixup_start (struct map *self)
 
void map__fixup_end (struct map *self)
 
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)
 
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)
 
u64 map__rip_2objdump (struct map *map, u64 rip)
 
void map_groups__init (struct map_groups *mg)
 
void map_groups__exit (struct map_groups *mg)
 
void map_groups__flush (struct map_groups *mg)
 
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)
 
size_t __map_groups__fprintf_maps (struct map_groups *mg, enum map_type type, int verbose, FILE *fp)
 
size_t map_groups__fprintf_maps (struct map_groups *mg, int verbose, FILE *fp)
 
size_t map_groups__fprintf (struct map_groups *mg, int verbose, FILE *fp)
 
int map_groups__fixup_overlappings (struct map_groups *mg, struct map *map, int verbose, FILE *fp)
 
int map_groups__clone (struct map_groups *mg, struct map_groups *parent, enum map_type type)
 
void map__reloc_vmlinux (struct map *self)
 
void maps__insert (struct rb_root *maps, struct map *map)
 
void maps__remove (struct rb_root *self, struct map *map)
 
struct mapmaps__find (struct rb_root *maps, u64 ip)
 
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)
 
struct machinemachines__add (struct rb_root *self, pid_t pid, const char *root_dir)
 
struct machinemachines__find (struct rb_root *self, pid_t pid)
 
struct machinemachines__findnew (struct rb_root *self, pid_t pid)
 
void machines__process (struct rb_root *self, machine__process_t process, void *data)
 
charmachine__mmap_name (struct machine *self, char *bf, size_t size)
 
void machines__set_id_hdr_size (struct rb_root *machines, u16 id_hdr_size)
 

Variables

const charmap_type__name [MAP__NR_TYPES]
 

Macro Definition Documentation

#define DSO__DELETED   "(deleted)"

Definition at line 139 of file map.c.

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.

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 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__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 machines,
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 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  ip 
)
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 self,
struct map map 
)

Definition at line 568 of file map.c.

Variable Documentation

const char* map_type__name[MAP__NR_TYPES]
Initial value:
= {
[MAP__FUNCTION] = "Functions",
[MAP__VARIABLE] = "Variables",
}

Definition at line 14 of file map.c.