diff --git a/headers/private/kernel/tracing.h b/headers/private/kernel/tracing.h index da187b0681..25fa9a6b76 100644 --- a/headers/private/kernel/tracing.h +++ b/headers/private/kernel/tracing.h @@ -1,5 +1,5 @@ -#ifndef KERNEL_UTIL_TRACING_H -#define KERNEL_UTIL_TRACING_H +#ifndef KERNEL_TRACING_H +#define KERNEL_TRACING_H #include @@ -7,9 +7,8 @@ #include +#include -#define ENABLE_TRACING 0 -#define MAX_TRACE_SIZE 1024 * 1024 struct trace_entry { uint16 size; @@ -88,4 +87,4 @@ status_t tracing_init(void); } #endif -#endif /* KERNEL_UTIL_TRACING_H */ +#endif /* KERNEL_TRACING_H */ diff --git a/headers/private/kernel/tracing_config.h b/headers/private/kernel/tracing_config.h new file mode 100644 index 0000000000..c54df839a8 --- /dev/null +++ b/headers/private/kernel/tracing_config.h @@ -0,0 +1,24 @@ +#ifndef KERNEL_TRACING_CONFIG_H +#define KERNEL_TRACING_CONFIG_H + +// general settings + +// enable tracing (0/1) +#ifndef ENABLE_TRACING +# define ENABLE_TRACING 0 +#endif + +// tracing buffer size (in bytes) +#ifndef MAX_TRACE_SIZE +# define MAX_TRACE_SIZE 1024 * 1024 +#endif + + +// macros that enable tracing for individual components + +//#define BLOCK_CACHE_TRANSACTION_TRACING +//#define SIGNAL_TRACING +//#define SYSCALL_TRACING +//#define TEAM_TRACING + +#endif // KERNEL_TRACING_CONFIG_H diff --git a/src/system/kernel/arch/x86/arch_interrupts.S b/src/system/kernel/arch/x86/arch_interrupts.S index 96a98505d0..89a23dcab6 100644 --- a/src/system/kernel/arch/x86/arch_interrupts.S +++ b/src/system/kernel/arch/x86/arch_interrupts.S @@ -12,15 +12,13 @@ #include #include #include +#include #include "asm_offsets.h" #include "syscall_numbers.h" #include "syscall_table.h" -//#define SYSCALL_TRACING - // also define this macro in syscalls.cpp - #define FUNCTION(x) .global x; .type x,@function; x #define UPDATE_THREAD_USER_TIME_COMMON() \ diff --git a/src/system/kernel/cache/block_cache.cpp b/src/system/kernel/cache/block_cache.cpp index 2d133d0d40..64fc93ed5c 100644 --- a/src/system/kernel/cache/block_cache.cpp +++ b/src/system/kernel/cache/block_cache.cpp @@ -42,7 +42,6 @@ #define DEBUG_BLOCK_CACHE //#define DEBUG_CHANGED -//#define TRANSACTION_TRACING // This macro is used for fatal situations that are acceptable in a running // system, like out of memory situations - should only panic for debugging. @@ -73,7 +72,7 @@ struct cache_transaction { bool has_sub_transaction; }; -#ifdef TRANSACTION_TRACING +#ifdef BLOCK_CACHE_TRANSACTION_TRACING namespace TransactionTracing { class Action : public AbstractTraceEntry { diff --git a/src/system/kernel/signal.cpp b/src/system/kernel/signal.cpp index 7a175315eb..802df64ffe 100644 --- a/src/system/kernel/signal.cpp +++ b/src/system/kernel/signal.cpp @@ -33,7 +33,6 @@ # define TRACE(x) ; #endif -//#define SIGNAL_TRACING #define BLOCKABLE_SIGNALS (~(KILL_SIGNALS | SIGNAL_TO_MASK(SIGSTOP))) #define STOP_SIGNALS \ diff --git a/src/system/kernel/syscalls.cpp b/src/system/kernel/syscalls.cpp index a6b2f40291..5510b53af1 100644 --- a/src/system/kernel/syscalls.cpp +++ b/src/system/kernel/syscalls.cpp @@ -39,9 +39,6 @@ #include -//#define SYSCALL_TRACING - - typedef struct generic_syscall generic_syscall; struct generic_syscall { diff --git a/src/system/kernel/team.cpp b/src/system/kernel/team.cpp index 4898f19d9c..f77579140e 100644 --- a/src/system/kernel/team.cpp +++ b/src/system/kernel/team.cpp @@ -45,8 +45,6 @@ # define TRACE(x) ; #endif -//#define TEAM_TRACING - struct team_key { team_id id;