Bug 1438471 - Remove dead code: nm-symbolicate.py r=mstange
authorSylvestre Ledru <sledru@mozilla.com>
Thu, 22 Feb 2018 08:59:39 +0100
changeset 404972 3701ed1b61bb93f05551726af8610d4af7d14a1e
parent 404971 a41cadccb3ae2882dc486e722fd9f6dec15bf722
child 404973 31c59ada523a20b7330fe55c2bc8907cefd177a1
push id60063
push usersledru@mozilla.com
push dateFri, 23 Feb 2018 07:51:38 +0000
treeherderautoland@3701ed1b61bb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmstange
bugs1438471
milestone60.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1438471 - Remove dead code: nm-symbolicate.py r=mstange MozReview-Commit-ID: 7qaYBvLzPZL
tools/profiler/nm-symbolicate.py
deleted file mode 100755
--- a/tools/profiler/nm-symbolicate.py
+++ /dev/null
@@ -1,48 +0,0 @@
-#!/usr/bin/env python
-
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-import sys, subprocess, os
-
-def NMSymbolicate(library, addresses):
-  target_tools_prefix = os.environ.get("TARGET_TOOLS_PREFIX", "")
-  args = [
-    target_tools_prefix + "nm", "-D", "-S", library
-  ]
-  nm_lines = subprocess.check_output(args).split("\n")
-  symbol_table = []
-  for line in nm_lines:
-    pieces = line.split(" ", 4)
-    if len(pieces) != 4 or pieces[2] != "T":
-      continue
-    start = int(pieces[0], 16)
-    end = int(pieces[1], 16)
-    symbol = pieces[3]
-    symbol_table.append({
-      "start": int(pieces[0], 16),
-      "end": int(pieces[0], 16) + int(pieces[1], 16),
-      "funcName": pieces[3]
-    });
-
-  for addressStr in addresses:
-    address = int(addressStr, 16)
-    symbolForAddress = None
-    for symbol in symbol_table:
-      if address >= symbol["start"] and address <= symbol["end"]:
-        symbolForAddress = symbol
-        break
-    if symbolForAddress:
-      print symbolForAddress["funcName"]
-    else:
-      print "??" # match addr2line
-    print ":0" # no line information from nm
-
-if len(sys.argv) > 1:
-    NMSymbolicate(sys.argv[1], sys.argv[2:])
-    sys.exit(0)
-
-print "Usage: nm-symbolicate.py <library> <addresses> > merged.sym"
-
-