bonefish+axeld:
* Implemented an optional tracing layer that can be used in the kernel. Nice to use if you don't have serial output or need something that doesn't slow down the system as much. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23447 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
#ifndef KERNEL_UTIL_TRACING_H
|
||||
#define KERNEL_UTIL_TRACING_H
|
||||
|
||||
|
||||
#include <SupportDefs.h>
|
||||
|
||||
|
||||
#define ENABLE_TRACING 0
|
||||
#define MAX_TRACE_SIZE 1024 * 1024
|
||||
|
||||
struct trace_entry {
|
||||
uint16 size;
|
||||
uint16 flags;
|
||||
};
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
#include <new>
|
||||
|
||||
class TraceEntry : trace_entry {
|
||||
public:
|
||||
TraceEntry();
|
||||
virtual ~TraceEntry();
|
||||
|
||||
virtual void Dump();
|
||||
|
||||
size_t Size() const { return size; }
|
||||
uint16 Flags() const { return flags; }
|
||||
|
||||
void Initialized();
|
||||
|
||||
void* operator new(size_t size);
|
||||
};
|
||||
|
||||
#endif // __cplusplus
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
status_t tracing_init(void);
|
||||
|
||||
#endif /* KERNEL_UTIL_TRACING_H */
|
||||
Reference in New Issue
Block a user