Moved tracing macro definitions into separate tracing_config.h header.

So now there's a central place to enable tracing in general and for
individual components.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23645 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2008-01-19 17:24:34 +00:00
parent 5f7a62cfdd
commit ab23dfa7f7
7 changed files with 30 additions and 16 deletions
+4 -5
View File
@@ -1,5 +1,5 @@
#ifndef KERNEL_UTIL_TRACING_H
#define KERNEL_UTIL_TRACING_H
#ifndef KERNEL_TRACING_H
#define KERNEL_TRACING_H
#include <SupportDefs.h>
@@ -7,9 +7,8 @@
#include <stdio.h>
#include <tracing_config.h>
#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 */
+24
View File
@@ -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
+1 -3
View File
@@ -12,15 +12,13 @@
#include <arch/x86/descriptors.h>
#include <commpage.h>
#include <thread_types.h>
#include <tracing_config.h>
#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() \
+1 -2
View File
@@ -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 {
-1
View File
@@ -33,7 +33,6 @@
# define TRACE(x) ;
#endif
//#define SIGNAL_TRACING
#define BLOCKABLE_SIGNALS (~(KILL_SIGNALS | SIGNAL_TO_MASK(SIGSTOP)))
#define STOP_SIGNALS \
-3
View File
@@ -39,9 +39,6 @@
#include <string.h>
//#define SYSCALL_TRACING
typedef struct generic_syscall generic_syscall;
struct generic_syscall {
-2
View File
@@ -45,8 +45,6 @@
# define TRACE(x) ;
#endif
//#define TEAM_TRACING
struct team_key {
team_id id;