aboutsummaryrefslogtreecommitdiffstats
path: root/trace.c
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2009-02-10 15:43:59 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2009-02-10 15:43:59 -0800
commitc27f813900a3c114562efbb8df1065e94766fc48 (patch)
treed95919283707dcab61009e27007374a745c9541e /trace.c
parent0852ad57fa372f9b2854e4df685eaba8d8ef6790 (diff)
downloadexternal_qemu-c27f813900a3c114562efbb8df1065e94766fc48.zip
external_qemu-c27f813900a3c114562efbb8df1065e94766fc48.tar.gz
external_qemu-c27f813900a3c114562efbb8df1065e94766fc48.tar.bz2
auto import from //branches/cupcake/...@130745
Diffstat (limited to 'trace.c')
-rw-r--r--trace.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/trace.c b/trace.c
index 6cff83c..a96f87f 100644
--- a/trace.c
+++ b/trace.c
@@ -24,7 +24,6 @@
#include "exec-all.h"
#include "trace.h"
#include "varint.h"
-#include "android_utils.h"
TraceBB trace_bb;
TraceInsn trace_insn;
@@ -36,6 +35,11 @@ TracePid trace_pid;
TraceMethod trace_method;
static TraceHeader header;
+const char *trace_filename;
+int tracing;
+int trace_cache_miss;
+int trace_all_addr;
+
// The simulation time in cpu clock cycles
uint64_t sim_time = 1;
@@ -438,11 +442,11 @@ void trace_init(const char *filename)
}
/* the following array is used to deal with def-use register interlocks, which we
- * can compute statically, very fortunately.
+ * can compute statically (ignoring conditions), very fortunately.
*
* the idea is that interlock_base contains the number of cycles "executed" from
* the start of a basic block. It is set to 0 in trace_bb_start, and incremented
- * in each call to get_insn_ticks.
+ * in each call to get_insn_ticks_arm.
*
* interlocks[N] correspond to the value of interlock_base after which a register N
* can be used by another operation, it is set each time an instruction writes to
@@ -761,7 +765,7 @@ void trace_cleanup()
// not including any I-cache or D-cache misses. This function
// is called for each instruction in a basic block when that
// block is being translated.
-int get_insn_ticks(uint32_t insn)
+int get_insn_ticks_arm(uint32_t insn)
{
#if 1
int result = 1; /* by default, use 1 cycle */