]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
sandbox: Support trace feature
authorSimon Glass <sjg@chromium.org>
Tue, 11 Jun 2013 18:14:44 +0000 (11:14 -0700)
committerTom Rini <trini@ti.com>
Wed, 26 Jun 2013 14:16:41 +0000 (10:16 -0400)
Support tracing on sandbox by adding suitable CONFIG options. To enable it,
compile U-Boot with FTRACE=1.

The timer functions are marked to skip tracing, since these are called from
the tracing code itself, and we want to avoid an infinite loop.

Signed-off-by: Simon Glass <sjg@chromium.org>
arch/sandbox/cpu/cpu.c
arch/sandbox/cpu/os.c
include/configs/sandbox.h

index dd8d495e3fc039fd3cea297b383f34103239de8a..e9385de2a6f63c9b045714d712487efe3f38cb90 100644 (file)
@@ -37,7 +37,7 @@ void __udelay(unsigned long usec)
        os_usleep(usec);
 }
 
-unsigned long timer_get_us(void)
+unsigned long __attribute__((no_instrument_function)) timer_get_us(void)
 {
        return os_get_nsec() / 1000;
 }
index d07540776cc6a8d32fb58a18e752c738c761a06d..541e450bf602d684f22c0876b531e5a6fc586be4 100644 (file)
@@ -152,7 +152,7 @@ void os_usleep(unsigned long usec)
        usleep(usec);
 }
 
-u64 os_get_nsec(void)
+u64 __attribute__((no_instrument_function)) os_get_nsec(void)
 {
 #if defined(CLOCK_MONOTONIC) && defined(_POSIX_MONOTONIC_CLOCK)
        struct timespec tp;
index 788207d0076f3ce2094bde7a8424e4e0872fe4a7..d7043298e3fb492b18094e90de368962bcf3a367 100644 (file)
 #ifndef __CONFIG_H
 #define __CONFIG_H
 
+#ifdef FTRACE
+#define CONFIG_TRACE
+#define CONFIG_CMD_TRACE
+#define CONFIG_TRACE_BUFFER_SIZE       (16 << 20)
+#define CONFIG_TRACE_EARLY_SIZE                (8 << 20)
+#define CONFIG_TRACE_EARLY
+#define CONFIG_TRACE_EARLY_ADDR                0x00100000
+
+#endif
+
+#define CONFIG_BOOTSTAGE
+#define CONFIG_BOOTSTAGE_REPORT
+
 /* Number of bits in a C 'long' on this architecture */
 #define CONFIG_SANDBOX_BITS_PER_LONG   64