Refactoring the TRAP logParser#7263
Open
varghese-bibin wants to merge 3 commits intoSamsung:masterfrom
Open
Conversation
| #!/usr/bin/env python | ||
| ########################################################################### | ||
| # | ||
| # Copyright 2024 Samsung Electronics All Rights Reserved. |
| assertInfo.parse_assert_info(self) | ||
|
|
||
| # It displays the debug symbols corresponding to all the addresses in the kernel and application text address range | ||
| self.parse_call_stack() |
Contributor
There was a problem hiding this comment.
Is there any reason why parse_call_stack() and parse_heap_info are in Class, but parse_tcb_info and find_crash_point are outside this Class?
| format_log_file(lparser.log_file) | ||
|
|
||
| # Get the number of application binaries, names, text address and sizes | ||
| find_number_of_binaries(lparser) No newline at end of file |
Contributor
There was a problem hiding this comment.
Could you add a extra new line.
Contributor
|
Could you also share the test result of this refactoring in commit message and PR message. |
Comment on lines
+26
to
+28
| stack_details = "Asserted task's stack details\n" | ||
|
|
||
| partition_string = "===========================================================" |
Contributor
There was a problem hiding this comment.
Can we manage the strings separately?
When we change some log format in assert, then we must modify here together.
But now, each file includes necessary string for each. It's much difficult to maintain.
I want a new file which has all necessary strings (which can be changed by assert) for TRAP.
Author
|
I will check and modify. |
a. Separated the preprocessing functions from logParser.py and kept them in a separate preProcessor.py file b. moved logParser.py and logPreprocesser.py to logAnalyser folder, to keep the similar types of file together c. preProcessing includes format_log_file() and find_number_of_binaries() d. instead of calling these function trap.py call preprocessLogFile
…s module a. created cli/logAnalyser/logUtils.py b. moved all the independent helper functions from logParser.py to it c. format output, print crash type, is text addr, is app adrr, convert state no
a. split up the major/lengthy functions in logParser.py and kept them in separate files b. parse assert info -> assertInfo.py c. find crash point -> crashPoint.py d. parse tcb info -> tcbinfo.py e. cli/logAnalyser/log_parser : kept all these related files in this folder f. also moved heapNode.py to this folder, as its only called from logParser.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Restructure log analysis into logAnalyser package with: