diff options
author | Vladimir Chtchetkine <vchtchetkine@google.com> | 2010-02-16 10:38:35 -0800 |
---|---|---|
committer | Vladimir Chtchetkine <vchtchetkine@google.com> | 2010-02-18 15:22:07 -0800 |
commit | 5389aa19033153c09556d1362a8b8a56abccb8f5 (patch) | |
tree | 5d731effe5bd5d2f162f06aadec7212045eaef3d /hw/android_arm.c | |
parent | 76dbca0489ab98a46f2954bc7b77c3df6f9d8264 (diff) | |
download | external_qemu-5389aa19033153c09556d1362a8b8a56abccb8f5.zip external_qemu-5389aa19033153c09556d1362a8b8a56abccb8f5.tar.gz external_qemu-5389aa19033153c09556d1362a8b8a56abccb8f5.tar.bz2 |
Merge memory checking from sandbox
Change-id: Ibce845d0
Diffstat (limited to 'hw/android_arm.c')
-rw-r--r-- | hw/android_arm.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/hw/android_arm.c b/hw/android_arm.c index 4ef4a10..d656b81 100644 --- a/hw/android_arm.c +++ b/hw/android_arm.c @@ -20,6 +20,9 @@ #include "audio/audio.h" #include "arm-misc.h" #include "console.h" +#ifdef CONFIG_MEMCHECK +#include "memcheck/memcheck_api.h" +#endif // CONFIG_MEMCHECK #define ARM_CPU_SAVE_VERSION 1 @@ -63,7 +66,7 @@ uint32_t switch_test_write(void *opaque, uint32_t state) #endif static void android_arm_init_(ram_addr_t ram_size, const char *boot_device, - const char *kernel_filename, + const char *kernel_filename, const char *kernel_cmdline, const char *initrd_filename, const char *cpu_model) @@ -142,9 +145,19 @@ static void android_arm_init_(ram_addr_t ram_size, #endif #ifdef CONFIG_TRACE extern const char *trace_filename; - if (trace_filename != NULL) { + /* Init trace device if either tracing, or memory checking is enabled. */ + if (trace_filename != NULL +#ifdef CONFIG_MEMCHECK + || memcheck_enabled +#endif // CONFIG_MEMCHECK + ) { trace_dev_init(); } + if (trace_filename != NULL) { + dprint( "Trace file name is set to %s\n", trace_filename ); + } else { + dprint("Trace file name is not set\n"); + } #endif #if TEST_SWITCH |