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

Unified Diff: src/frames.cc

Issue 2629823003: [wasm] Implement frame inspection for interpreted frames (Closed)
Patch Set: Rebase after Yangs revert ಠ益ಠ 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
« no previous file with comments | « src/debug/debug-frames.cc ('k') | src/runtime/runtime-wasm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/frames.cc
diff --git a/src/frames.cc b/src/frames.cc
index 5c561e6e7b4cb4d853336874a091933d05ed3253..c1ef5ee131707e75f759c5dc61fc70a23b8b316a 100644
--- a/src/frames.cc
+++ b/src/frames.cc
@@ -1763,7 +1763,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("]");
@@ -1772,8 +1772,15 @@ 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());
+ std::vector<std::pair<uint32_t, int>> interpreted_stack =
+ instance->debug_info()->GetInterpretedStack(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/runtime/runtime-wasm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698