Script dprobes.lua
dprobes.lua
Author: Michael Ambrus, March 2025
This program demonstrates differential probes using high-level class Trace
Part 1 - Setup selections of probes:
- Coarse selections for a groups of probes to operate on - Sub-select from this into sub-groups - Sub-select from sub-groups diff-probes.
This must be a selection of 1
Part 2 - Roles: assign diff-probe
- Sub-select from sub-groups diff-probes. For each diff-probe, this must be a sub-selection of 1
Example of using this script:
-- Arg1: Number of iterations -- Arg2: Period-time in mS -- Arg3: Clock-ticks per second (optional) -- POSIX nS i.e.: -- 1e9 -- For PMU/TSC, check first (in kHz) -- sudo cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq -- (1.867e9 on 2.8GHz CPU is reasonable) -- Produce 20 results with 111 mS in-between loadfile("dprobes.lua")(20, 111) -- 3:rd argument defaulted to POSIX clock-source (1e9) -- Enable all probes of interest -- 1 94777659393024 T 1 0 0 -- 2 94777659392960 T 1 0 0 -- 3 94777659392256 T 1 0 0 -- 4 94777659392320 T 1 0 0 -- 5 94777659392128 T 1 0 0 -- 6 94777659392192 T 1 0 0 -- Harvesting [20] diffs/loop-freq for averages over 2220 mS -- Threads A, B, C probes dT time : 5.1225695 10.62159965 4.79e-05 (mS) -- Threads A, B, C frequency probes: 10.237395 21.2387576 0.00011645 (mS) -- Threads A, B, C frequency probes: 97.681099537529 47.083733372427 8587376.556462 (kHz)
See also:
Info:
- Author: Michael Ambrus, November 2025