Simplify the tracing code.
Remove an unused parameter in print_interrupts.
Remove some unused code.
Add UNUSED macro to mark temporarily unused parameters to prevent warnings.
Add a missing #include.