Skip to content

Commit

Permalink
cygprofile: Refactor cyglog_to_orderfile.py.
Browse files Browse the repository at this point in the history
No functional changes. This will make it possible to generate an orderfile
with offsets that are not produced from a profile run made by
orderfile_generator. Also creates test_utils.py as I noticed there was
a lot of reuse.

Bug: 758566
Change-Id: I22b13ecfe10a630ab4c2dcb1c67caf30e86342c5
Reviewed-on: https://chromium-review.googlesource.com/897563
Commit-Queue: Matthew Cary <mattcary@chromium.org>
Reviewed-by: Egor Pasko <pasko@chromium.org>
Cr-Commit-Position: refs/heads/master@{#536378}
  • Loading branch information
Matthew Cary authored and Commit Bot committed Feb 13, 2018
1 parent a9107d9 commit c870c6d
Show file tree
Hide file tree
Showing 8 changed files with 412 additions and 293 deletions.
4 changes: 2 additions & 2 deletions tools/cygprofile/check_orderfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ def main():

symbol_extractor.SetArchitecture(options.arch)
obj_dir = cygprofile_utils.GetObjDir(binary_filename)
symbol_to_sections_map = \
cyglog_to_orderfile.GetSymbolToSectionsMapFromObjectFiles(obj_dir)
symbol_to_sections_map = cyglog_to_orderfile.ObjectFileProcessor(
obj_dir).GetSymbolToSectionsMap()
section_to_symbols_map = cygprofile_utils.InvertMapping(
symbol_to_sections_map)
symbols = patch_orderfile.GetSymbolsFromOrderfile(orderfile_filename,
Expand Down
Loading

0 comments on commit c870c6d

Please sign in to comment.