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
f3dbb5dc
Commit
f3dbb5dc
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: Update slabinfo for 64-bit"
parents
42a0a8ec
33ff729c
No related branches found
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/slabinfo.py
+9
-9
9 additions, 9 deletions
linux-ramdump-parser-v2/parsers/slabinfo.py
with
9 additions
and
9 deletions
linux-ramdump-parser-v2/parsers/slabinfo.py
+
9
−
9
View file @
f3dbb5dc
...
...
@@ -29,7 +29,7 @@ class Slabinfo(RamParser):
def
slab_index
(
self
,
ramdump
,
p
,
addr
,
slab
):
slab_size_offset
=
self
.
ramdump
.
field_offset
(
'
struct kmem_cache
'
,
'
size
'
)
slab_size
=
self
.
ramdump
.
read_
word
(
slab
+
slab_size_offset
)
slab_size
=
self
.
ramdump
.
read_
int
(
slab
+
slab_size_offset
)
if
slab_size
is
None
:
return
-
1
return
(
p
-
addr
)
/
slab_size
...
...
@@ -56,10 +56,10 @@ class Slabinfo(RamParser):
'
struct kmem_cache
'
,
'
offset
'
)
slab_inuse_offset
=
self
.
ramdump
.
field_offset
(
'
struct kmem_cache
'
,
'
inuse
'
)
slab_offset
=
self
.
ramdump
.
read_
word
(
slab
+
slab_offset_offset
)
slab_inuse
=
self
.
ramdump
.
read_
word
(
slab
+
slab_inuse_offset
)
slab_offset
=
self
.
ramdump
.
read_
int
(
slab
+
slab_offset_offset
)
slab_inuse
=
self
.
ramdump
.
read_
int
(
slab
+
slab_inuse_offset
)
if
slab_offset
!=
0
:
p
=
obj
+
slab_offset
+
4
p
=
obj
+
slab_offset
+
self
.
ramdump
.
sizeof
(
"
void *
"
)
else
:
p
=
obj
+
slab_inuse
return
p
+
track_type
*
track_size
...
...
@@ -68,12 +68,13 @@ class Slabinfo(RamParser):
p
=
self
.
get_track
(
self
.
ramdump
,
slab
,
obj
,
track_type
)
track_addrs_offset
=
self
.
ramdump
.
field_offset
(
'
struct track
'
,
'
addrs
'
)
start
=
p
+
track_addrs_offset
pointer_size
=
self
.
ramdump
.
sizeof
(
"
unsigned long
"
)
if
track_type
==
0
:
out_file
.
write
(
'
ALLOC STACK
\n
'
)
else
:
out_file
.
write
(
'
FREE STACK
\n
'
)
for
i
in
range
(
0
,
16
):
a
=
self
.
ramdump
.
read_word
(
start
+
4
*
i
)
a
=
self
.
ramdump
.
read_word
(
start
+
pointer_size
*
i
)
if
a
==
0
:
break
look
=
self
.
ramdump
.
unwind_lookup
(
a
)
...
...
@@ -95,7 +96,7 @@ class Slabinfo(RamParser):
# offset is always 0. Work around this for now
map_count_offset
=
self
.
ramdump
.
field_offset
(
'
struct page
'
,
'
_mapcount
'
)
count
=
self
.
ramdump
.
read_
word
(
page
+
map_count_offset
)
count
=
self
.
ramdump
.
read_
int
(
page
+
map_count_offset
)
if
count
is
None
:
return
None
n_objects
=
(
count
>>
16
)
&
0xFFFF
...
...
@@ -110,7 +111,7 @@ class Slabinfo(RamParser):
return
slab_size_offset
=
self
.
ramdump
.
field_offset
(
'
struct kmem_cache
'
,
'
size
'
)
slab_size
=
self
.
ramdump
.
read_
word
(
slab
+
slab_size_offset
)
slab_size
=
self
.
ramdump
.
read_
int
(
slab
+
slab_size_offset
)
if
slab_size
is
None
:
return
slab_max_offset
=
self
.
ramdump
.
field_offset
(
'
struct kmem_cache
'
,
'
max
'
)
...
...
@@ -216,8 +217,7 @@ class Slabinfo(RamParser):
self
.
ramdump
,
slab
,
slab_node
,
slab_node_addr
+
slab_full_offset
,
slab_out
)
for
i
in
range
(
0
,
cpus
):
cpu_slabn_addr
=
cpu_slab_addr
+
\
self
.
ramdump
.
read_word
(
per_cpu_offset
+
4
*
i
)
cpu_slabn_addr
=
self
.
ramdump
.
read_word
(
cpu_slab_addr
,
cpu
=
i
)
self
.
print_per_cpu_slab_info
(
self
.
ramdump
,
slab
,
slab_node
,
cpu_slabn_addr
+
cpu_cache_page_offset
,
slab_out
)
...
...
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