diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2015-03-28 08:46:28 +0300 |
---|---|---|
committer | Max Filippov <jcmvbkbc@gmail.com> | 2015-04-09 19:10:25 +0300 |
commit | 071aa5c98a31c966f5fbfc573fcee61350fd1936 (patch) | |
tree | 0d0206eecb61b0fb5bdc6f9e18b0400f5abe6460 /bfd/libxcoff.h | |
parent | b2b326d246f839ee218192ac88da2384d929a072 (diff) | |
download | gdb-071aa5c98a31c966f5fbfc573fcee61350fd1936.zip gdb-071aa5c98a31c966f5fbfc573fcee61350fd1936.tar.gz gdb-071aa5c98a31c966f5fbfc573fcee61350fd1936.tar.bz2 |
xtensa: optimize removed_by_actions
The function removed_by_actions iterates through text actions to
calculate an offset applied by text actions to a given VMA. Although it
has a parameter p_start_action that allows for incremental offset
calculation, in many places it's used with p_start_action explicitly set
to the first action. After the first relaxation pass when the list of
text actions is finalized, an array of offsets sorted by VMA may be used
to speed up this function.
Original profile:
% time self children called name
-----------------------------------------
0.35 0.00 33872/4808961 relax_section_symbols
3.32 0.00 326022/4808961 relax_property_section
12.83 0.00 1259379/4808961 offset_with_removed_text
32.50 0.00 3189688/4808961 translate_reloc
71.5 49.00 0.00 4808961 removed_by_actions
-----------------------------------------
Same data, after optimization:
% time self children called name
-----------------------------------------
0.00 0.00 33872/4808537 relax_section_symbols
0.01 0.00 326022/4808537 relax_property_section
0.05 0.00 1258955/4808537 offset_with_removed_text_map
0.13 0.00 3189688/4808537 translate_reloc
1.0 0.20 0.00 4808537 removed_by_actions_map
0.00 0.00 120/120 map_removal_by_action
-----------------------------------------
2015-04-01 Max Filippov <jcmvbkbc@gmail.com>
bfd/
* elf32-xtensa.c (removal_by_action_entry_struct,
removal_by_action_map_struct): new structures.
(removal_by_action_entry, removal_by_action_map): new typedefs.
(text_action_list_struct): add new field: map.
(map_removal_by_action, removed_by_actions_map,
offset_with_removed_text_map): new functions.
(relax_section): replace offset_with_removed_text with
offset_with_removed_text_map.
(translate_reloc, relax_property_section, relax_section_symbols):
replace removed_by_actions with removed_by_actions_map.
Diffstat (limited to 'bfd/libxcoff.h')
0 files changed, 0 insertions, 0 deletions