aboutsummaryrefslogtreecommitdiffstats
path: root/erts/etc/unix/etp-commands.in
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2017-04-21 15:34:59 +0200
committerRickard Green <[email protected]>2017-04-21 15:34:59 +0200
commit52744948f4bbe85dee428cefdf9d205665a57b18 (patch)
tree7b8446d19de1ba000d3dda8c4e469f1908d592cc /erts/etc/unix/etp-commands.in
parentf214646911cf0cdb3d19d519908d2b06c4a4fff4 (diff)
parent02da78a8cce79a07f00ff0816967e84ead8a3bfa (diff)
downloadotp-52744948f4bbe85dee428cefdf9d205665a57b18.tar.gz
otp-52744948f4bbe85dee428cefdf9d205665a57b18.tar.bz2
otp-52744948f4bbe85dee428cefdf9d205665a57b18.zip
Merge branch 'rickard/timer-improvements'
OTP-14356 * rickard/timer-improvements: Fix of later timer wheel Minimum timeout position in each timer wheel Manage timers to trigger at once in a slot similar to other timers Introduce timer slot range counters Timer wheel divided into a "soon wheel" and a "later wheel" Remove unnecessary cancel callback from timer-wheel timers Rearrange timer struct fields in order to simplify Use timer wheel for short BIF timers Use magic refs for BIF timers Remove accessor BIF timer implementation Fix aux-work timer implementation
Diffstat (limited to 'erts/etc/unix/etp-commands.in')
-rw-r--r--erts/etc/unix/etp-commands.in75
1 files changed, 75 insertions, 0 deletions
diff --git a/erts/etc/unix/etp-commands.in b/erts/etc/unix/etp-commands.in
index c689d495e6..643cfbf323 100644
--- a/erts/etc/unix/etp-commands.in
+++ b/erts/etc/unix/etp-commands.in
@@ -2871,6 +2871,81 @@ define etp-disasm
end
end
+############################################################################
+#
+# Timer Wheel
+#
+
+define etp-timer-wheel
+# Args: TimerWheel
+ if (!erts_initialized)
+ printf "System not initialized!\n"
+ else
+ set $tiw = $arg0
+ printf "Number of timers: %d\n", $tiw->nto
+ printf "Min timeout pos: %d\n", $tiw->next_timeout_pos
+ printf "\n--- Soon Wheel ---\n"
+ set $ix = $tiw->pos & etp_tw_soon_wheel_mask
+ printf "Position: %ld (%d)\n", $tiw->pos, $ix
+ printf "Min timeout position: %ld (%d)\n", $tiw->soon.min_tpos, $tiw->soon.min_tpos & etp_tw_soon_wheel_mask
+ printf "Number of timers: %d\n", $tiw->soon.nto
+ set $slots = etp_tw_soon_wheel_size
+ while $slots > 0
+ set $tmr = $tiw->w[$ix]
+ if ($tmr != (ErtsTWheelTimer *) 0x0)
+ printf "---\n"
+ printf "Slot: %d\n", $ix
+ printf "\n"
+ while 1
+ printf "- Timeout pos: %ld\n", $tmr->timeout_pos
+ printf " Pointer: (ErtsTWheelTimer *) %p\n", $tmr
+ set $tmr = $tmr->next
+ if ($tmr == $tiw->w[$ix])
+ loop_break
+ end
+ end
+ end
+ set $ix++
+ if ($ix == (etp_tw_soon_wheel_first_slot + etp_tw_soon_wheel_size))
+ set $ix = etp_tw_soon_wheel_first_slot
+ end
+ set $slots--
+ end
+ printf "\n--- Later Wheel ---\n"
+ set $ix = (($tiw->later.pos >> etp_tw_later_wheel_shift) & etp_tw_later_wheel_mask) + etp_tw_later_wheel_first_slot
+ printf "Position: %ld (%d)\n", $tiw->later.pos, $ix
+ printf "Min timeout position: %ld (%d)\n", $tiw->later.min_tpos, (($tiw->later.min_tpos >> etp_tw_later_wheel_shift) & etp_tw_later_wheel_mask) + etp_tw_later_wheel_first_slot
+ printf "Number of timers: %d\n", $tiw->later.nto
+ set $slots = etp_tw_later_wheel_size
+ set $slot_pos = $tiw->later.pos
+ while $slots > 0
+ set $tmr = $tiw->w[$ix]
+ if ($tmr != (ErtsTWheelTimer *) 0x0)
+ printf "---\n"
+ printf "Slot: %d\n", $ix
+ printf "Slot Range: [%ld, %ld]\n", $slot_pos, $slot_pos + etp_tw_later_wheel_slot_size
+ printf "Pre timeout pos: %ld\n", $slot_pos - etp_tw_later_wheel_slot_size
+ printf "\n"
+ while 1
+ printf "- Timeout pos: %ld\n", $tmr->timeout_pos
+ printf " Pointer: (ErtsTWheelTimer *) %p\n", $tmr
+ set $tmr = $tmr->next
+ if ($tmr == $tiw->w[$ix])
+ loop_break
+ end
+ end
+ end
+ set $ix++
+ if ($ix == (etp_tw_later_wheel_first_slot + etp_tw_later_wheel_size))
+ set $ix = etp_tw_later_wheel_first_slot
+ end
+ set $slot_pos = $slot_pos + etp_tw_later_wheel_slot_size
+ set $slots--
+ end
+ end
+ printf "---\n"
+end
+
document etp-disasm
%---------------------------------------------------------------------------
% etp-disasm StartI EndI