This is the mail archive of the gdb-testers@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] xtensa: optimize removed_by_actions


*** TEST RESULTS FOR COMMIT 071aa5c98a31c966f5fbfc573fcee61350fd1936 ***

Author: Max Filippov <jcmvbkbc@gmail.com>
Branch: master
Commit: 071aa5c98a31c966f5fbfc573fcee61350fd1936

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]