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
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab 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
e9a51f85
Commit
e9a51f85
authored
6 years ago
by
Linux Build Service Account
Committed by
Gerrit - the friendly Code Review server
6 years ago
Browse files
Options
Downloads
Plain Diff
Merge "ion_buffer_parse: add ion heap info for dmabufs"
parents
b23e2ef3
85002303
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
linux-ramdump-parser-v2/parsers/ion_buffer_parse.py
+21
-9
21 additions, 9 deletions
linux-ramdump-parser-v2/parsers/ion_buffer_parse.py
with
21 additions
and
9 deletions
linux-ramdump-parser-v2/parsers/ion_buffer_parse.py
100644 → 100755
+
21
−
9
View file @
e9a51f85
...
@@ -64,18 +64,24 @@ def ion_buffer_info(self, ramdump, ion_info):
...
@@ -64,18 +64,24 @@ def ion_buffer_info(self, ramdump, ion_info):
file_offset
=
ramdump
.
field_offset
(
'
struct dma_buf
'
,
'
file
'
)
file_offset
=
ramdump
.
field_offset
(
'
struct dma_buf
'
,
'
file
'
)
name_offset
=
ramdump
.
field_offset
(
'
struct dma_buf
'
,
'
name
'
)
name_offset
=
ramdump
.
field_offset
(
'
struct dma_buf
'
,
'
name
'
)
exp_name_offset
=
ramdump
.
field_offset
(
'
struct dma_buf
'
,
'
exp_name
'
)
exp_name_offset
=
ramdump
.
field_offset
(
'
struct dma_buf
'
,
'
exp_name
'
)
ion_info
.
write
(
"
{0:40} {1:15} {2:10} {3:20}
\n
"
.
format
(
ion_info
.
write
(
"
{0:40} {1:15} {2:10} {3:
10} {4:10} {5:
20}
\n
"
.
format
(
'
File_addr
'
,
'
Name
'
,
'
Size
'
,
'
Size in KB
'
))
'
File_addr
'
,
'
Name
'
,
'
Size
'
,
'
Exp
'
,
'
Heap
'
,
'
Size in KB
'
))
dma_buf_info
=
[]
dma_buf_info
=
[]
while
(
head
!=
db_list
):
while
(
head
!=
db_list
):
dma_buf_addr
=
head
-
list_node_offset
dma_buf_addr
=
head
-
list_node_offset
size
=
ramdump
.
read_word
(
dma_buf_addr
+
size_offset
)
size
=
ramdump
.
read_word
(
dma_buf_addr
+
size_offset
)
file
=
ramdump
.
read_word
(
dma_buf_addr
+
file_offset
)
file
=
ramdump
.
read_word
(
dma_buf_addr
+
file_offset
)
exp_name
=
ramdump
.
read_word
(
dma_buf_addr
+
exp_name_offset
)
exp_name
=
ramdump
.
read_word
(
dma_buf_addr
+
exp_name_offset
)
exp_name
=
ramdump
.
read_cstring
(
exp_name
,
48
)
ionheap_name
=
""
if
exp_name
==
'
ion
'
:
ion_buffer
=
ramdump
.
read_structure_field
(
dma_buf_addr
,
'
struct dma_buf
'
,
'
priv
'
)
ion_heap
=
ramdump
.
read_structure_field
(
ion_buffer
,
'
struct ion_buffer
'
,
'
heap
'
)
ionheap_name_addr
=
ramdump
.
read_structure_field
(
ion_heap
,
'
struct ion_heap
'
,
'
name
'
)
ionheap_name
=
ramdump
.
read_cstring
(
ionheap_name_addr
,
TASK_NAME_LENGTH
)
name
=
ramdump
.
read_word
(
dma_buf_addr
+
name_offset
)
name
=
ramdump
.
read_word
(
dma_buf_addr
+
name_offset
)
name
=
ramdump
.
read_cstring
(
name
,
48
)
name
=
ramdump
.
read_cstring
(
name
,
48
)
exp_name
=
ramdump
.
read_cstring
(
exp_name
,
48
)
dma_buf_info
.
append
([
file
,
name
,
hex
(
size
),
exp_name
,
ionheap_name
,
bytes_to_KB
(
size
)])
dma_buf_info
.
append
([
file
,
name
,
hex
(
size
),
bytes_to_KB
(
size
)])
head
=
ramdump
.
read_word
(
head
)
head
=
ramdump
.
read_word
(
head
)
next_node
=
ramdump
.
read_word
(
head
+
next_offset
)
next_node
=
ramdump
.
read_word
(
head
+
next_offset
)
if
next_node
==
0
:
if
next_node
==
0
:
...
@@ -87,20 +93,26 @@ def ion_buffer_info(self, ramdump, ion_info):
...
@@ -87,20 +93,26 @@ def ion_buffer_info(self, ramdump, ion_info):
size
=
ramdump
.
read_word
(
dma_buf_addr
+
size_offset
)
size
=
ramdump
.
read_word
(
dma_buf_addr
+
size_offset
)
file
=
ramdump
.
read_word
(
dma_buf_addr
+
file_offset
)
file
=
ramdump
.
read_word
(
dma_buf_addr
+
file_offset
)
exp_name
=
ramdump
.
read_word
(
dma_buf_addr
+
exp_name_offset
)
exp_name
=
ramdump
.
read_word
(
dma_buf_addr
+
exp_name_offset
)
exp_name
=
ramdump
.
read_cstring
(
exp_name
,
48
)
ionheap_name
=
""
if
exp_name
==
'
ion
'
:
ion_buffer
=
ramdump
.
read_structure_field
(
dma_buf_addr
,
'
struct dma_buf
'
,
'
priv
'
)
ion_heap
=
ramdump
.
read_structure_field
(
ion_buffer
,
'
struct ion_buffer
'
,
'
heap
'
)
ionheap_name_addr
=
ramdump
.
read_structure_field
(
ion_heap
,
'
struct ion_heap
'
,
'
name
'
)
ionheap_name
=
ramdump
.
read_cstring
(
ionheap_name_addr
,
TASK_NAME_LENGTH
)
name
=
ramdump
.
read_word
(
dma_buf_addr
+
name_offset
)
name
=
ramdump
.
read_word
(
dma_buf_addr
+
name_offset
)
name
=
ramdump
.
read_cstring
(
name
,
48
)
name
=
ramdump
.
read_cstring
(
name
,
48
)
exp_name
=
ramdump
.
read_cstring
(
exp_name
,
48
)
dma_buf_info
.
append
([
file
,
name
,
hex
(
size
),
exp_name
,
ionheap_name
,
bytes_to_KB
(
size
)])
dma_buf_info
.
append
([
file
,
name
,
hex
(
size
),
bytes_to_KB
(
size
)])
head
=
ramdump
.
read_word
(
head
+
prev_offset
)
head
=
ramdump
.
read_word
(
head
+
prev_offset
)
prev_node
=
ramdump
.
read_word
(
head
+
prev_offset
)
prev_node
=
ramdump
.
read_word
(
head
+
prev_offset
)
if
prev_node
==
0
:
if
prev_node
==
0
:
break
break
break
break
dma_buf_info
=
sorted
(
dma_buf_info
,
key
=
lambda
l
:
l
[
3
],
reverse
=
True
)
dma_buf_info
=
sorted
(
dma_buf_info
,
key
=
lambda
l
:
l
[
5
],
reverse
=
True
)
for
item
in
dma_buf_info
:
for
item
in
dma_buf_info
:
str
=
"
v.v (struct file *)0x{0:x}
\t
{1:15} {2:10}
(
{3} KB)
\n
"
.
\
str
=
"
v.v (struct file *)0x{0:x}
\t
{1:15} {2:10} {3
:10} {4:10} ({5
} KB)
\n
"
.
\
format
(
item
[
0
],
item
[
1
],
item
[
2
],
item
[
3
])
format
(
item
[
0
],
item
[
1
],
item
[
2
],
item
[
3
]
,
item
[
4
],
item
[
5
]
)
ion_info
.
write
(
str
)
ion_info
.
write
(
str
)
...
...
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