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
6c9e9aac
Commit
6c9e9aac
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 timer related info" into opensource-tools.lnx.1.0
parents
8d1751e4
d70ee8dd
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/watchdog_v2.py
+23
-4
23 additions, 4 deletions
linux-ramdump-parser-v2/watchdog_v2.py
with
23 additions
and
4 deletions
linux-ramdump-parser-v2/watchdog_v2.py
+
23
−
4
View file @
6c9e9aac
...
...
@@ -839,7 +839,7 @@ def get_wdog_timing(ramdump):
logical_map
=
[]
jiffies
=
ramdump
.
read_word
(
'
jiffies
'
)
last_jiffies_update
=
ramdump
.
read_word
(
'
last_jiffies_update
'
)
tick_do_timer_cpu
=
ramdump
.
read_
word
(
'
tick_do_timer_cpu
'
)
tick_do_timer_cpu
=
ramdump
.
read_
s32
(
'
tick_do_timer_cpu
'
)
wdog_data_addr
=
ramdump
.
read_word
(
'
wdog_data
'
)
pet_timer_off
=
ramdump
.
field_offset
(
'
struct msm_watchdog_data
'
,
'
pet_timer
'
)
...
...
@@ -858,6 +858,13 @@ def get_wdog_timing(ramdump):
bark_time
=
ramdump
.
read_int
(
wdog_data_addr
+
bark_time_off
)
wdog_alive_mask
=
ramdump
.
read_structure_field
(
wdog_data_addr
,
'
struct msm_watchdog_data
'
,
'
alive_mask.bits
'
)
tick_bc_mask
=
ramdump
.
read_word
(
'
tick_broadcast_oneshot_mask
'
)
tick_bc_pending_mask
=
ramdump
.
read_word
(
'
tick_broadcast_pending_mask
'
)
tick_bc_evt_dev
=
ramdump
.
read_structure_field
(
'
tick_broadcast_device
'
,
'
struct tick_device
'
,
'
evtdev
'
)
tick_bc_next_evt
=
ramdump
.
read_structure_field
(
tick_bc_evt_dev
,
'
struct clock_event_device
'
,
'
next_event
'
)
tick_bc_next_evt
=
ns_to_sec
(
tick_bc_next_evt
)
if
(
ramdump
.
kernel_version
>=
(
4
,
9
,
0
)):
cpu_online_bits
=
ramdump
.
read_word
(
'
__cpu_online_mask
'
)
else
:
...
...
@@ -877,7 +884,6 @@ def get_wdog_timing(ramdump):
wdog_task_queued
=
ramdump
.
read_structure_field
(
wdog_task
,
'
struct task_struct
'
,
'
sched_info.last_queued
'
)
logical_map_addr
=
ramdump
.
address_of
(
'
__cpu_logical_map
'
)
for
i
in
range
(
0
,
ramdump
.
get_num_cpus
()):
cpu_logical_map_addr
=
logical_map_addr
+
(
i
*
8
)
core_id
=
ramdump
.
read_u64
(
cpu_logical_map_addr
)
...
...
@@ -924,9 +930,22 @@ def get_wdog_timing(ramdump):
'
Timestamp of last timer interrupt(last_jiffies_update): {0}
'
.
format
(
ns_to_sec
(
last_jiffies_update
)))
print_out_str
(
"
tick_do_timer_cpu: {0}
"
.
format
(
tick_do_timer_cpu
))
print_out_str
(
'
tick_do_timer_cpu is core which increments jiffies and
'
'
processes watchdog pet timer
'
)
print_out_str
(
'
CPU logical map: {0}
'
.
format
(
logical_map
))
print_out_str
(
'
tick_broadcast_oneshot_mask: {0:08b}
'
.
format
(
tick_bc_mask
))
print_out_str
(
'
tick_broadcast_pending_mask: {0:08b}
'
.
format
(
tick_bc_pending_mask
))
print_out_str
(
'
tick_broad_cast_device next_event: {0:.6f}
'
.
format
(
tick_bc_next_evt
))
for
i
in
range
(
0
,
ramdump
.
get_num_cpus
()):
tick_cpu_device
=
ramdump
.
address_of
(
'
tick_cpu_device
'
)
+
ramdump
.
per_cpu_offset
(
i
)
evt_dev
=
ramdump
.
read_structure_field
(
tick_cpu_device
,
'
struct tick_device
'
,
'
evtdev
'
)
next_event
=
ramdump
.
read_structure_field
(
evt_dev
,
'
struct clock_event_device
'
,
'
next_event
'
)
next_event
=
ns_to_sec
(
next_event
)
print_out_str
(
"
CPU{0} tick_device next_event: {1:.6f}
"
.
format
(
i
,
next_event
))
epoch_ns
=
ramdump
.
read_word
(
'
cd.read_data[0].epoch_ns
'
)
epoch_cyc
=
ramdump
.
read_word
(
'
cd.read_data[0].epoch_cyc
'
)
print_out_str
(
'
epoch_ns: {0}ns epoch_cyc: {1}
'
.
format
(
epoch_ns
,
epoch_cyc
))
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