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
12aebfe6
Commit
12aebfe6
authored
11 years ago
by
Linux Build Service Account
Committed by
Gerrit - the friendly Code Review server
11 years ago
Browse files
Options
Downloads
Plain Diff
Merge "linux-ramdump-parser-v2: Make the page print outs more useful"
parents
c1a01fec
a02a2754
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/pagetypeinfo.py
+14
-4
14 additions, 4 deletions
linux-ramdump-parser-v2/parsers/pagetypeinfo.py
linux-ramdump-parser-v2/parsers/vmstat.py
+2
-1
2 additions, 1 deletion
linux-ramdump-parser-v2/parsers/vmstat.py
with
16 additions
and
5 deletions
linux-ramdump-parser-v2/parsers/pagetypeinfo.py
+
14
−
4
View file @
12aebfe6
# Copyright (c) 2012-201
3
, The Linux Foundation. All rights reserved.
# Copyright (c) 2012-201
4
, The Linux Foundation. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 and
...
...
@@ -28,6 +28,9 @@ class Pagetypeinfo(RamParser):
zname
=
ramdump
.
read_cstring
(
zname_addr
,
12
)
is_corrupt
=
False
total_bytes
=
0
total_pages
=
0
total_orders
=
[
0
]
*
11
total_orders_str
=
'
Total pages:
'
for
mtype
in
range
(
0
,
migrate_types
):
mname_addr
=
ramdump
.
read_word
(
migratetype_names
+
mtype
*
4
)
...
...
@@ -35,6 +38,7 @@ class Pagetypeinfo(RamParser):
pageinfo
=
(
'
zone {0:8} type {1:12}
'
.
format
(
zname
,
mname
))
nums
=
''
total_type_bytes
=
0
total_type_pages
=
0
for
order
in
range
(
0
,
11
):
area
=
zone
+
free_area_offset
+
order
*
free_area_size
...
...
@@ -57,12 +61,18 @@ class Pagetypeinfo(RamParser):
nums
=
nums
+
(
'
{0:6}
'
.
format
(
pg_count
))
total_type_bytes
=
total_type_bytes
+
\
pg_count
*
4096
*
(
2
**
order
)
total_type_pages
=
total_type_pages
+
pg_count
*
(
2
**
order
)
total_orders
[
order
]
+=
pg_count
print_out_str
(
pageinfo
+
nums
+
'
= {0} MB
'
.
format
(
total_type_bytes
/
(
1024
*
1024
)))
'
= {0} MB
{1} pages
'
.
format
(
total_type_bytes
/
(
1024
*
1024
)
,
total_type_pages
))
total_bytes
=
total_bytes
+
total_type_bytes
total_pages
=
total_pages
+
total_type_pages
for
order
in
range
(
0
,
11
):
total_orders_str
+=
'
{0:6}
'
.
format
(
total_orders
[
order
])
print_out_str
(
total_orders_str
)
print_out_str
(
'
Approximate total for zone {0}: {1} MB
\n
'
.
format
(
zname
,
total_bytes
/
(
1024
*
1024
)))
print_out_str
(
'
Approximate total for zone {0}: {1} MB
, {2} pages
\n
'
.
format
(
zname
,
total_bytes
/
(
1024
*
1024
)
,
total_pages
))
if
is_corrupt
:
print_out_str
(
'
!!! Numbers may not be accurate due to list corruption!
'
)
...
...
This diff is collapsed.
Click to expand it.
linux-ramdump-parser-v2/parsers/vmstat.py
+
2
−
1
View file @
12aebfe6
# Copyright (c) 2013, The Linux Foundation. All rights reserved.
# Copyright (c) 2013
-2014
, The Linux Foundation. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 and
...
...
@@ -66,3 +66,4 @@ class ZoneInfo(RamParser):
for
i
in
xrange
(
0
,
max_zone_stats
):
print_out_str
(
'
{0:30}: {1:8}
'
.
format
(
vmstat_names
[
i
],
self
.
ramdump
.
read_word
(
self
.
ramdump
.
array_index
(
vmstats_addr
,
'
atomic_long_t
'
,
i
))))
print_out_str
(
'
Total system pages: {0}
'
.
format
(
self
.
ramdump
.
read_word
(
self
.
ramdump
.
addr_lookup
(
'
totalram_pages
'
))))
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