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

Unified Diff: src/frames.cc

Issue 2629823003: [wasm] Implement frame inspection for interpreted frames (Closed)
Patch Set: Document that the forward declaration is only needed for VS Created 3 years, 11 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
Index: src/frames.cc
diff --git a/src/frames.cc b/src/frames.cc
index 45d26a161abe8b9f53a52af976f830b2cc7a2d95..a7b5c3ef839b713a0d0065826dceda4b3cc29288 100644
--- a/src/frames.cc
+++ b/src/frames.cc
@@ -1752,7 +1752,7 @@ void WasmInterpreterEntryFrame::Iterate(ObjectVisitor* v) const {
void WasmInterpreterEntryFrame::Print(StringStream* accumulator, PrintMode mode,
int index) const {
PrintIndex(accumulator, mode, index);
- accumulator->Add("WASM TO INTERPRETER [");
+ accumulator->Add("WASM INTERPRETER ENTRY [");
Script* script = this->script();
accumulator->PrintName(script->name());
accumulator->Add("]");
@@ -1761,8 +1761,17 @@ void WasmInterpreterEntryFrame::Print(StringStream* accumulator, PrintMode mode,
void WasmInterpreterEntryFrame::Summarize(List<FrameSummary>* functions,
FrameSummary::Mode mode) const {
- // TODO(clemensh): Implement this.
- UNIMPLEMENTED();
+ Handle<WasmInstanceObject> instance(wasm_instance(), isolate());
+ Handle<WasmDebugInfo> debug_info =
+ WasmInstanceObject::GetOrCreateDebugInfo(instance);
+ std::vector<std::pair<uint32_t, int>> interpreted_stack =
+ WasmDebugInfo::GetInterpretedStack(debug_info, fp());
+
+ for (auto& e : interpreted_stack) {
+ FrameSummary::WasmInterpretedFrameSummary summary(isolate(), instance,
+ e.first, e.second);
+ functions->Add(summary);
+ }
}
Code* WasmInterpreterEntryFrame::unchecked_code() const {
« no previous file with comments | « src/debug/debug-frames.cc ('k') | src/wasm/wasm-debug.cc » ('j') | src/wasm/wasm-interpreter.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698