Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(37)

Unified Diff: src/objects-debug.cc

Issue 1267953002: Reenable code recompilation verification. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/objects-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-debug.cc
diff --git a/src/objects-debug.cc b/src/objects-debug.cc
index 3a2ec3e559a16863db44acfcbce63a72cc9762aa..de7b06f670c6874ad5f1c95f0d22469b931c1ef7 100644
--- a/src/objects-debug.cc
+++ b/src/objects-debug.cc
@@ -4,6 +4,7 @@
#include "src/v8.h"
+#include "src/bootstrapper.h"
#include "src/disasm.h"
#include "src/disassembler.h"
#include "src/heap/objects-visiting.h"
@@ -1281,9 +1282,11 @@ void Code::VerifyEmbeddedObjects(VerifyMode mode) {
void Code::VerifyRecompiledCode(Code* old_code, Code* new_code) {
if (old_code->kind() != FUNCTION) return;
if (new_code->kind() != FUNCTION) return;
- static const int mask = RelocInfo::kCodeTargetMask;
-
Isolate* isolate = old_code->GetIsolate();
+ // Do not verify during bootstrapping. We may replace code using %SetCode.
+ if (isolate->bootstrapper()->IsActive()) return;
+
+ static const int mask = RelocInfo::kCodeTargetMask;
RelocIterator old_it(old_code, mask);
RelocIterator new_it(new_code, mask);
Code* stack_check = isolate->builtins()->builtin(Builtins::kStackCheck);
@@ -1316,7 +1319,10 @@ void Code::VerifyRecompiledCode(Code* old_code, Code* new_code) {
Code* new_target =
Code::GetCodeFromTargetAddress(new_it.rinfo()->target_address());
CHECK_EQ(old_target->kind(), new_target->kind());
- if (!old_target->is_handler() && !old_target->is_inline_cache_stub()) {
+ // Check call target for equality unless it's an IC or an interrupt check.
+ // In both cases they may be patched to be something else.
+ if (!old_target->is_handler() && !old_target->is_inline_cache_stub() &&
+ new_target == isolate->builtins()->builtin(Builtins::kInterruptCheck)) {
CHECK_EQ(old_target, new_target);
}
old_it.next();
« no previous file with comments | « no previous file | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698