Commit fb2feee6 authored by mattloring's avatar mattloring Committed by Commit bot

Fix objdump assembly truncations, d8 support

Update the custom objdump script to handle inline comments starting
with '--' or ';;'.

Load d8 code.asm file if present.

BUG=

Review-Url: https://codereview.chromium.org/2159103007
Cr-Commit-Position: refs/heads/master@{#37953}
parent 53e5f66b
......@@ -27,6 +27,7 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import os.path
import re
import subprocess
import sys
......@@ -50,17 +51,21 @@ def format_line(line):
def is_comment(line):
stripped = line.strip()
return stripped.startswith("--") or stripped.startswith(";;;")
return stripped.startswith("--") or stripped.startswith(";;")
def main():
filename = sys.argv[-1]
match = re.match(r"/tmp/perf-(.*)\.map", filename)
if match:
start, end = get_address_bounds()
codefile = "code-" + match.group(1) + "-1.asm"
with open(codefile, "r") as code:
process_codefile = "code-" + match.group(1) + "-1.asm"
if os.path.exists(process_codefile):
codefile = open(process_codefile, "r")
else:
codefile = open("code.asm", "r")
with codefile:
printing = False
for line in code:
for line in codefile:
if line.startswith("0x"):
addr = int(line.split()[0], 0)
if start <= addr <= end:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment