diff options
author | Che-yu Wu <cheyuw@google.com> | 2017-09-05 13:58:35 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-09-05 23:01:10 -0700 |
commit | 4a98e9c9847e391d57095bcb1ccea52b676fc0dd (patch) | |
tree | f5868a7995cd8763e8fc7f8ae983ac198b44c834 /extra/stack_analyzer/stack_analyzer_unittest.py | |
parent | ce15362e895bac60f18d7fa000029be6e7879e9f (diff) | |
download | chrome-ec-4a98e9c9847e391d57095bcb1ccea52b676fc0dd.tar.gz |
extra/stack_analyzer: Configurable exception frame size.
Make the size of extra stack needed by exceptions configurable.
It can be set in the annotation file.
BUG=chromium:648840
BRANCH=none
TEST=extra/stack_analyzer/stack_analyzer_unittest.py
make BOARD=elm SECTION=RW \
ANNOTATION=./extra/stack_analyzer/example_annotation.yaml \
analyzestack
Change-Id: Idf2a59650dd20257a0291f89d788c0c83b91a7c9
Signed-off-by: Che-yu Wu <cheyuw@google.com>
Reviewed-on: https://chromium-review.googlesource.com/649454
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
Diffstat (limited to 'extra/stack_analyzer/stack_analyzer_unittest.py')
-rwxr-xr-x | extra/stack_analyzer/stack_analyzer_unittest.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/extra/stack_analyzer/stack_analyzer_unittest.py b/extra/stack_analyzer/stack_analyzer_unittest.py index a3bd80a186..cac4383906 100755 --- a/extra/stack_analyzer/stack_analyzer_unittest.py +++ b/extra/stack_analyzer/stack_analyzer_unittest.py @@ -590,18 +590,21 @@ class StackAnalyzerTest(unittest.TestCase): ) addrtoline_mock.return_value = [('??', '??', 0)] - self.analyzer.annotation = {'remove': [['fake_func']]} + self.analyzer.annotation = { + 'exception_frame_size': 64, + 'remove': [['fake_func']], + } with mock.patch('__builtin__.print') as print_mock: checkoutput_mock.return_value = disasm_text self.analyzer.Analyze() print_mock.assert_has_calls([ mock.call( - 'Task: HOOKS, Max size: 232 (8 + 224), Allocated size: 2048'), + 'Task: HOOKS, Max size: 72 (8 + 64), Allocated size: 2048'), mock.call('Call Trace:'), mock.call(' hook_task (8) [??:0] 1000'), mock.call( - 'Task: CONSOLE, Max size: 240 (16 + 224), Allocated size: 460'), + 'Task: CONSOLE, Max size: 80 (16 + 64), Allocated size: 460'), mock.call('Call Trace:'), mock.call(' console_task (8) [??:0] 2000'), mock.call(' -> ??[??:0] 2002'), |