summaryrefslogtreecommitdiffstats
path: root/runtime/trace.cc
diff options
context:
space:
mode:
authorSebastien Hertz <shertz@google.com>2014-04-04 17:50:18 +0200
committerSebastien Hertz <shertz@google.com>2014-04-15 08:39:18 +0200
commit3f52eafe5577b8489f90dc8ed5981b3455206147 (patch)
tree7155df948d345c8a5a2d801c23b396af76527ba0 /runtime/trace.cc
parent9b417e4f0f87da6bfe8dc5f02c987acfcb6dca31 (diff)
downloadart-3f52eafe5577b8489f90dc8ed5981b3455206147.tar.gz
art-3f52eafe5577b8489f90dc8ed5981b3455206147.tar.bz2
art-3f52eafe5577b8489f90dc8ed5981b3455206147.zip
Prepare field watchpoint support
Adds field read/write events in the instrumentation. The debugger now registers as a listener for these events so JDWP field access and field modification events can be reported. This CL will be followed by another one to report these events from the interpreter. Therefore no JDWP field access and field modification events can be sent for now. Bug: 8267708 Change-Id: If2a93eb590805567d69015c83cce9cd2ab712cbd
Diffstat (limited to 'runtime/trace.cc')
-rw-r--r--runtime/trace.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/runtime/trace.cc b/runtime/trace.cc
index 1f2447871a..b85eb7e6b6 100644
--- a/runtime/trace.cc
+++ b/runtime/trace.cc
@@ -549,6 +549,21 @@ void Trace::DexPcMoved(Thread* thread, mirror::Object* this_object,
LOG(ERROR) << "Unexpected dex PC event in tracing " << PrettyMethod(method) << " " << new_dex_pc;
};
+void Trace::FieldRead(Thread* /*thread*/, mirror::Object* this_object,
+ mirror::ArtMethod* method, uint32_t dex_pc, mirror::ArtField* field)
+ SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
+ // We're not recorded to listen to this kind of event, so complain.
+ LOG(ERROR) << "Unexpected field read event in tracing " << PrettyMethod(method) << " " << dex_pc;
+}
+
+void Trace::FieldWritten(Thread* /*thread*/, mirror::Object* this_object,
+ mirror::ArtMethod* method, uint32_t dex_pc, mirror::ArtField* field,
+ const JValue& field_value)
+ SHARED_LOCKS_REQUIRED(Locks::mutator_lock_) {
+ // We're not recorded to listen to this kind of event, so complain.
+ LOG(ERROR) << "Unexpected field write event in tracing " << PrettyMethod(method) << " " << dex_pc;
+}
+
void Trace::MethodEntered(Thread* thread, mirror::Object* this_object,
mirror::ArtMethod* method, uint32_t dex_pc) {
uint32_t thread_clock_diff = 0;