#include "config.h"
#include <stddef.h>
#include <bfd.h>
#include <sys/stat.h>
#include "op_list.h"
#include "op_types.h"
Go to the source code of this file.
Data Structures | |
struct | jitentry |
struct | jitentry_debug_line |
struct | op_jitdump_info |
struct | pathname |
struct | jitdump_deletion_candidate |
Defines | |
#define | OP_JIT_CONV_OK 0 |
#define | OP_JIT_CONV_FAIL -1 |
#define | OP_JIT_CONV_NO_DUMPFILE 1 |
#define | OP_JIT_CONV_NO_ANON_SAMPLES 2 |
#define | OP_JIT_CONV_NO_MATCHING_ANON_SAMPLES 3 |
#define | OP_JIT_CONV_NO_JIT_RECS_IN_DUMPFILE 4 |
#define | OP_JIT_CONV_ALREADY_DONE 5 |
#define | OP_JIT_CONV_TMPDIR_NOT_REMOVED 6 |
Functions | |
void | create_arrays (void) |
int | resolve_overlaps (unsigned long long start_time) |
void | disambiguate_symbol_names (void) |
int | parse_all (void const *start, void const *end, unsigned long long end_time) |
int | op_jit_convert (struct op_jitdump_info file_info, char const *elffile, unsigned long long start_time, unsigned long long end_time) |
bfd * | open_elf (char const *filename) |
int | partition_sections (void) |
int | fill_sections (void) |
asection * | create_section (bfd *abfd, char const *section_name, size_t size, bfd_vma vma, flagword flags) |
int | fill_section_content (bfd *abfd, asection *section, void const *b, file_ptr offset, size_t sz) |
int | init_debug_line_info (bfd *abfd) |
int | finalize_debug_line_info (bfd *abfd) |
Variables | |
enum bfd_architecture | dump_bfd_arch |
int | dump_bfd_mach |
char const * | dump_bfd_target_name |
struct jitentry * | jitentry_list |
u32 | entry_count |
struct jitentry_debug_line * | jitentry_debug_line_list |
u32 | max_entry_count |
struct jitentry ** | entries_symbols_ascending |
struct jitentry ** | entries_address_ascending |
asymbol ** | syms |
bfd * | cur_bfd |
int | debug |
Convert a jit dump file to an ELF file
Copyright IBM Corporation 2007
Definition in file opjitconv.h.
#define OP_JIT_CONV_ALREADY_DONE 5 |
Definition at line 26 of file opjitconv.h.
Referenced by process_jit_dumpfile().
#define OP_JIT_CONV_FAIL -1 |
Definition at line 21 of file opjitconv.h.
Referenced by change_owner(), copy_dumpfile(), copy_elffile(), create_text_section(), fill_section_content(), fill_sections(), fill_symtab(), handle_overlap_region(), mmap_jitdump(), op_jit_convert(), op_process_jit_dumpfiles(), parse_all(), parse_code_load(), parse_entries(), parse_header(), partition_sections(), process_jit_dumpfile(), resolve_overlaps(), scan_overlaps(), and select_one().
#define OP_JIT_CONV_NO_ANON_SAMPLES 2 |
Definition at line 23 of file opjitconv.h.
Referenced by op_process_jit_dumpfiles().
#define OP_JIT_CONV_NO_DUMPFILE 1 |
Definition at line 22 of file opjitconv.h.
Referenced by mmap_jitdump(), and op_process_jit_dumpfiles().
#define OP_JIT_CONV_NO_JIT_RECS_IN_DUMPFILE 4 |
Definition at line 25 of file opjitconv.h.
Referenced by op_jit_convert().
#define OP_JIT_CONV_NO_MATCHING_ANON_SAMPLES 3 |
Definition at line 24 of file opjitconv.h.
Referenced by process_jit_dumpfile().
#define OP_JIT_CONV_OK 0 |
Definition at line 20 of file opjitconv.h.
Referenced by change_owner(), copy_dumpfile(), copy_elffile(), create_text_section(), fill_section_content(), fill_sections(), fill_symtab(), fill_text_section_content(), handle_overlap_region(), main(), mmap_jitdump(), op_jit_convert(), op_process_jit_dumpfiles(), parse_code_load(), parse_entries(), parse_header(), partition_sections(), process_jit_dumpfile(), and resolve_overlaps().
#define OP_JIT_CONV_TMPDIR_NOT_REMOVED 6 |
Definition at line 27 of file opjitconv.h.
Referenced by op_process_jit_dumpfiles().
void create_arrays | ( | void | ) |
Definition at line 121 of file jitsymbol.c.
References cmp_address(), cmp_symbolname(), count_entries(), create_sorted_array(), entries_address_ascending, entries_symbols_ascending, entry_count, and max_entry_count.
Referenced by op_jit_convert().
asection* create_section | ( | bfd * | abfd, | |
char const * | section_name, | |||
size_t | size, | |||
bfd_vma | vma, | |||
flagword | flags | |||
) |
Definition at line 75 of file create_bfd.c.
References debug, error(), jitentry::section, and verbprintf.
Referenced by create_text_section(), and init_debug_line_info().
void disambiguate_symbol_names | ( | void | ) |
Definition at line 522 of file jitsymbol.c.
References cmp_symbolname(), disambiguate_symbol_names(), entries_symbols_ascending, entry_count, replacement_name(), jitentry::sym_name_malloced, and jitentry::symbol_name.
Referenced by disambiguate_symbol_names(), and op_jit_convert().
int fill_section_content | ( | bfd * | abfd, | |
asection * | section, | |||
void const * | b, | |||
file_ptr | offset, | |||
size_t | sz | |||
) |
Definition at line 133 of file create_bfd.c.
References OP_JIT_CONV_FAIL, and OP_JIT_CONV_OK.
Referenced by fill_text_section_content(), and finalize_debug_line_info().
int fill_sections | ( | void | ) |
Definition at line 216 of file create_bfd.c.
References debug, entries_address_ascending, entry_count, fill_symtab(), fill_text_section_content(), OP_JIT_CONV_FAIL, OP_JIT_CONV_OK, jitentry::section, and verbprintf.
Referenced by op_jit_convert().
int finalize_debug_line_info | ( | bfd * | abfd | ) |
Definition at line 498 of file debug_line.c.
References b_debug_abbrev, b_debug_info, b_line, options::debug_info, fill_section_content(), free_buffer(), growable_buffer::p, and growable_buffer::size.
Referenced by op_jit_convert().
int init_debug_line_info | ( | bfd * | abfd | ) |
Definition at line 441 of file debug_line.c.
References add_compilation_unit(), add_debug_line(), b_debug_abbrev, b_debug_info, b_line, jr_code_debug_info::code_addr, create_debug_abbrev(), create_section(), jitentry_debug_line::data, options::debug_info, debug_line_info::filename, init_buffer(), jitentry_debug_line_list, debug_line_info::lineno, jitentry_debug_line::next, jr_code_debug_info::nr_entry, growable_buffer::size, and debug_line_info::vma.
Referenced by op_jit_convert().
int op_jit_convert | ( | struct op_jitdump_info | file_info, | |
char const * | elffile, | |||
unsigned long long | start_time, | |||
unsigned long long | end_time | |||
) |
Definition at line 42 of file conversion.c.
References create_arrays(), cur_bfd, disambiguate_symbol_names(), op_jitdump_info::dmp_file, op_jitdump_info::dmp_file_stat, entries_address_ascending, entries_symbols_ascending, entry_count, fill_sections(), finalize_debug_line_info(), free_jit_debug_line(), free_jit_records(), init_debug_line_info(), jitentry_debug_line_list, jitentry_list, max_entry_count, OP_JIT_CONV_FAIL, OP_JIT_CONV_NO_JIT_RECS_IN_DUMPFILE, OP_JIT_CONV_OK, open_elf(), parse_all(), partition_sections(), resolve_overlaps(), and syms.
Referenced by process_jit_dumpfile().
bfd* open_elf | ( | char const * | filename | ) |
Definition at line 250 of file create_bfd.c.
References dump_bfd_arch, dump_bfd_mach, dump_bfd_target_name, and error().
Referenced by op_jit_convert().
int parse_all | ( | void const * | start, | |
void const * | end, | |||
unsigned long long | end_time | |||
) |
Definition at line 239 of file parse_dump.c.
References OP_JIT_CONV_FAIL, parse_entries(), and parse_header().
Referenced by op_jit_convert().
int partition_sections | ( | void | ) |
Definition at line 184 of file create_bfd.c.
References jitentry::code_size, create_text_section(), entries_address_ascending, entry_count, OP_JIT_CONV_FAIL, OP_JIT_CONV_OK, and jitentry::vma.
Referenced by op_jit_convert().
int resolve_overlaps | ( | unsigned long long | start_time | ) |
Definition at line 498 of file jitsymbol.c.
References debug, invalidate_earlybirds(), OP_JIT_CONV_FAIL, OP_JIT_CONV_OK, resort_address(), resort_symbol(), scan_overlaps(), and verbprintf.
Referenced by op_jit_convert().
bfd* cur_bfd |
Definition at line 60 of file opjitconv.c.
Referenced by create_text_section(), fill_symtab(), fill_text_section_content(), and op_jit_convert().
int debug |
Definition at line 72 of file opjitconv.c.
enum bfd_architecture dump_bfd_arch |
Definition at line 50 of file opjitconv.c.
Referenced by open_elf(), and parse_header().
int dump_bfd_mach |
Definition at line 51 of file opjitconv.c.
Referenced by open_elf(), and parse_header().
char const* dump_bfd_target_name |
Definition at line 52 of file opjitconv.c.
Referenced by open_elf(), and parse_header().
struct jitentry** entries_address_ascending |
Definition at line 69 of file opjitconv.c.
Referenced by create_arrays(), create_text_section(), eliminate_overlaps(), fill_sections(), fill_symtab(), fill_text_section_content(), handle_overlap_region(), insert_entry(), invalidate_earlybirds(), op_jit_convert(), partition_sections(), resort_address(), resort_symbol(), scan_overlaps(), and select_one().
struct jitentry** entries_symbols_ascending |
Definition at line 67 of file opjitconv.c.
Referenced by create_arrays(), disambiguate_symbol_names(), insert_entry(), op_jit_convert(), and resort_symbol().
Definition at line 63 of file opjitconv.c.
Referenced by cb_compiled_method_load(), create_arrays(), create_sorted_array(), disambiguate_symbol_names(), fill_sections(), fill_symtab(), insert_entry(), invalidate_earlybirds(), op_jit_convert(), partition_sections(), resort_address(), resort_symbol(), and scan_overlaps().
Definition at line 44 of file opjitconv.c.
Referenced by free_jit_debug_line(), init_debug_line_info(), op_jit_convert(), and parse_code_debug_info().
struct jitentry* jitentry_list |
Definition at line 43 of file opjitconv.c.
Referenced by count_entries(), fill_entry_array(), free_jit_records(), op_jit_convert(), parse_code_load(), and parse_code_unload().
Definition at line 65 of file opjitconv.c.
Referenced by create_arrays(), insert_entry(), and op_jit_convert().
asymbol** syms |
Definition at line 47 of file opjitconv.c.
Referenced by fill_symtab(), op_jit_convert(), and callgraph_container::output_hint().