Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(197)

Unified Diff: tools/cygprofile/patch_orderfile_unittest.py

Issue 886563002: Switch from nm to objdump for the cygprofile tools. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Typo. Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/cygprofile/patch_orderfile.py ('k') | tools/cygprofile/symbol_extractor.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/cygprofile/patch_orderfile_unittest.py
diff --git a/tools/cygprofile/patch_orderfile_unittest.py b/tools/cygprofile/patch_orderfile_unittest.py
index b93e605a74e86bce42bb55b8654a40ce010e010d..5d6c1d28c2af2cb9e4e266b0756e69f3513de911 100755
--- a/tools/cygprofile/patch_orderfile_unittest.py
+++ b/tools/cygprofile/patch_orderfile_unittest.py
@@ -19,8 +19,10 @@ class TestPatchOrderFile(unittest.TestCase):
def testAliasClonedSymbols(self):
symbol_infos = [
- symbol_extractor.SymbolInfo(name='aSymbol', offset=0x42, size=0x12),
- symbol_extractor.SymbolInfo(name='aSymbol.clone.', offset=8, size=1)]
+ symbol_extractor.SymbolInfo(name='aSymbol', offset=0x42, size=0x12,
+ section='.text'),
+ symbol_extractor.SymbolInfo(name='aSymbol.clone.', offset=8, size=1,
+ section='.text')]
(offset_to_symbol_infos, name_to_symbol_infos) = \
patch_orderfile._GroupSymbolInfos(symbol_infos)
self.assertEquals(len(offset_to_symbol_infos), 2)
@@ -34,8 +36,10 @@ class TestPatchOrderFile(unittest.TestCase):
def testGroupSymbolsByOffset(self):
symbol_infos = (
- symbol_extractor.SymbolInfo(name='aSymbol', offset=0x42, size=0x12),
- symbol_extractor.SymbolInfo(name='anotherSymbol', offset=0x42, size=1))
+ symbol_extractor.SymbolInfo(name='aSymbol', offset=0x42, size=0x12,
+ section='.text'),
+ symbol_extractor.SymbolInfo(name='anotherSymbol', offset=0x42, size=1,
+ section='.text'))
(offset_to_symbol_infos, _) = \
patch_orderfile._GroupSymbolInfos(symbol_infos)
self.assertEquals(len(offset_to_symbol_infos), 1)
@@ -46,10 +50,13 @@ class TestPatchOrderFile(unittest.TestCase):
symbol_name2 = "other"
profiled_symbol_names = [symbol_name, "symbolThatShouldntMatch"]
name_to_symbol_infos = {symbol_name: [
- symbol_extractor.SymbolInfo(symbol_name, 0x42, 0x12)]}
+ symbol_extractor.SymbolInfo(symbol_name, 0x42, 0x12,
+ section='.text')]}
offset_to_symbol_infos = {
- 0x42: [symbol_extractor.SymbolInfo(symbol_name, 0x42, 0x12),
- symbol_extractor.SymbolInfo(symbol_name2, 0x42, 0x12)]}
+ 0x42: [symbol_extractor.SymbolInfo(symbol_name, 0x42, 0x12,
+ section='.text'),
+ symbol_extractor.SymbolInfo(symbol_name2, 0x42, 0x12,
+ section='.text')]}
symbol_names = patch_orderfile._ExpandSymbols(
profiled_symbol_names, name_to_symbol_infos, offset_to_symbol_infos)
self.assertEquals(len(symbol_names), 3)
« no previous file with comments | « tools/cygprofile/patch_orderfile.py ('k') | tools/cygprofile/symbol_extractor.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698