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
91b74976
Commit
91b74976
authored
5 years ago
by
Linux Build Service Account
Committed by
Gerrit - the friendly Code Review server
5 years ago
Browse files
Options
Downloads
Plain Diff
Merge "lrdp_V2: Support to print task's affinity"
parents
28911e04
a3d39b29
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/runqueue.py
+3
-1
3 additions, 1 deletion
linux-ramdump-parser-v2/parsers/runqueue.py
linux-ramdump-parser-v2/parsers/taskdump.py
+7
-2
7 additions, 2 deletions
linux-ramdump-parser-v2/parsers/taskdump.py
with
10 additions
and
3 deletions
linux-ramdump-parser-v2/parsers/runqueue.py
+
3
−
1
View file @
91b74976
...
@@ -40,12 +40,14 @@ class RunQueues(RamParser):
...
@@ -40,12 +40,14 @@ class RunQueues(RamParser):
def
print_task_state
(
self
,
status
,
task_addr
):
def
print_task_state
(
self
,
status
,
task_addr
):
pid_offset
=
self
.
ramdump
.
field_offset
(
'
struct task_struct
'
,
'
pid
'
)
pid_offset
=
self
.
ramdump
.
field_offset
(
'
struct task_struct
'
,
'
pid
'
)
comm_offset
=
self
.
ramdump
.
field_offset
(
'
struct task_struct
'
,
'
comm
'
)
comm_offset
=
self
.
ramdump
.
field_offset
(
'
struct task_struct
'
,
'
comm
'
)
affinity_offset
=
self
.
ramdump
.
field_offset
(
'
struct task_struct
'
,
'
cpus_allowed
'
)
if
0
<
task_addr
:
if
0
<
task_addr
:
pid
=
self
.
ramdump
.
read_int
(
task_addr
+
pid_offset
)
pid
=
self
.
ramdump
.
read_int
(
task_addr
+
pid_offset
)
taskname
=
self
.
ramdump
.
read_cstring
(
task_addr
+
comm_offset
,
16
)
taskname
=
self
.
ramdump
.
read_cstring
(
task_addr
+
comm_offset
,
16
)
affinity
=
self
.
ramdump
.
read_u64
(
task_addr
+
affinity_offset
)
self
.
print_out_str_with_tab
(
self
.
print_out_str_with_tab
(
'
{0}: {1}({2})
'
.
format
(
status
,
taskname
,
pid
))
'
{0}: {1}({2})
[affinity={3:x}]
'
.
format
(
status
,
taskname
,
pid
,
affinity
))
else
:
else
:
self
.
print_out_str_with_tab
(
'
{0}: None(0)
'
.
format
(
status
))
self
.
print_out_str_with_tab
(
'
{0}: None(0)
'
.
format
(
status
))
...
...
This diff is collapsed.
Click to expand it.
linux-ramdump-parser-v2/parsers/taskdump.py
+
7
−
2
View file @
91b74976
...
@@ -61,6 +61,7 @@ def dump_thread_group(ramdump, thread_group, task_out, taskhighlight_out, check_
...
@@ -61,6 +61,7 @@ def dump_thread_group(ramdump, thread_group, task_out, taskhighlight_out, check_
offset_stack
=
ramdump
.
field_offset
(
'
struct task_struct
'
,
'
stack
'
)
offset_stack
=
ramdump
.
field_offset
(
'
struct task_struct
'
,
'
stack
'
)
offset_state
=
ramdump
.
field_offset
(
'
struct task_struct
'
,
'
state
'
)
offset_state
=
ramdump
.
field_offset
(
'
struct task_struct
'
,
'
state
'
)
offset_prio
=
ramdump
.
field_offset
(
'
struct task_struct
'
,
'
prio
'
)
offset_prio
=
ramdump
.
field_offset
(
'
struct task_struct
'
,
'
prio
'
)
offset_affine
=
ramdump
.
field_offset
(
'
struct task_struct
'
,
'
cpus_allowed
'
)
offset_exit_state
=
ramdump
.
field_offset
(
offset_exit_state
=
ramdump
.
field_offset
(
'
struct task_struct
'
,
'
exit_state
'
)
'
struct task_struct
'
,
'
exit_state
'
)
orig_thread_group
=
thread_group
orig_thread_group
=
thread_group
...
@@ -74,6 +75,7 @@ def dump_thread_group(ramdump, thread_group, task_out, taskhighlight_out, check_
...
@@ -74,6 +75,7 @@ def dump_thread_group(ramdump, thread_group, task_out, taskhighlight_out, check_
next_thread_stack
=
next_thread_start
+
offset_stack
next_thread_stack
=
next_thread_start
+
offset_stack
next_thread_state
=
next_thread_start
+
offset_state
next_thread_state
=
next_thread_start
+
offset_state
next_thread_exit_state
=
next_thread_start
+
offset_exit_state
next_thread_exit_state
=
next_thread_start
+
offset_exit_state
next_thread_affine
=
next_thread_start
+
offset_affine
next_thread_info
=
ramdump
.
get_thread_info_addr
(
next_thread_start
)
next_thread_info
=
ramdump
.
get_thread_info_addr
(
next_thread_start
)
thread_task_name
=
cleanupString
(
thread_task_name
=
cleanupString
(
ramdump
.
read_cstring
(
next_thread_comm
,
16
))
ramdump
.
read_cstring
(
next_thread_comm
,
16
))
...
@@ -87,6 +89,9 @@ def dump_thread_group(ramdump, thread_group, task_out, taskhighlight_out, check_
...
@@ -87,6 +89,9 @@ def dump_thread_group(ramdump, thread_group, task_out, taskhighlight_out, check_
thread_task_pid
=
ramdump
.
read_int
(
next_thread_pid
)
thread_task_pid
=
ramdump
.
read_int
(
next_thread_pid
)
if
thread_task_pid
is
None
:
if
thread_task_pid
is
None
:
return
return
thread_task_affine
=
ramdump
.
read_u64
(
next_thread_affine
)
if
thread_task_affine
is
None
:
return
task_state
=
ramdump
.
read_word
(
next_thread_state
)
task_state
=
ramdump
.
read_word
(
next_thread_state
)
if
task_state
is
None
:
if
task_state
is
None
:
return
return
...
@@ -124,8 +129,8 @@ def dump_thread_group(ramdump, thread_group, task_out, taskhighlight_out, check_
...
@@ -124,8 +129,8 @@ def dump_thread_group(ramdump, thread_group, task_out, taskhighlight_out, check_
thread_line
=
'
'
+
thread_line
thread_line
=
'
'
+
thread_line
if
not
first
:
if
not
first
:
task_out
.
write
(
'
Process: {0}, cpu: {
1
} pid: {
2
} start: 0x{
3
:x}
\n
'
.
format
(
task_out
.
write
(
'
Process: {0},
[affinity: 0x{1:x}]
cpu: {
2
} pid: {
3
} start: 0x{
4
:x}
\n
'
.
format
(
thread_task_name
,
task_cpu
,
thread_task_pid
,
next_thread_start
))
thread_task_name
,
thread_task_affine
,
task_cpu
,
thread_task_pid
,
next_thread_start
))
task_out
.
write
(
task_out
.
write
(
'
=====================================================
\n
'
)
'
=====================================================
\n
'
)
first
=
1
first
=
1
...
...
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