summaryrefslogtreecommitdiffstats
path: root/vm/Thread.h
diff options
context:
space:
mode:
authorBen Cheng <bccheng@android.com>2010-01-22 16:45:45 -0800
committerBen Cheng <bccheng@android.com>2010-01-25 11:09:41 -0800
commit7a0bcd0de6c4da6499a088a18d1750e51204c2a6 (patch)
tree26dfee02af8caf96d04b3330c9d74de4afa109a2 /vm/Thread.h
parentcf3f76f09ce88e5b8cf86578100fc83352b3d315 (diff)
downloadandroid_dalvik-7a0bcd0de6c4da6499a088a18d1750e51204c2a6.tar.gz
android_dalvik-7a0bcd0de6c4da6499a088a18d1750e51204c2a6.tar.bz2
android_dalvik-7a0bcd0de6c4da6499a088a18d1750e51204c2a6.zip
Tighten the safe points for code cache resets to happen.
Add a new flag in the Thread struct to track the whereabout of the top frame in each Java thread. It is not safe to blow away the code cache if any thread is in the JIT'ed land.
Diffstat (limited to 'vm/Thread.h')
-rw-r--r--vm/Thread.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/vm/Thread.h b/vm/Thread.h
index a6ad8320e..5e0ad4da0 100644
--- a/vm/Thread.h
+++ b/vm/Thread.h
@@ -157,6 +157,16 @@ typedef struct Thread {
/* internal reference tracking */
ReferenceTable internalLocalRefTable;
+#if defined(WITH_JIT)
+ /*
+ * Whether the current top VM frame is in the interpreter or JIT cache:
+ * NULL : in the interpreter
+ * non-NULL: entry address of the JIT'ed code (the actual value doesn't
+ * matter)
+ */
+ void* inJitCodeCache;
+#endif
+
/* JNI local reference tracking */
#ifdef USE_INDIRECT_REF
IndirectRefTable jniLocalRefTable;
@@ -426,6 +436,11 @@ void dvmThreadSleep(u8 msec, u4 nsec);
char* dvmGetThreadName(Thread* thread);
/*
+ * Convert ThreadStatus to a string.
+ */
+const char* dvmGetThreadStatusStr(ThreadStatus status);
+
+/*
* Return true if a thread is on the internal list. If it is, the
* thread is part of the GC's root set.
*/