#DTrace #tracing probes have no execution time cost when not enabled: “No instrumented code is present for inactive probes, so your system does not experience any kind of performance degradation when you are not using DTrace. Once your experiment is complete and the dtrace command exits, all of the probes you used are automatically disabled and their instrumentation is removed, returning your system to its exact original state.”
how to use #Linux kernel #tracing tracepoints effectively and analyze #performance with #perf
notes from 02009 on #tracing with #Linux tracepoints, including the use of #perf. On Ubuntu you need to install, for example, linux-tools-5.8.0-40-generic if you’re running linux-image-5.8.0-40-generic.
Bil Lewis’s Omniscient #Debugger provided record-replay backward stepping of #Java programs in NetBeans and Eclipse #reverse-debugging
Mozilla #rr, which supports the #GDB #debugger, is reputed to be better than GDB’s built-in record-replay backward stepping: “more reliable”, “small performance drop”, “generated traces are small”, “supports AVX” #reverse-debugging
#documentation for the #GDB #debugger’s record-replay backward stepping #reverse-debugging
Mozilla #rr supports record-replay backward stepping on fewer platforms than the #GDB #debugger (only amd64 and then only sometimes). But it supports recording the traces to disk. Also, apparently, it requires /proc/sys/kernel/perf_event_paranoid to be no more than 1 for its fast (non -n) mode (like #perf), and doesn’t work inside Docker on the Kudu server, but does work inside KVM. #reverse-debugging
#rr #debugger #paper from roc et al., 02017 #toread. Reports slowdowns of 1.5× to 8× from recording different kinds of processes. #reverse-debugging
by default the #GDB #debugger’s record-replay backward stepping has a buffer limit of only 200000 instructions. #reverse-debugging
oh I didn’t know about the #GDB ptype #debugger command to print struct definitions and stuff. or the tty command to move the program being debugged to a different window so it doesn’t stomp on the TUI
how to invoke the pdb #debugger when scripting #GDB in #Python: python pdb.run('gdb.execute("print $1[0]")'). Also you can start up an #IPython kernel inside GDB with IPython.embed_kernel() (not sure if this works for notebooks) and define a function in .gdbinit that invokes Python by saying define functionname ... end with a python ... end block inside it.