This change adds a new "strace" klib which implements the main functionality of the Linux strace tool, i.e. can output records for each syscall invoked by the user program, and can calculate relevant statistics such as number of occurrences and execution time.
Most of the thread_log() macro calls in the Unix code in the kernel are being removed because they are redundant with the corresponding strace output records; likewise, the code that implements collection and reporting of syscall statistics is being moved from the core syscall code to the strace klib. These changes, together with the removal of several related variables and struct fields, bring a reduction of the kernel binary size by 2.5%.
The manifest options that are used to confgure syscall tracing and statistics collection (namely, debugsyscalls, notrace, tracelist, and syscall_summary) remain the same, but are now acted upon by the strace klib instead of the main kernel, thus they take effect only if the strace klib is included in an image. The trace manifest option is still handled in the main kernel
code, but now it only controls tracing of kernel internals.
The first commit removes the futex_trace manifest option, which is now redundant because the strace klib provides equivalent functionality for tracing futex syscalls.
This change adds a new "strace" klib which implements the main functionality of the Linux strace tool, i.e. can output records for each syscall invoked by the user program, and can calculate relevant statistics such as number of occurrences and execution time. Most of the
thread_log()
macro calls in the Unix code in the kernel are being removed because they are redundant with the corresponding strace output records; likewise, the code that implements collection and reporting of syscall statistics is being moved from the core syscall code to the strace klib. These changes, together with the removal of several related variables and struct fields, bring a reduction of the kernel binary size by 2.5%. The manifest options that are used to confgure syscall tracing and statistics collection (namely,debugsyscalls
,notrace
,tracelist
, andsyscall_summary
) remain the same, but are now acted upon by the strace klib instead of the main kernel, thus they take effect only if the strace klib is included in an image. Thetrace
manifest option is still handled in the main kernel code, but now it only controls tracing of kernel internals.The first commit removes the
futex_trace
manifest option, which is now redundant because the strace klib provides equivalent functionality for tracing futex syscalls.