Index: kernel/generic/include/adt/avl.h
===================================================================
--- kernel/generic/include/adt/avl.h	(revision da52547b3a8fc0b23125d3adbd5622075264ee53)
+++ kernel/generic/include/adt/avl.h	(revision 7a0359b903311f67678b4a0a3ebbcf0daf6eab38)
@@ -34,7 +34,8 @@
 
 #ifndef KERN_AVLTREE_H_
-#define KERN_AVLTREE_H_ 
+#define KERN_AVLTREE_H_
 
 #include <typedefs.h>
+#include <trace.h>
 
 /**
@@ -110,5 +111,5 @@
  * @param t AVL tree.
  */
-static inline void avltree_create(avltree_t *t)
+NO_TRACE static inline void avltree_create(avltree_t *t)
 {
 	t->root = NULL;
@@ -120,5 +121,5 @@
  * @param node Node which is initialized.
  */
-static inline void avltree_node_initialize(avltree_node_t *node)
+NO_TRACE static inline void avltree_node_initialize(avltree_node_t *node)
 {
 	node->key = 0;
Index: kernel/generic/include/adt/list.h
===================================================================
--- kernel/generic/include/adt/list.h	(revision da52547b3a8fc0b23125d3adbd5622075264ee53)
+++ kernel/generic/include/adt/list.h	(revision 7a0359b903311f67678b4a0a3ebbcf0daf6eab38)
@@ -37,4 +37,5 @@
 
 #include <typedefs.h>
+#include <trace.h>
 
 /** Doubly linked list head and link type. */
@@ -57,5 +58,5 @@
  * @param link Pointer to link_t structure to be initialized.
  */
-static inline void link_initialize(link_t *link)
+NO_TRACE static inline void link_initialize(link_t *link)
 {
 	link->prev = NULL;
@@ -69,5 +70,5 @@
  * @param head Pointer to link_t structure representing head of the list.
  */
-static inline void list_initialize(link_t *head)
+NO_TRACE static inline void list_initialize(link_t *head)
 {
 	head->prev = head;
@@ -82,5 +83,5 @@
  * @param head Pointer to link_t structure representing head of the list.
  */
-static inline void list_prepend(link_t *link, link_t *head)
+NO_TRACE static inline void list_prepend(link_t *link, link_t *head)
 {
 	link->next = head->next;
@@ -97,5 +98,5 @@
  * @param head Pointer to link_t structure representing head of the list.
  */
-static inline void list_append(link_t *link, link_t *head)
+NO_TRACE static inline void list_append(link_t *link, link_t *head)
 {
 	link->prev = head->prev;
@@ -112,5 +113,5 @@
  * 		contained in.
  */
-static inline void list_remove(link_t *link)
+NO_TRACE static inline void list_remove(link_t *link)
 {
 	link->next->prev = link->prev;
@@ -125,5 +126,5 @@
  * @param head Pointer to link_t structure representing head of the list.
  */
-static inline bool list_empty(link_t *head)
+NO_TRACE static inline bool list_empty(link_t *head)
 {
 	return head->next == head ? true : false;
@@ -143,5 +144,5 @@
  *		headless) list. 
  */
-static inline void headless_list_split_or_concat(link_t *part1, link_t *part2)
+NO_TRACE static inline void headless_list_split_or_concat(link_t *part1, link_t *part2)
 {
 	link_t *hlp;
@@ -164,5 +165,5 @@
  *		headless list. 
  */
-static inline void headless_list_split(link_t *part1, link_t *part2)
+NO_TRACE static inline void headless_list_split(link_t *part1, link_t *part2)
 {
 	headless_list_split_or_concat(part1, part2);
@@ -176,5 +177,5 @@
  * @param part2 Pointer to link_t structure leading the second headless list.
  */
-static inline void headless_list_concat(link_t *part1, link_t *part2)
+NO_TRACE static inline void headless_list_concat(link_t *part1, link_t *part2)
 {
 	headless_list_split_or_concat(part1, part2);
Index: kernel/generic/include/atomic.h
===================================================================
--- kernel/generic/include/atomic.h	(revision da52547b3a8fc0b23125d3adbd5622075264ee53)
+++ kernel/generic/include/atomic.h	(revision 7a0359b903311f67678b4a0a3ebbcf0daf6eab38)
@@ -40,5 +40,5 @@
 #include <verify.h>
 
-ATOMIC static inline void atomic_set(atomic_t *val, atomic_count_t i)
+NO_TRACE ATOMIC static inline void atomic_set(atomic_t *val, atomic_count_t i)
     WRITES(&val->count)
     REQUIRES_EXTENT_MUTABLE(val)
@@ -47,5 +47,5 @@
 }
 
-ATOMIC static inline atomic_count_t atomic_get(atomic_t *val)
+NO_TRACE ATOMIC static inline atomic_count_t atomic_get(atomic_t *val)
     REQUIRES_EXTENT_MUTABLE(val)
 {
Index: kernel/generic/include/bitops.h
===================================================================
--- kernel/generic/include/bitops.h	(revision da52547b3a8fc0b23125d3adbd5622075264ee53)
+++ kernel/generic/include/bitops.h	(revision 7a0359b903311f67678b4a0a3ebbcf0daf6eab38)
@@ -36,4 +36,6 @@
 #define KERN_BITOPS_H_
 
+#include <trace.h>
+
 #ifdef __32_BITS__
 	#define fnzb(arg)  fnzb32(arg)
@@ -49,5 +51,5 @@
  *
  */
-static inline uint8_t fnzb32(uint32_t arg)
+NO_TRACE static inline uint8_t fnzb32(uint32_t arg)
 {
 	uint8_t n = 0;
@@ -84,5 +86,5 @@
  *
  */
-static inline uint8_t fnzb64(uint64_t arg)
+NO_TRACE static inline uint8_t fnzb64(uint64_t arg)
 {
 	uint8_t n = 0;
Index: kernel/generic/include/context.h
===================================================================
--- kernel/generic/include/context.h	(revision da52547b3a8fc0b23125d3adbd5622075264ee53)
+++ kernel/generic/include/context.h	(revision 7a0359b903311f67678b4a0a3ebbcf0daf6eab38)
@@ -37,4 +37,5 @@
 
 #include <typedefs.h>
+#include <trace.h>
 #include <arch/context.h>
 
@@ -89,6 +90,5 @@
  *
  */
-static inline void __attribute__((no_instrument_function))
-    context_restore(context_t *ctx)
+NO_TRACE static inline void context_restore(context_t *ctx)
 {
 	context_restore_arch(ctx);
Index: kernel/generic/include/macros.h
===================================================================
--- kernel/generic/include/macros.h	(revision da52547b3a8fc0b23125d3adbd5622075264ee53)
+++ kernel/generic/include/macros.h	(revision 7a0359b903311f67678b4a0a3ebbcf0daf6eab38)
@@ -39,4 +39,5 @@
 
 #include <typedefs.h>
+#include <trace.h>
 
 /** Return true if the intervals overlap.
@@ -47,6 +48,6 @@
  * @param sz2 Size of the second interval.
  */
-static inline int __attribute__((no_instrument_function))
-    overlaps(uintptr_t s1, size_t sz1, uintptr_t s2, size_t sz2)
+NO_TRACE static inline int overlaps(uintptr_t s1, size_t sz1, uintptr_t s2,
+    size_t sz2)
 {
 	uintptr_t e1 = s1 + sz1;
Index: kernel/generic/include/main/main.h
===================================================================
--- kernel/generic/include/main/main.h	(revision da52547b3a8fc0b23125d3adbd5622075264ee53)
+++ kernel/generic/include/main/main.h	(revision 7a0359b903311f67678b4a0a3ebbcf0daf6eab38)
@@ -32,5 +32,5 @@
 /** @file
  */
- 
+
 #ifndef KERN_MAIN_H_
 #define KERN_MAIN_H_
Index: kernel/generic/include/main/version.h
===================================================================
--- kernel/generic/include/main/version.h	(revision da52547b3a8fc0b23125d3adbd5622075264ee53)
+++ kernel/generic/include/main/version.h	(revision 7a0359b903311f67678b4a0a3ebbcf0daf6eab38)
@@ -42,3 +42,2 @@
 /** @}
  */
-
Index: kernel/generic/include/mm/frame.h
===================================================================
--- kernel/generic/include/mm/frame.h	(revision da52547b3a8fc0b23125d3adbd5622075264ee53)
+++ kernel/generic/include/mm/frame.h	(revision 7a0359b903311f67678b4a0a3ebbcf0daf6eab38)
@@ -38,4 +38,5 @@
 
 #include <typedefs.h>
+#include <trace.h>
 #include <adt/list.h>
 #include <mm/buddy.h>
@@ -115,15 +116,15 @@
 extern zones_t zones;
 
-static inline uintptr_t PFN2ADDR(pfn_t frame)
+NO_TRACE static inline uintptr_t PFN2ADDR(pfn_t frame)
 {
 	return (uintptr_t) (frame << FRAME_WIDTH);
 }
 
-static inline pfn_t ADDR2PFN(uintptr_t addr)
+NO_TRACE static inline pfn_t ADDR2PFN(uintptr_t addr)
 {
 	return (pfn_t) (addr >> FRAME_WIDTH);
 }
 
-static inline size_t SIZE2FRAMES(size_t size)
+NO_TRACE static inline size_t SIZE2FRAMES(size_t size)
 {
 	if (!size)
@@ -132,10 +133,10 @@
 }
 
-static inline size_t FRAMES2SIZE(size_t frames)
+NO_TRACE static inline size_t FRAMES2SIZE(size_t frames)
 {
 	return (size_t) (frames << FRAME_WIDTH);
 }
 
-static inline bool zone_flags_available(zone_flags_t flags)
+NO_TRACE static inline bool zone_flags_available(zone_flags_t flags)
 {
 	return ((flags & (ZONE_RESERVED | ZONE_FIRMWARE)) == 0);
Index: kernel/generic/include/security/cap.h
===================================================================
--- kernel/generic/include/security/cap.h	(revision da52547b3a8fc0b23125d3adbd5622075264ee53)
+++ kernel/generic/include/security/cap.h	(revision 7a0359b903311f67678b4a0a3ebbcf0daf6eab38)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup generic 
+/** @addtogroup generic
  * @{
  */
@@ -35,5 +35,5 @@
 /**
  * @file
- * @brief	Capabilities definitions.
+ * @brief Capabilities definitions.
  *
  * Capabilities represent virtual rights that entitle their
Index: kernel/generic/include/smp/smp.h
===================================================================
--- kernel/generic/include/smp/smp.h	(revision da52547b3a8fc0b23125d3adbd5622075264ee53)
+++ kernel/generic/include/smp/smp.h	(revision 7a0359b903311f67678b4a0a3ebbcf0daf6eab38)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup generic	
+/** @addtogroup generic
  * @{
  */
@@ -41,8 +41,12 @@
 
 #ifdef CONFIG_SMP
+
 extern void smp_init(void);
 extern void kmp(void *arg);
-#else
+
+#else /* CONFIG_SMP */
+
 #define smp_init()
+
 #endif /* CONFIG_SMP */
 
Index: kernel/generic/include/synch/spinlock.h
===================================================================
--- kernel/generic/include/synch/spinlock.h	(revision da52547b3a8fc0b23125d3adbd5622075264ee53)
+++ kernel/generic/include/synch/spinlock.h	(revision 7a0359b903311f67678b4a0a3ebbcf0daf6eab38)
@@ -124,5 +124,5 @@
  *
  */
-static inline void spinlock_unlock_nondebug(spinlock_t *lock)
+NO_TRACE static inline void spinlock_unlock_nondebug(spinlock_t *lock)
 {
 	/*
Index: kernel/generic/include/syscall/sysarg64.h
===================================================================
--- kernel/generic/include/syscall/sysarg64.h	(revision da52547b3a8fc0b23125d3adbd5622075264ee53)
+++ kernel/generic/include/syscall/sysarg64.h	(revision 7a0359b903311f67678b4a0a3ebbcf0daf6eab38)
@@ -33,5 +33,5 @@
 /**
  * @file
- * @brief	Wrapper for explicit 64-bit arguments passed to syscalls.
+ * @brief Wrapper for explicit 64-bit arguments passed to syscalls.
  */
 
Index: kernel/generic/include/trace.h
===================================================================
--- kernel/generic/include/trace.h	(revision 7a0359b903311f67678b4a0a3ebbcf0daf6eab38)
+++ kernel/generic/include/trace.h	(revision 7a0359b903311f67678b4a0a3ebbcf0daf6eab38)
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2010 Martin Decky
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup genericdebug
+ * @{
+ */
+/** @file
+ */
+
+#ifndef KERN_TRACE_H_
+#define KERN_TRACE_H_
+
+#define NO_TRACE  __attribute__((no_instrument_function))
+
+#endif
+
+/** @}
+ */
Index: kernel/generic/include/udebug/udebug_ipc.h
===================================================================
--- kernel/generic/include/udebug/udebug_ipc.h	(revision da52547b3a8fc0b23125d3adbd5622075264ee53)
+++ kernel/generic/include/udebug/udebug_ipc.h	(revision 7a0359b903311f67678b4a0a3ebbcf0daf6eab38)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup generic	
+/** @addtogroup generic
  * @{
  */
@@ -41,5 +41,4 @@
 void udebug_call_receive(call_t *call);
 
-
 #endif
 
Index: kernel/generic/include/udebug/udebug_ops.h
===================================================================
--- kernel/generic/include/udebug/udebug_ops.h	(revision da52547b3a8fc0b23125d3adbd5622075264ee53)
+++ kernel/generic/include/udebug/udebug_ops.h	(revision 7a0359b903311f67678b4a0a3ebbcf0daf6eab38)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup generic	
+/** @addtogroup generic
  * @{
  */
