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

Unified Diff: src/runtime/runtime-interpreter.cc

Issue 1844023003: [interpreter] Fix stale DCHECK in tracing. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix a memory leak and add test. Created 4 years, 9 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 | test/mjsunit/ignition/tracing.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime/runtime-interpreter.cc
diff --git a/src/runtime/runtime-interpreter.cc b/src/runtime/runtime-interpreter.cc
index 21b4016359fb4f1e52001e3dd21eb73a0de059c8..8971edeb62fc709106230dcc41589a575b60a391 100644
--- a/src/runtime/runtime-interpreter.cc
+++ b/src/runtime/runtime-interpreter.cc
@@ -35,7 +35,10 @@ void AdvanceToOffsetForTracing(
offset) {
bytecode_iterator.Advance();
}
- DCHECK_EQ(offset, bytecode_iterator.current_offset());
+ DCHECK(bytecode_iterator.current_offset() == offset ||
+ ((bytecode_iterator.current_offset() + 1) == offset &&
+ bytecode_iterator.current_operand_scale() >
+ interpreter::OperandScale::kSingle));
}
void PrintRegisters(std::ostream& os, bool is_input,
@@ -111,9 +114,8 @@ RUNTIME_FUNCTION(Runtime_InterpreterTraceBytecodeEntry) {
// Print bytecode.
const uint8_t* bytecode_address =
reinterpret_cast<const uint8_t*>(*bytecode_array) + bytecode_offset;
- Vector<char> buf = Vector<char>::New(50);
- SNPrintF(buf, "%p", bytecode_address);
- os << " -> " << buf.start() << " (" << bytecode_offset << ") : ";
+ os << " -> " << static_cast<const void*>(bytecode_address)
+ << " (" << bytecode_offset << ") : ";
interpreter::Bytecodes::Decode(os, bytecode_address,
bytecode_array->parameter_count());
os << std::endl;
« no previous file with comments | « no previous file | test/mjsunit/ignition/tracing.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698