In essence, it adds a new structure trace_log that holds a fixed size (64K)
an array of pointers to trace_records and acts as a ring buffer between threads
capturing active tracepoints (producers) and new thread strace (single consumer)
that prints them to the console. The write pointer - write_offset - is atomic that
rolls over every 64K and the strace thread follows it and tries to print
each trace (see print_trace).
The strace can be activated by adding "--strace" kernel command line argument.
This PR implements a simple strace-like mechanism described by https://github.com/cloudius-systems/osv/issues/1263.
In essence, it adds a new structure trace_log that holds a fixed size (64K) an array of pointers to trace_records and acts as a ring buffer between threads capturing active tracepoints (producers) and new thread strace (single consumer) that prints them to the console. The write pointer - write_offset - is atomic that rolls over every 64K and the strace thread follows it and tries to print each trace (see print_trace).
The strace can be activated by adding "--strace" kernel command line argument.
This PR also adds another kernel command line parameter to list all available tracepoints.
Fixes https://github.com/cloudius-systems/osv/issues/1263