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
379af372
Commit
379af372
authored
5 years ago
by
qctecmdr
Committed by
Gerrit - the friendly Code Review server
5 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Fix meminfo and memstat for kernel>4.20"
parents
8d58eb76
456d2e79
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
linux-ramdump-parser-v2/parsers/memstat.py
+5
-1
5 additions, 1 deletion
linux-ramdump-parser-v2/parsers/memstat.py
linux-ramdump-parser-v2/parsers/memusage.py
+5
-1
5 additions, 1 deletion
linux-ramdump-parser-v2/parsers/memusage.py
with
10 additions
and
2 deletions
linux-ramdump-parser-v2/parsers/memstat.py
+
5
−
1
View file @
379af372
...
...
@@ -142,7 +142,11 @@ class MemStats(RamParser):
def
print_mem_stats
(
self
,
out_mem_stat
):
# Total memory
total_mem
=
self
.
ramdump
.
read_word
(
'
totalram_pages
'
)
if
(
self
.
ramdump
.
kernel_version
>
(
4
,
20
,
0
)):
total_mem
=
self
.
ramdump
.
read_word
(
'
_totalram_pages
'
)
else
:
total_mem
=
self
.
ramdump
.
read_word
(
'
totalram_pages
'
)
total_mem
=
self
.
pages_to_mb
(
total_mem
)
if
(
self
.
ramdump
.
kernel_version
<
(
4
,
9
,
0
)):
...
...
This diff is collapsed.
Click to expand it.
linux-ramdump-parser-v2/parsers/memusage.py
+
5
−
1
View file @
379af372
...
...
@@ -55,7 +55,11 @@ def do_dump_process_memory(ramdump):
total_shmem_swap
=
get_shmem_swap_usage
(
ramdump
)
total_slab
=
slab_rec
+
slab_unrec
total_mem
=
ramdump
.
read_word
(
'
totalram_pages
'
)
*
4
if
(
ramdump
.
kernel_version
>
(
4
,
20
,
0
)):
total_mem
=
ramdump
.
read_word
(
'
_totalram_pages
'
)
*
4
else
:
total_mem
=
ramdump
.
read_word
(
'
totalram_pages
'
)
*
4
offset_comm
=
ramdump
.
field_offset
(
'
struct task_struct
'
,
'
comm
'
)
offset_signal
=
ramdump
.
field_offset
(
'
struct task_struct
'
,
'
signal
'
)
offset_adj
=
ramdump
.
field_offset
(
'
struct signal_struct
'
,
'
oom_score_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