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
b8bf8939
Commit
b8bf8939
authored
7 years ago
by
lnx build
Committed by
Gerrit - the friendly Code Review server
7 years ago
Browse files
Options
Downloads
Plain Diff
Merge "lrdp_v2 :Print ZRAM compressed for kernel > 4.4" into opensource-tools.lnx.1.0
parents
c78f5ee5
8a2e2c5a
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/memstat.py
+23
-8
23 additions, 8 deletions
linux-ramdump-parser-v2/parsers/memstat.py
with
23 additions
and
8 deletions
linux-ramdump-parser-v2/parsers/memstat.py
+
23
−
8
View file @
b8bf8939
...
...
@@ -159,15 +159,30 @@ class MemStats(RamParser):
kgsl_memory
=
0
# zcompressed ram
zram_devices_word
=
self
.
ramdump
.
read_word
(
'
zram_devices
'
)
if
zram_devices_word
is
not
None
:
zram_devices_stat_offset
=
self
.
ramdump
.
field_offset
(
if
self
.
ramdump
.
kernel_version
>=
(
4
,
4
)
:
zram_index_idr
=
self
.
ramdump
.
read_word
(
'
zram_index_idr
'
)
idr_layer_ary_offset
=
self
.
ramdump
.
field_offset
\
(
'
struct idr_layer
'
,
'
ary
'
)
idr_layer_ary
=
self
.
ramdump
.
read_word
(
zram_index_idr
+
idr_layer_ary_offset
)
zram_meta
=
idr_layer_ary
+
self
.
ramdump
.
field_offset
\
(
'
struct zram
'
,
'
meta
'
)
zram_meta
=
self
.
ramdump
.
read_word
(
zram_meta
)
mem_pool
=
zram_meta
+
self
.
ramdump
.
field_offset
\
(
'
struct zram_meta
'
,
'
mem_pool
'
)
mem_pool
=
self
.
ramdump
.
read_word
(
mem_pool
)
page_allocated
=
mem_pool
+
self
.
ramdump
.
field_offset
\
(
'
struct zs_pool
'
,
'
pages_allocated
'
)
stat_val
=
self
.
ramdump
.
read_u64
(
page_allocated
)
stat_val
=
self
.
pages_to_mb
(
stat_val
)
else
:
zram_devices_word
=
self
.
ramdump
.
read_word
(
'
zram_devices
'
)
if
zram_devices_word
is
not
None
:
zram_devices_stat_offset
=
self
.
ramdump
.
field_offset
(
'
struct zram
'
,
'
stats
'
)
stat_addr
=
zram_devices_word
+
zram_devices_stat_offset
stat_val
=
self
.
ramdump
.
read_u64
(
stat_addr
)
stat_val
=
self
.
bytes_to_mb
(
stat_val
)
else
:
stat_val
=
0
stat_addr
=
zram_devices_word
+
zram_devices_stat_offset
stat_val
=
self
.
ramdump
.
read_u64
(
stat_addr
)
stat_val
=
self
.
bytes_to_mb
(
stat_val
)
self
.
out_mem_stat
=
out_mem_stat
self
.
vmalloc_size
=
0
...
...
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