|
void | symbol__delete (struct symbol *sym) |
|
void | symbols__delete (struct rb_root *symbols) |
|
static size_t | symbol__size (const struct symbol *sym) |
|
static int | __symbol__join_symfs (char *bf, size_t size, const char *path) |
|
static void * | symbol__priv (struct symbol *sym) |
|
void | symsrc__destroy (struct symsrc *ss) |
|
int | symsrc__init (struct symsrc *ss, struct dso *dso, const char *name, enum dso_binary_type type) |
|
bool | symsrc__has_symtab (struct symsrc *ss) |
|
bool | symsrc__possibly_runtime (struct symsrc *ss) |
|
int | dso__load (struct dso *dso, struct map *map) |
|
int | dso__load_vmlinux (struct dso *dso, struct map *map, const char *vmlinux, bool vmlinux_allocated) |
|
int | dso__load_vmlinux_path (struct dso *dso, struct map *map) |
|
int | __dso__load_kallsyms (struct dso *dso, const char *filename, struct map *map, bool no_kcore) |
|
int | dso__load_kallsyms (struct dso *dso, const char *filename, struct map *map) |
|
void | dso__insert_symbol (struct dso *dso, struct symbol *sym) |
|
struct symbol * | dso__find_symbol (struct dso *dso, u64 addr) |
|
struct symbol * | dso__find_symbol_by_name (struct dso *dso, const char *name) |
|
struct symbol * | symbol__next_by_name (struct symbol *sym) |
|
struct symbol * | dso__first_symbol (struct dso *dso) |
|
struct symbol * | dso__last_symbol (struct dso *dso) |
|
struct symbol * | dso__next_symbol (struct symbol *sym) |
|
enum dso_type | dso__type_fd (int fd) |
|
int | filename__read_build_id (const char *filename, void *bf, size_t size) |
|
int | sysfs__read_build_id (const char *filename, void *bf, size_t size) |
|
int | modules__parse (const char *filename, void *arg, int(*process_module)(void *arg, const char *name, u64 start, u64 size)) |
|
int | filename__read_debuglink (const char *filename, char *debuglink, size_t size) |
|
int | symbol__init (struct perf_env *env) |
|
void | symbol__exit (void) |
|
void | symbol__elf_init (void) |
|
int | symbol__annotation_init (void) |
|
struct symbol * | symbol__new (u64 start, u64 len, u8 binding, u8 type, const char *name) |
|
size_t | __symbol__fprintf_symname_offs (const struct symbol *sym, const struct addr_location *al, bool unknown_as_addr, bool print_offsets, FILE *fp) |
|
size_t | symbol__fprintf_symname_offs (const struct symbol *sym, const struct addr_location *al, FILE *fp) |
|
size_t | __symbol__fprintf_symname (const struct symbol *sym, const struct addr_location *al, bool unknown_as_addr, FILE *fp) |
|
size_t | symbol__fprintf_symname (const struct symbol *sym, FILE *fp) |
|
size_t | symbol__fprintf (struct symbol *sym, FILE *fp) |
|
bool | symbol__restricted_filename (const char *filename, const char *restricted_filename) |
|
int | symbol__config_symfs (const struct option *opt __maybe_unused, const char *dir, int unset __maybe_unused) |
|
int | dso__load_sym (struct dso *dso, struct map *map, struct symsrc *syms_ss, struct symsrc *runtime_ss, int kmodule) |
|
int | dso__synthesize_plt_symbols (struct dso *dso, struct symsrc *ss) |
|
char * | dso__demangle_sym (struct dso *dso, int kmodule, const char *elf_name) |
|
void | __symbols__insert (struct rb_root *symbols, struct symbol *sym, bool kernel) |
|
void | symbols__insert (struct rb_root *symbols, struct symbol *sym) |
|
void | symbols__fixup_duplicate (struct rb_root *symbols) |
|
void | symbols__fixup_end (struct rb_root *symbols) |
|
void | map_groups__fixup_end (struct map_groups *mg) |
|
int | file__read_maps (int fd, bool exe, mapfn_t mapfn, void *data, bool *is_64_bit) |
|
int | kcore_extract__create (struct kcore_extract *kce) |
|
void | kcore_extract__delete (struct kcore_extract *kce) |
|
int | kcore_copy (const char *from_dir, const char *to_dir) |
|
int | compare_proc_modules (const char *from, const char *to) |
|
int | setup_list (struct strlist **list, const char *list_str, const char *list_name) |
|
int | setup_intlist (struct intlist **list, const char *list_str, const char *list_name) |
|
const char * | arch__normalize_symbol_name (const char *name) |
|
int | arch__compare_symbol_names (const char *namea, const char *nameb) |
|
int | arch__compare_symbol_names_n (const char *namea, const char *nameb, unsigned int n) |
|
int | arch__choose_best_symbol (struct symbol *syma, struct symbol *symb) |
|
int | symbol__match_symbol_name (const char *namea, const char *nameb, enum symbol_tag_include includes) |
|
int | get_sdt_note_list (struct list_head *head, const char *target) |
|
int | cleanup_sdt_note_list (struct list_head *sdt_notes) |
|
int | sdt_notes__get_count (struct list_head *start) |
|
struct mem_info * | mem_info__new (void) |
|
struct mem_info * | mem_info__get (struct mem_info *mi) |
|
void | mem_info__put (struct mem_info *mi) |
|
static void | __mem_info__zput (struct mem_info **mi) |
|
int kcore_copy |
( |
const char * |
from_dir, |
|
|
const char * |
to_dir |
|
) |
| |
kcore_copy - copy kallsyms, modules and kcore from one directory to another. : from directory : to directory
This function copies kallsyms, modules and kcore files from one directory to another. kallsyms and modules are copied entirely. Only code segments are copied from kcore. It is assumed that two segments suffice: one for the kernel proper and one for all the modules. The code segments are determined from kallsyms and modules files. The kernel map starts at _stext or the lowest function symbol, and ends at _etext or the highest function symbol. The module map starts at the lowest module address and ends at the highest module symbol. Start addresses are rounded down to the nearest page. End addresses are rounded up to the nearest page. An extra page is added to the highest kernel symbol and highest module symbol to, hopefully, encompass that symbol too. Because it contains only code sections, the resulting kcore is unusual. One significant peculiarity is that the mapping (start -> pgoff) is not the same for the kernel map and the modules map. That happens because the data is copied adjacently whereas the original kcore has gaps. Finally, kallsyms and modules files are compared with their copies to check that modules have not been loaded or unloaded while the copies were taking place.
Return: %0 on success, %-1 on failure.
Definition at line 1818 of file symbol-elf.c.