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
8ac66a6f
Commit
8ac66a6f
authored
7 years ago
by
Ankur Bansal
Browse files
Options
Downloads
Patches
Plain Diff
lrdp_V2 : Fix for broken memusage.py
Fix for broken memusage.py Change-Id: Idcc5dc7f313b5e35c22cc80f39aa972817483ea8
parent
eebb35d0
No related branches found
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/memusage.py
+11
-6
11 additions, 6 deletions
linux-ramdump-parser-v2/parsers/memusage.py
with
11 additions
and
6 deletions
linux-ramdump-parser-v2/parsers/memusage.py
+
11
−
6
View file @
8ac66a6f
...
...
@@ -69,12 +69,7 @@ def do_dump_process_memory(ramdump):
next_thread_pid
=
task_struct
+
offset_pid
thread_task_pid
=
ramdump
.
read_int
(
next_thread_pid
)
signal_struct
=
ramdump
.
read_word
(
task_struct
+
offset_signal
)
adj
=
ramdump
.
read_u16
(
signal_struct
+
offset_adj
)
if
adj
&
0x8000
:
adj
=
adj
-
0x10000
rss
,
swap
=
get_rss
(
ramdump
,
task_struct
)
if
rss
!=
0
:
task_info
.
append
([
thread_task_name
,
thread_task_pid
,
rss
,
swap
,
rss
+
swap
,
adj
])
next_task
=
ramdump
.
read_word
(
init_next_task
)
if
next_task
is
None
:
break
...
...
@@ -92,6 +87,16 @@ def do_dump_process_memory(ramdump):
if
init_next_task
==
orig_init_next_task
:
break
if
signal_struct
==
0
or
signal_struct
==
None
:
continue
adj
=
ramdump
.
read_u16
(
signal_struct
+
offset_adj
)
if
adj
&
0x8000
:
adj
=
adj
-
0x10000
rss
,
swap
=
get_rss
(
ramdump
,
task_struct
)
if
rss
!=
0
:
task_info
.
append
([
thread_task_name
,
thread_task_pid
,
rss
,
swap
,
rss
+
swap
,
adj
])
task_info
=
sorted
(
task_info
,
key
=
lambda
l
:
l
[
4
],
reverse
=
True
)
str
=
'
{0:<17s}{1:>8s}{2:>19s}{3:>12s}{4:>8}
\n
'
.
format
(
'
Task name
'
,
'
PID
'
,
'
RSS in kB
'
,
'
SWAP in kB
'
,
'
ADJ
'
)
...
...
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