Reviewers: Sven Panne,
Message:
PTAL
Description:
Flush instruction cache for deserialized code objects.
This fixes the flaky crashes on ARM when running preparser test suite in
optdebug mode.
[email protected]
Please review this at https://chromiumcodereview.appspot.com/107543003/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+12, -0 lines):
M src/serialize.h
M src/serialize.cc
Index: src/serialize.cc
diff --git a/src/serialize.cc b/src/serialize.cc
index
a8df23844103ff9c943aa50066eeee6beb77c65b..a0a66f9e9f1b952d11a358d8d1e2941f40dbd270
100644
--- a/src/serialize.cc
+++ b/src/serialize.cc
@@ -794,6 +794,15 @@ Deserializer::Deserializer(SnapshotByteSource* source)
}
+void Deserializer::FlushICacheForNewCodeObjects() {
+ PageIterator it(isolate_->heap()->code_space());
+ while (it.has_next()) {
+ Page* p = it.next();
+ CPU::FlushICache(p->area_start(), p->area_end() - p->area_start());
+ }
+}
+
+
void Deserializer::Deserialize(Isolate* isolate) {
isolate_ = isolate;
ASSERT(isolate_ != NULL);
@@ -830,6 +839,8 @@ void Deserializer::Deserialize(Isolate* isolate) {
}
}
+ FlushICacheForNewCodeObjects();
+
// Issue code events for newly deserialized code objects.
LOG_CODE_EVENT(isolate_, LogCodeObjects());
LOG_CODE_EVENT(isolate_, LogCompiledFunctions());
Index: src/serialize.h
diff --git a/src/serialize.h b/src/serialize.h
index
90f78bfd268af52bee3aa097071a087dffec8d5a..ee9df39ad861c57b80a27f9d0fbff07ea036c9df
100644
--- a/src/serialize.h
+++ b/src/serialize.h
@@ -377,6 +377,7 @@ class Deserializer: public SerializerDeserializer {
return HeapObject::FromAddress(high_water_[space] - offset);
}
+ void FlushICacheForNewCodeObjects();
// Cached current isolate.
Isolate* isolate_;
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.