Commit ee124b14 authored by Changwan Ryu's avatar Changwan Ryu Committed by Commit Bot

Remove code duplicate

Test: run_simpleperf_test.py:testStackAddressInterpreter covers this
Bug: 1015236
Change-Id: Iedc680d8b484556044cfc1ae04576b5b4fb0907c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1946932Reviewed-by: default avatarNate Fischer <ntfschr@chromium.org>
Commit-Queue: Changwan Ryu <changwan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#720635}
parent f1f3fda4
......@@ -86,13 +86,8 @@ class StackAddressInterpreter(object):
stack_input_path = os.path.join(self.tmp_dir, 'stack_input.txt')
with open(stack_input_path, 'w') as f:
for address in addresses:
formatted_address = '0x' + '0' * (16 - len(address)) + address
# Pretend that this is Chromium's stack traces output in logcat.
# Note that the date, time, pid, tid, frame number, and frame address
# are all fake and they are irrelevant.
f.write(('11-15 00:00:00.000 11111 11111 '
'E chromium: #00 0x0000001111111111 %s+%s\n') % (
lib_path, formatted_address))
f.write(StackAddressInterpreter._ConvertAddressToFakeTraceLine(
address, lib_path) + '\n')
stack_output = StackAddressInterpreter.RunStackScript(
self.args.output_directory, stack_input_path)
......
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