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

Unified Diff: src/assembler.cc

Issue 1431933003: [assembler] Introduce proper AssemblerBase::Print() for improved debuggability. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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 | « src/assembler.h ('k') | src/disassembler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/assembler.cc
diff --git a/src/assembler.cc b/src/assembler.cc
index e9e75744b10e2b0493152da329c120a9b1165eda..8571f33176033797785d6dfc20abab9f88f7e57f 100644
--- a/src/assembler.cc
+++ b/src/assembler.cc
@@ -46,9 +46,11 @@
#include "src/counters.h"
#include "src/debug/debug.h"
#include "src/deoptimizer.h"
+#include "src/disassembler.h"
#include "src/execution.h"
#include "src/ic/ic.h"
#include "src/ic/stub-cache.h"
+#include "src/ostreams.h"
#include "src/profiler/cpu-profiler.h"
#include "src/regexp/jsregexp.h"
#include "src/regexp/regexp-macro-assembler.h"
@@ -215,6 +217,12 @@ void AssemblerBase::FlushICacheWithoutIsolate(void* start, size_t size) {
}
+void AssemblerBase::Print() {
+ OFStream os(stdout);
+ v8::internal::Disassembler::Decode(isolate(), &os, buffer_, pc_, nullptr);
+}
+
+
// -----------------------------------------------------------------------------
// Implementation of PredictableCodeSizeScope
« no previous file with comments | « src/assembler.h ('k') | src/disassembler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698