2008-01-19 20:24:34 +03:00
|
|
|
#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
|
2008-04-29 11:35:00 +04:00
|
|
|
# define MAX_TRACE_SIZE (20 * 1024 * 1024)
|
2008-01-19 20:24:34 +03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2008-04-30 12:03:53 +04:00
|
|
|
#if ENABLE_TRACING
|
|
|
|
|
2008-04-27 18:24:18 +04:00
|
|
|
// macros specifying the tracing level for individual components (0 is disabled)
|
|
|
|
|
2008-05-02 21:02:41 +04:00
|
|
|
#define AHCI_PORT_TRACING 0
|
2009-09-10 23:07:40 +04:00
|
|
|
#define ATA_DMA_TRACING 0
|
2009-10-27 15:12:27 +03:00
|
|
|
#define ATA_TRACING 0
|
2008-09-01 23:44:27 +04:00
|
|
|
#define ATAPI_TRACING 0
|
2008-04-29 20:15:35 +04:00
|
|
|
#define BFS_TRACING 0
|
2008-07-20 16:37:56 +04:00
|
|
|
#define BLOCK_CACHE_BLOCK_TRACING 0
|
2008-04-27 18:24:18 +04:00
|
|
|
#define BLOCK_CACHE_TRANSACTION_TRACING 0
|
2008-04-29 20:15:35 +04:00
|
|
|
#define BMESSAGE_TRACING 0
|
2010-04-15 01:38:08 +04:00
|
|
|
#define FILE_DESCRIPTOR_TRACING 0
|
|
|
|
#define FILE_DESCRIPTOR_TRACING_STACK_TRACE 0 /* stack trace depth */
|
2011-12-03 23:03:20 +04:00
|
|
|
#define GUARDED_HEAP_TRACING 0
|
|
|
|
#define GUARDED_HEAP_TRACING_STACK_TRACE 0 /* stack trace depth */
|
2010-04-15 01:38:08 +04:00
|
|
|
#define IO_CONTEXT_TRACING 0
|
|
|
|
#define IO_CONTEXT_TRACING_STACK_TRACE 0 /* stack trace depth */
|
2008-04-27 18:24:18 +04:00
|
|
|
#define KERNEL_HEAP_TRACING 0
|
2008-05-17 22:59:19 +04:00
|
|
|
#define KTRACE_PRINTF_STACK_TRACE 0 /* stack trace depth */
|
* The alphabet is obviously hard, moved some tracing defines at their
(hopefully) correct place.
* It seems to be even harder to understand basic locking primitives: when you
think about it, it shouldn't surprise you that conditional variables never
return B_WOULD_BLOCK. This fixes gdb again.
* Added tracing support to the ports subsystem.
* get_port_message() will now resize the port heap if needed (but will also
take timeouts into account while doing so, more or less). The initial port
space is 4MB (as before), the growth rate is the same, and the system wide
limit is arbitrarily set to 64 MB (all swappable). A team limit has been set
to 8 MB, but is not enforced yet. Since ports are using up address space in
the kernel, those seems to be proper limits.
* This also fixes a strange, and rare lockup where the mouse cursor would still
move, but everything else would basically hang, but look perfectly normal from
KDL on the first look. As recently happened on Brecht's laptop, and debugged
by mmlr and me: the cbuf space got used up when lots of windows wanted to
redraw after a workspace switch. The app_server wouldn't answer anymore to
client requests, but thought it would have done so, as LinkSender::Flush()
doesn't care if it got a B_NO_MEMORY (the ports will now block until memory
is available if possible, so that should not be a problem anymore).
* Improved "port" KDL command, it now also prints the messages in the port.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33735 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-23 03:14:10 +04:00
|
|
|
#define NET_BUFFER_TRACING 0
|
|
|
|
#define NET_BUFFER_TRACING_STACK_TRACE 0 /* stack trace depth */
|
2008-04-27 18:24:18 +04:00
|
|
|
#define PAGE_ALLOCATION_TRACING 0
|
2011-11-04 21:58:50 +04:00
|
|
|
#define PAGE_ALLOCATION_TRACING_STACK_TRACE 0 /* stack trace depth */
|
2008-10-11 19:17:12 +04:00
|
|
|
#define PAGE_DAEMON_TRACING 0
|
2010-02-20 18:57:44 +03:00
|
|
|
#define PAGE_STATE_TRACING 0
|
|
|
|
#define PAGE_STATE_TRACING_STACK_TRACE 0 /* stack trace depth */
|
2008-10-11 19:17:12 +04:00
|
|
|
#define PAGE_WRITER_TRACING 0
|
2008-04-27 18:24:18 +04:00
|
|
|
#define PARANOIA_TRACING 0
|
2008-04-30 00:47:15 +04:00
|
|
|
#define PARANOIA_TRACING_STACK_TRACE 0 /* stack trace depth */
|
* The alphabet is obviously hard, moved some tracing defines at their
(hopefully) correct place.
* It seems to be even harder to understand basic locking primitives: when you
think about it, it shouldn't surprise you that conditional variables never
return B_WOULD_BLOCK. This fixes gdb again.
* Added tracing support to the ports subsystem.
* get_port_message() will now resize the port heap if needed (but will also
take timeouts into account while doing so, more or less). The initial port
space is 4MB (as before), the growth rate is the same, and the system wide
limit is arbitrarily set to 64 MB (all swappable). A team limit has been set
to 8 MB, but is not enforced yet. Since ports are using up address space in
the kernel, those seems to be proper limits.
* This also fixes a strange, and rare lockup where the mouse cursor would still
move, but everything else would basically hang, but look perfectly normal from
KDL on the first look. As recently happened on Brecht's laptop, and debugged
by mmlr and me: the cbuf space got used up when lots of windows wanted to
redraw after a workspace switch. The app_server wouldn't answer anymore to
client requests, but thought it would have done so, as LinkSender::Flush()
doesn't care if it got a B_NO_MEMORY (the ports will now block until memory
is available if possible, so that should not be a problem anymore).
* Improved "port" KDL command, it now also prints the messages in the port.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33735 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-10-23 03:14:10 +04:00
|
|
|
#define PORT_TRACING 0
|
2008-04-27 18:24:18 +04:00
|
|
|
#define RUNTIME_LOADER_TRACING 0
|
2008-08-11 14:20:16 +04:00
|
|
|
#define SCHEDULER_TRACING 0
|
2008-09-03 19:11:41 +04:00
|
|
|
#define SCHEDULING_ANALYSIS_TRACING 0
|
2008-04-27 18:24:18 +04:00
|
|
|
#define SIGNAL_TRACING 0
|
MemoryManager:
* Added support to do larger raw allocations (up to one large chunk (128 pages))
in the slab areas. For an even larger allocation an area is created (haven't
seen that happen yet, though).
* Added kernel tracing (SLAB_MEMORY_MANAGER_TRACING).
* _FreeArea(): Copy and paste bug: The meta chunks of the to be freed area
would be added to the free lists instead of being removed from them. This
would corrupt the lists and also lead to all kinds of misuse of meta chunks.
object caches:
* Implemented CACHE_ALIGN_ON_SIZE. It is no longer set for all small object
caches, but the block allocator sets it on all power of two size caches.
* object_cache_reserve_internal(): Detect recursion and don't wait in such a
case. The function could deadlock itself, since
HashedObjectCache::CreateSlab() does allocate memory, thus potentially
reentering.
* object_cache_low_memory():
- I missed some returns when reworking that one in r35254, so the function
might stop early and also leave the cache in maintenance mode, which would
cause it to be ignored by object cache resizer and low memory handler from
that point on.
- Since ReturnSlab() potentially unlocks, the conditions weren't quite correct
and too many slabs could be freed.
- Simplified things a bit.
* object_cache_alloc(): Since object_cache_reserve_internal() does potentially
unlock the cache, the situation might have changed and their might not be an
empty slab available, but a partial one. The function would crash.
* Renamed the object cache tracing variable to SLAB_OBJECT_CACHE_TRACING.
* Renamed debugger command "cache_info" to "slab_cache" to avoid confusion with
the VMCache commands.
* ObjectCache::usage was not maintained anymore since I introduced the
MemoryManager. object_cache_get_usage() would thus always return 0 and the
block cache would not be considered cached memory. This was only of
informational relevance, though.
slab allocator misc.:
* Disable the object depots of block allocator caches for object sizes > 2 KB.
Allocations of those sizes aren't so common that the object depots yield any
benefit.
* The slab allocator is now fully self-sufficient. It allocates its bootstrap
memory from the MemoryManager, and the hash tables for HashedObjectCaches use
the block allocator instead of the heap, now.
* Added option to use the slab allocator for malloc() and friends
(USE_SLAB_ALLOCATOR_FOR_MALLOC). Currently disabled. Works in principle and
has virtually no lock contention. Handling for low memory situations is yet
missing, though.
* Improved the output of some debugger commands.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35283 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-25 16:46:58 +03:00
|
|
|
#define SLAB_MEMORY_MANAGER_TRACING 0
|
2011-11-01 22:34:21 +04:00
|
|
|
#define SLAB_MEMORY_MANAGER_TRACING_STACK_TRACE 0 /* stack trace depth */
|
MemoryManager:
* Added support to do larger raw allocations (up to one large chunk (128 pages))
in the slab areas. For an even larger allocation an area is created (haven't
seen that happen yet, though).
* Added kernel tracing (SLAB_MEMORY_MANAGER_TRACING).
* _FreeArea(): Copy and paste bug: The meta chunks of the to be freed area
would be added to the free lists instead of being removed from them. This
would corrupt the lists and also lead to all kinds of misuse of meta chunks.
object caches:
* Implemented CACHE_ALIGN_ON_SIZE. It is no longer set for all small object
caches, but the block allocator sets it on all power of two size caches.
* object_cache_reserve_internal(): Detect recursion and don't wait in such a
case. The function could deadlock itself, since
HashedObjectCache::CreateSlab() does allocate memory, thus potentially
reentering.
* object_cache_low_memory():
- I missed some returns when reworking that one in r35254, so the function
might stop early and also leave the cache in maintenance mode, which would
cause it to be ignored by object cache resizer and low memory handler from
that point on.
- Since ReturnSlab() potentially unlocks, the conditions weren't quite correct
and too many slabs could be freed.
- Simplified things a bit.
* object_cache_alloc(): Since object_cache_reserve_internal() does potentially
unlock the cache, the situation might have changed and their might not be an
empty slab available, but a partial one. The function would crash.
* Renamed the object cache tracing variable to SLAB_OBJECT_CACHE_TRACING.
* Renamed debugger command "cache_info" to "slab_cache" to avoid confusion with
the VMCache commands.
* ObjectCache::usage was not maintained anymore since I introduced the
MemoryManager. object_cache_get_usage() would thus always return 0 and the
block cache would not be considered cached memory. This was only of
informational relevance, though.
slab allocator misc.:
* Disable the object depots of block allocator caches for object sizes > 2 KB.
Allocations of those sizes aren't so common that the object depots yield any
benefit.
* The slab allocator is now fully self-sufficient. It allocates its bootstrap
memory from the MemoryManager, and the hash tables for HashedObjectCaches use
the block allocator instead of the heap, now.
* Added option to use the slab allocator for malloc() and friends
(USE_SLAB_ALLOCATOR_FOR_MALLOC). Currently disabled. Works in principle and
has virtually no lock contention. Handling for low memory situations is yet
missing, though.
* Improved the output of some debugger commands.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35283 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-25 16:46:58 +03:00
|
|
|
#define SLAB_OBJECT_CACHE_TRACING 0
|
2011-11-01 01:58:00 +04:00
|
|
|
#define SLAB_OBJECT_CACHE_TRACING_STACK_TRACE 0 /* stack trace depth */
|
2008-08-23 18:54:28 +04:00
|
|
|
#define SWAP_TRACING 0
|
2008-04-27 18:24:18 +04:00
|
|
|
#define SYSCALL_TRACING 0
|
|
|
|
#define SYSCALL_TRACING_IGNORE_KTRACE_OUTPUT 1
|
2008-04-29 11:35:00 +04:00
|
|
|
#define TCP_TRACING 0
|
2008-04-27 18:24:18 +04:00
|
|
|
#define TEAM_TRACING 0
|
|
|
|
#define USER_MALLOC_TRACING 0
|
2008-08-03 05:48:10 +04:00
|
|
|
#define VFS_PAGES_IO_TRACING 0
|
2008-05-30 02:09:51 +04:00
|
|
|
#define VM_CACHE_TRACING 0
|
2010-02-20 18:57:44 +03:00
|
|
|
#define VM_CACHE_TRACING_STACK_TRACE 0 /* stack trace depth */
|
2008-10-23 20:15:07 +04:00
|
|
|
#define VM_PAGE_FAULT_TRACING 0
|
2008-04-30 20:14:42 +04:00
|
|
|
#define WAIT_FOR_OBJECTS_TRACING 0
|
2008-04-27 18:24:18 +04:00
|
|
|
|
2008-04-30 12:03:53 +04:00
|
|
|
#endif // ENABLE_TRACING
|
|
|
|
|
2008-01-19 20:24:34 +03:00
|
|
|
#endif // KERNEL_TRACING_CONFIG_H
|