aboutsummaryrefslogtreecommitdiffstats
path: root/emulator/qtools/tests/gtrace
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2009-03-03 18:28:16 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2009-03-03 18:28:16 -0800
commit82ea7a177797b844b252effea5c7c7c5d63ea4ac (patch)
tree4b825dc642cb6eb9a060e54bf8d69288fbee4904 /emulator/qtools/tests/gtrace
parentc9432be76d50a527da232d518f633add2f76242b (diff)
downloadsdk-82ea7a177797b844b252effea5c7c7c5d63ea4ac.zip
sdk-82ea7a177797b844b252effea5c7c7c5d63ea4ac.tar.gz
sdk-82ea7a177797b844b252effea5c7c7c5d63ea4ac.tar.bz2
auto import from //depot/cupcake/@135843
Diffstat (limited to 'emulator/qtools/tests/gtrace')
-rw-r--r--emulator/qtools/tests/gtrace/Makefile18
-rw-r--r--emulator/qtools/tests/gtrace/test.c201
2 files changed, 0 insertions, 219 deletions
diff --git a/emulator/qtools/tests/gtrace/Makefile b/emulator/qtools/tests/gtrace/Makefile
deleted file mode 100644
index 1d2050c..0000000
--- a/emulator/qtools/tests/gtrace/Makefile
+++ /dev/null
@@ -1,18 +0,0 @@
-include ../common_head.mk
-
-P4ROOT=/work/android
-QEMU=$(P4ROOT)/device/tools/qemu/arm-softmmu/qemu-system-arm
-QTOOLS=$(P4ROOT)/device/tools/qtools
-
-all: test.elf test.bin test.dis
-
-trace: test.elf test.bin
- $(QEMU) -QEMU -kernel test.bin -trace foo
- $(QTOOLS)/post_trace foo
- $(QTOOLS)/read_trace foo test.elf > t1
-
-gtrace: trace
- $(QTOOLS)/q2g -r $(P4ROOT)/device/out/linux-arm-release/symbols foo test.elf foo.gtrace
- gtracepost64 foo.gtrace > t2
-
-include ../common_tail.mk
diff --git a/emulator/qtools/tests/gtrace/test.c b/emulator/qtools/tests/gtrace/test.c
deleted file mode 100644
index e56a0f1..0000000
--- a/emulator/qtools/tests/gtrace/test.c
+++ /dev/null
@@ -1,201 +0,0 @@
-#include "../macros.h"
-
-int foo1();
-int foo2();
-void bar();
-int child1();
-int child2();
-int child3();
-int child4();
-int child5();
-
-int global;
-
-void start()
-{
- // Set the stack pointer
- asm(" mov r13,#0x200000");
- PRINT_STR("hello\n");
- TRACE_INIT_NAME(701, "proc_foo");
- TRACE_INIT_NAME(702, "proc_bar");
- TRACE_SWITCH(701);
- if (global++ > 0)
- global++;
- foo1();
- TRACE_SWITCH(702);
- if (global++ > 0)
- global++;
- bar();
- TRACE_SWITCH(701);
- if (global++ > 0)
- global++;
- foo2();
- TRACE_SWITCH(703);
- if (global++ > 0)
- global++;
- foo1();
- TRACE_SWITCH(701);
- if (global++ > 0)
- global++;
- foo1();
-
- TRACE_SWITCH(704);
- if (global++ > 0)
- global++;
- foo1();
-
- TRACE_SWITCH(701);
- if (global++ > 0)
- global++;
- foo1();
-
- TRACE_SWITCH(705);
- if (global++ > 0)
- global++;
- foo1();
-
- TRACE_SWITCH(701);
- if (global++ > 0)
- global++;
- foo1();
-
- TRACE_SWITCH(706);
- if (global++ > 0)
- global++;
- foo1();
-
- TRACE_SWITCH(701);
- if (global++ > 0)
- global++;
- foo1();
-
- TRACE_SWITCH(707);
- if (global++ > 0)
- global++;
- foo1();
-
- TRACE_SWITCH(701);
- if (global++ > 0)
- global++;
- foo1();
-
- TRACE_SWITCH(708);
- if (global++ > 0)
- global++;
- foo1();
-
- TRACE_SWITCH(701);
- if (global++ > 0)
- global++;
- foo1();
-
- TRACE_SWITCH(709);
- if (global++ > 0)
- global++;
- foo1();
-
- TRACE_SWITCH(701);
- if (global++ > 0)
- global++;
- foo1();
-
- TRACE_SWITCH(710);
- if (global++ > 0)
- global++;
- foo1();
-
- TRACE_STOP_EMU();
-}
-
-int foo1()
-{
- int a = 0;
-
- int ii;
- for (ii = 0; ii < 3; ++ii) {
- a += child1();
- a += child2();
- a += child3();
- }
- return a;
-}
-
-int foo2()
-{
- int a = 0;
-
- int ii;
- for (ii = 0; ii < 2; ++ii) {
- a += child3();
- a += child4();
- a += child5();
- }
- return a;
-}
-
-#define kStride 64
-void bar()
-{
- int a = 0;
-
- static char mem[1000 * kStride];
-
- int ii, jj;
-
- for (ii = 0; ii < 4; ++ii) {
- for (jj = 0; jj < 10; ++jj)
- a += mem[jj * kStride];
- foo1();
- foo2();
- }
-}
-
-int child1()
-{
- int a = 0;
-
- int ii;
- for (ii = 0; ii < 2; ++ii)
- a += ii;
- return a;
-}
-
-int child2()
-{
- int a = 0;
-
- int ii;
- for (ii = 0; ii < 4; ++ii)
- a += ii;
- return a;
-}
-
-int child3()
-{
- int a = 0;
-
- int ii;
- for (ii = 0; ii < 6; ++ii)
- a += ii;
- return a;
-}
-
-int child4()
-{
- int a = 0;
-
- int ii;
- for (ii = 0; ii < 8; ++ii)
- a += ii;
- return a;
-}
-
-int child5()
-{
- int a = 0;
-
- int ii;
- for (ii = 0; ii < 10; ++ii)
- a += ii;
- return a;
-}