Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tools
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CodeLinaro
public-release-test-restored
platform
vendor
qcom-opensource
tools
Commits
a1cb4000
Commit
a1cb4000
authored
10 years ago
by
Linux Build Service Account
Committed by
Gerrit - the friendly Code Review server
10 years ago
Browse files
Options
Downloads
Plain Diff
Merge "linux-ramdump-parser-v2: Add support fort RTB timestamps"
parents
ad517ab5
a8774d52
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
linux-ramdump-parser-v2/parsers/rtb.py
+28
-13
28 additions, 13 deletions
linux-ramdump-parser-v2/parsers/rtb.py
with
28 additions
and
13 deletions
linux-ramdump-parser-v2/parsers/rtb.py
100644 → 100755
+
28
−
13
View file @
a1cb4000
...
...
@@ -20,6 +20,7 @@ from parser_util import register_parser, RamParser
# void *caller;
# unsigned long idx;
# void *data;
# void *time
#} __attribute__ ((__packed__));
print_table
=
{
...
...
@@ -54,6 +55,14 @@ class RTB(RamParser):
symname
=
'
Unknown function
'
return
symname
def
get_timestamp
(
self
,
rtb_ptr
):
timestamp
=
self
.
ramdump
.
read_structure_field
(
rtb_ptr
,
'
struct msm_rtb_layout
'
,
'
timestamp
'
)
if
timestamp
==
None
:
return
0
timestamp
=
round
(
float
(
timestamp
)
/
10
**
9
,
6
)
timestamp
=
format
(
timestamp
,
'
.6f
'
)
return
timestamp
def
print_none
(
self
,
rtbout
,
rtb_ptr
,
logtype
):
rtbout
.
write
(
'
{0} No data
\n
'
.
format
(
logtype
).
encode
(
'
ascii
'
,
'
ignore
'
))
...
...
@@ -62,37 +71,41 @@ class RTB(RamParser):
caller
=
self
.
ramdump
.
read_structure_field
(
rtb_ptr
,
'
struct msm_rtb_layout
'
,
'
caller
'
)
func
=
self
.
get_fun_name
(
caller
)
line
=
self
.
get_caller
(
caller
)
rtbout
.
write
(
'
{0} from address {1:x} called from addr {2:x} {3} {4}
\n
'
.
format
(
logtype
,
data
,
caller
,
func
,
line
).
encode
(
'
ascii
'
,
'
ignore
'
))
timestamp
=
self
.
get_timestamp
(
rtb_ptr
)
rtbout
.
write
(
'
[{0}] : {1} from address {2:x} called from addr {3:x} {4} {5}
\n
'
.
format
(
timestamp
,
logtype
,
data
,
caller
,
func
,
line
).
encode
(
'
ascii
'
,
'
ignore
'
))
def
print_logbuf
(
self
,
rtbout
,
rtb_ptr
,
logtype
):
data
=
self
.
ramdump
.
read_structure_field
(
rtb_ptr
,
'
struct msm_rtb_layout
'
,
'
data
'
)
caller
=
self
.
ramdump
.
read_structure_field
(
rtb_ptr
,
'
struct msm_rtb_layout
'
,
'
caller
'
)
func
=
self
.
get_fun_name
(
caller
)
line
=
self
.
get_caller
(
caller
)
rtbout
.
write
(
'
{0} log end {1:x} called from addr {2:x} {3} {4}
\n
'
.
format
(
logtype
,
data
,
caller
,
func
,
line
).
encode
(
'
ascii
'
,
'
ignore
'
))
timestamp
=
self
.
get_timestamp
(
rtb_ptr
)
rtbout
.
write
(
'
[{0}] : {1} log end {2:x} called from addr {3:x} {4} {5}
\n
'
.
format
(
timestamp
,
logtype
,
data
,
caller
,
func
,
line
).
encode
(
'
ascii
'
,
'
ignore
'
))
def
print_hotplug
(
self
,
rtbout
,
rtb_ptr
,
logtype
):
data
=
self
.
ramdump
.
read_structure_field
(
rtb_ptr
,
'
struct msm_rtb_layout
'
,
'
data
'
)
caller
=
self
.
ramdump
.
read_structure_field
(
rtb_ptr
,
'
struct msm_rtb_layout
'
,
'
caller
'
)
func
=
self
.
get_fun_name
(
caller
)
line
=
self
.
get_caller
(
caller
)
rtbout
.
write
(
'
{0} cpu data {1:x} called from addr {2:x} {3} {4}
\n
'
.
format
(
logtype
,
data
,
caller
,
func
,
line
).
encode
(
'
ascii
'
,
'
ignore
'
))
timestamp
=
self
.
get_timestamp
(
rtb_ptr
)
rtbout
.
write
(
'
[{0}] : {1} cpu data {2:x} called from addr {3:x} {4} {5}
\n
'
.
format
(
timestamp
,
logtype
,
data
,
caller
,
func
,
line
).
encode
(
'
ascii
'
,
'
ignore
'
))
def
print_ctxid
(
self
,
rtbout
,
rtb_ptr
,
logtype
):
data
=
self
.
ramdump
.
read_structure_field
(
rtb_ptr
,
'
struct msm_rtb_layout
'
,
'
data
'
)
caller
=
self
.
ramdump
.
read_structure_field
(
rtb_ptr
,
'
struct msm_rtb_layout
'
,
'
caller
'
)
func
=
self
.
get_fun_name
(
caller
)
line
=
self
.
get_caller
(
caller
)
rtbout
.
write
(
'
{0} context id {1:x} called from addr {2:x} {3} {4}
\n
'
.
format
(
logtype
,
data
,
caller
,
func
,
line
).
encode
(
'
ascii
'
,
'
ignore
'
))
timestamp
=
self
.
get_timestamp
(
rtb_ptr
)
rtbout
.
write
(
'
[{0}] : {1} context id {2:x} called from addr {3:x} {4} {5}
\n
'
.
format
(
timestamp
,
logtype
,
data
,
caller
,
func
,
line
).
encode
(
'
ascii
'
,
'
ignore
'
))
def
print_timestamp
(
self
,
rtbout
,
rtb_ptr
,
logtype
):
data
=
self
.
ramdump
.
read_structure_field
(
rtb_ptr
,
'
struct msm_rtb_layout
'
,
'
data
'
)
caller
=
self
.
ramdump
.
read_structure_field
(
rtb_ptr
,
'
struct msm_rtb_layout
'
,
'
caller
'
)
rtbout
.
write
(
'
{0} Timestamp: {1:x}{2:x}
\n
'
.
format
(
rtbout
.
write
(
'
[
{0}
]
Timestamp: {1:x}{2:x}
\n
'
.
format
(
logtype
,
data
,
caller
).
encode
(
'
ascii
'
,
'
ignore
'
))
def
print_cp_rw
(
self
,
rtbout
,
rtb_ptr
,
logtype
):
...
...
@@ -100,16 +113,18 @@ class RTB(RamParser):
caller
=
self
.
ramdump
.
read_structure_field
(
rtb_ptr
,
'
struct msm_rtb_layout
'
,
'
caller
'
)
func
=
self
.
get_fun_name
(
caller
)
line
=
self
.
get_caller
(
caller
)
rtbout
.
write
(
'
{0} from offset {1:x} called from addr {2:x} {3} {4}
\n
'
.
format
(
logtype
,
data
,
caller
,
func
,
line
).
encode
(
'
ascii
'
,
'
ignore
'
))
timestamp
=
self
.
get_timestamp
(
rtb_ptr
)
rtbout
.
write
(
'
[{0}] : {1} from offset {2:x} called from addr {3:x} {4} {5}
\n
'
.
format
(
timestamp
,
logtype
,
data
,
caller
,
func
,
line
).
encode
(
'
ascii
'
,
'
ignore
'
))
def
print_irq
(
self
,
rtbout
,
rtb_ptr
,
logtype
):
data
=
self
.
ramdump
.
read_structure_field
(
rtb_ptr
,
'
struct msm_rtb_layout
'
,
'
data
'
)
caller
=
self
.
ramdump
.
read_structure_field
(
rtb_ptr
,
'
struct msm_rtb_layout
'
,
'
caller
'
)
func
=
self
.
get_fun_name
(
caller
)
line
=
self
.
get_caller
(
caller
)
rtbout
.
write
(
'
{0} interrupt {1:x} handled from addr {2:x} {3} {4}
\n
'
.
format
(
logtype
,
data
,
caller
,
func
,
line
).
encode
(
'
ascii
'
,
'
ignore
'
))
timestamp
=
self
.
get_timestamp
(
rtb_ptr
)
rtbout
.
write
(
'
[{0}] : {1} interrupt {2:x} handled from addr {3:x} {4} {5}
\n
'
.
format
(
timestamp
,
logtype
,
data
,
caller
,
func
,
line
).
encode
(
'
ascii
'
,
'
ignore
'
))
def
parse
(
self
):
rtb
=
self
.
ramdump
.
addr_lookup
(
'
msm_rtb
'
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment