TRACEME() helper for oprofile
authorBarret Rhoden <brho@cs.berkeley.edu>
Fri, 23 May 2014 00:18:31 +0000 (17:18 -0700)
committerBarret Rhoden <brho@cs.berkeley.edu>
Fri, 23 May 2014 00:18:31 +0000 (17:18 -0700)
kern/include/kdebug.h

index d8191c6..51af8f2 100644 (file)
@@ -31,4 +31,9 @@ void __print_func_exit(const char *func, const char *file);
 #define print_func_exit() __print_func_exit(__FUNCTION__, __FILE__)
 void hexdump(void *v, int length);
 void pahexdump(uintptr_t pa, int length);
 #define print_func_exit() __print_func_exit(__FUNCTION__, __FILE__)
 void hexdump(void *v, int length);
 void pahexdump(uintptr_t pa, int length);
+
+/* circular shit... */
+void oprofile_add_trace(unsigned long pc);
+#define TRACEME() oprofile_add_trace(read_pc())
+
 #endif /* ROS_KERN_KDEBUG_H */
 #endif /* ROS_KERN_KDEBUG_H */