Commit 9d8f4ded authored by Sigurd Schneider's avatar Sigurd Schneider Committed by Commit Bot

Revert "[wasm][debug] Report global scope also for compiled frames"

This reverts commit bc8ad334.

Reason for revert: breaks ASAN:
https://ci.chromium.org/p/v8/builders/ci/V8%20Linux64%20ASAN/33137

Original change's description:
> [wasm][debug] Report global scope also for compiled frames
> 
> The global scope (containing global values and the memory) can be
> produced from the instance alone, hence we can also report it for
> compiled frames.
> 
> R=​mstarzinger@chromium.org, jgruber@chromium.org
> 
> Bug: v8:9676
> Change-Id: I20fbb74a98b00b128b6ed305b92fb56ad7dc7558
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1876816
> Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
> Reviewed-by: Jakob Gruber <jgruber@chromium.org>
> Commit-Queue: Clemens Backes <clemensb@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#64547}

TBR=mstarzinger@chromium.org,jgruber@chromium.org,clemensb@chromium.org

Change-Id: I7a37723286315235f0c0a63728de58633a3b259e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: v8:9676
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1878713Reviewed-by: 's avatarSigurd Schneider <sigurds@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64549}
parent 38976782
......@@ -141,9 +141,7 @@ bool DebugWasmScopeIterator::Done() {
void DebugWasmScopeIterator::Advance() {
DCHECK(!Done());
// Local scope information is only available for interpreted frames currently.
if (type_ == debug::ScopeIterator::ScopeTypeGlobal &&
frame_->is_wasm_interpreter_entry()) {
if (type_ == debug::ScopeIterator::ScopeTypeGlobal) {
type_ = debug::ScopeIterator::ScopeTypeLocal;
} else {
// We use ScopeTypeWith type as marker for done.
......@@ -158,18 +156,17 @@ v8::debug::ScopeIterator::ScopeType DebugWasmScopeIterator::GetType() {
v8::Local<v8::Object> DebugWasmScopeIterator::GetObject() {
DCHECK(!Done());
Handle<WasmDebugInfo> debug_info(
WasmInterpreterEntryFrame::cast(frame_)->debug_info(), isolate_);
switch (type_) {
case debug::ScopeIterator::ScopeTypeGlobal: {
Handle<WasmInstanceObject> instance =
FrameSummary::GetTop(frame_).AsWasm().wasm_instance();
Handle<WasmInstanceObject> instance(debug_info->wasm_instance(),
isolate_);
return Utils::ToLocal(wasm::GetGlobalScopeObject(instance));
}
case debug::ScopeIterator::ScopeTypeLocal: {
Handle<WasmDebugInfo> debug_info(
WasmInterpreterEntryFrame::cast(frame_)->debug_info(), isolate_);
case debug::ScopeIterator::ScopeTypeLocal:
return Utils::ToLocal(WasmDebugInfo::GetLocalScopeObject(
debug_info, frame_->fp(), inlined_frame_index_));
}
default:
return v8::Local<v8::Object>();
}
......
......@@ -156,11 +156,12 @@ std::unique_ptr<v8::debug::ScopeIterator>
DebugStackTraceIterator::GetScopeIterator() const {
DCHECK(!Done());
StandardFrame* frame = iterator_.frame();
if (frame->is_wasm()) {
return std::make_unique<DebugWasmScopeIterator>(isolate_, iterator_.frame(),
inlined_frame_index_);
if (frame->is_wasm_interpreter_entry()) {
return std::unique_ptr<v8::debug::ScopeIterator>(new DebugWasmScopeIterator(
isolate_, iterator_.frame(), inlined_frame_index_));
}
return std::make_unique<DebugScopeIterator>(isolate_, frame_inspector_.get());
return std::unique_ptr<v8::debug::ScopeIterator>(
new DebugScopeIterator(isolate_, frame_inspector_.get()));
}
bool DebugStackTraceIterator::Restart() {
......
......@@ -1913,10 +1913,6 @@ int WasmCompiledFrame::position() const {
return FrameSummary::GetSingle(this).SourcePosition();
}
Object WasmCompiledFrame::context() const {
return wasm_instance().native_context();
}
void WasmCompiledFrame::Summarize(std::vector<FrameSummary>* functions) const {
DCHECK(functions->empty());
// The {WasmCode*} escapes this scope via the {FrameSummary}, which is fine,
......
......@@ -953,7 +953,6 @@ class WasmCompiledFrame : public StandardFrame {
uint32_t function_index() const;
Script script() const override;
int position() const override;
Object context() const override;
bool at_to_number_conversion() const;
void Summarize(std::vector<FrameSummary>* frames) const override;
......
......@@ -23,8 +23,6 @@ at func (2:2):
locals: "i32Arg": 4 (number), "local#1": 0 (number), "i64_local": 0 (number), "unicode☼f64": 0 (number)
stack:
at call_func (5:2):
- scope (global):
globals: "global#0": 0 (number)
at (anonymous) (0:17):
- scope (global):
-- skipped globals
......@@ -42,8 +40,6 @@ at func (3:2):
locals: "i32Arg": 4 (number), "local#1": 0 (number), "i64_local": 0 (number), "unicode☼f64": 0 (number)
stack: "0": 11 (number)
at call_func (5:2):
- scope (global):
globals: "global#0": 0 (number)
at (anonymous) (0:17):
- scope (global):
-- skipped globals
......@@ -61,8 +57,6 @@ at func (4:2):
locals: "i32Arg": 11 (number), "local#1": 0 (number), "i64_local": 0 (number), "unicode☼f64": 0 (number)
stack:
at call_func (5:2):
- scope (global):
globals: "global#0": 0 (number)
at (anonymous) (0:17):
- scope (global):
-- skipped globals
......@@ -80,8 +74,6 @@ at func (5:2):
locals: "i32Arg": 11 (number), "local#1": 0 (number), "i64_local": 0 (number), "unicode☼f64": 0 (number)
stack: "0": 47 (number)
at call_func (5:2):
- scope (global):
globals: "global#0": 0 (number)
at (anonymous) (0:17):
- scope (global):
-- skipped globals
......@@ -99,8 +91,6 @@ at func (6:2):
locals: "i32Arg": 11 (number), "local#1": 47 (number), "i64_local": 0 (number), "unicode☼f64": 0 (number)
stack:
at call_func (5:2):
- scope (global):
globals: "global#0": 0 (number)
at (anonymous) (0:17):
- scope (global):
-- skipped globals
......@@ -118,8 +108,6 @@ at func (7:2):
locals: "i32Arg": 11 (number), "local#1": 47 (number), "i64_local": 0 (number), "unicode☼f64": 0 (number)
stack: "0": 9223372036854775807 (string)
at call_func (5:2):
- scope (global):
globals: "global#0": 0 (number)
at (anonymous) (0:17):
- scope (global):
-- skipped globals
......@@ -137,8 +125,6 @@ at func (8:2):
locals: "i32Arg": 11 (number), "local#1": 47 (number), "i64_local": 9223372036854775807 (string), "unicode☼f64": 0 (number)
stack:
at call_func (5:2):
- scope (global):
globals: "global#0": 0 (number)
at (anonymous) (0:17):
- scope (global):
-- skipped globals
......@@ -156,8 +142,6 @@ at func (9:2):
locals: "i32Arg": 11 (number), "local#1": 47 (number), "i64_local": 9223372036854775807 (string), "unicode☼f64": 0 (number)
stack: "0": -9223372036854775808 (string)
at call_func (5:2):
- scope (global):
globals: "global#0": 0 (number)
at (anonymous) (0:17):
- scope (global):
-- skipped globals
......@@ -175,8 +159,6 @@ at func (10:2):
locals: "i32Arg": 11 (number), "local#1": 47 (number), "i64_local": -9223372036854775808 (string), "unicode☼f64": 0 (number)
stack:
at call_func (5:2):
- scope (global):
globals: "global#0": 0 (number)
at (anonymous) (0:17):
- scope (global):
-- skipped globals
......@@ -194,8 +176,6 @@ at func (11:2):
locals: "i32Arg": 11 (number), "local#1": 47 (number), "i64_local": -9223372036854775808 (string), "unicode☼f64": 0 (number)
stack: "0": 1 (number)
at call_func (5:2):
- scope (global):
globals: "global#0": 0 (number)
at (anonymous) (0:17):
- scope (global):
-- skipped globals
......@@ -213,8 +193,6 @@ at func (12:2):
locals: "i32Arg": 11 (number), "local#1": 47 (number), "i64_local": -9223372036854775808 (string), "unicode☼f64": 0 (number)
stack: "0": 1 (number)
at call_func (5:2):
- scope (global):
globals: "global#0": 0 (number)
at (anonymous) (0:17):
- scope (global):
-- skipped globals
......@@ -232,8 +210,6 @@ at func (13:2):
locals: "i32Arg": 11 (number), "local#1": 47 (number), "i64_local": -9223372036854775808 (string), "unicode☼f64": 0 (number)
stack: "0": 1 (number), "1": 7 (number)
at call_func (5:2):
- scope (global):
globals: "global#0": 0 (number)
at (anonymous) (0:17):
- scope (global):
-- skipped globals
......@@ -251,8 +227,6 @@ at func (14:2):
locals: "i32Arg": 11 (number), "local#1": 47 (number), "i64_local": -9223372036854775808 (string), "unicode☼f64": 0 (number)
stack: "0": 1 (number), "1": 7 (number)
at call_func (5:2):
- scope (global):
globals: "global#0": 0 (number)
at (anonymous) (0:17):
- scope (global):
-- skipped globals
......@@ -270,8 +244,6 @@ at func (15:2):
locals: "i32Arg": 11 (number), "local#1": 47 (number), "i64_local": -9223372036854775808 (string), "unicode☼f64": 0 (number)
stack: "0": 0.14285714285714285 (number)
at call_func (5:2):
- scope (global):
globals: "global#0": 0 (number)
at (anonymous) (0:17):
- scope (global):
-- skipped globals
......@@ -289,8 +261,6 @@ at func (16:2):
locals: "i32Arg": 11 (number), "local#1": 47 (number), "i64_local": -9223372036854775808 (string), "unicode☼f64": 0.14285714285714285 (number)
stack:
at call_func (5:2):
- scope (global):
globals: "global#0": 0 (number)
at (anonymous) (0:17):
- scope (global):
-- skipped globals
......@@ -308,8 +278,6 @@ at func (17:2):
locals: "i32Arg": 11 (number), "local#1": 47 (number), "i64_local": -9223372036854775808 (string), "unicode☼f64": 0.14285714285714285 (number)
stack: "0": 15 (number)
at call_func (5:2):
- scope (global):
globals: "global#0": 0 (number)
at (anonymous) (0:17):
- scope (global):
-- skipped globals
......@@ -327,8 +295,6 @@ at func (18:0):
locals: "i32Arg": 11 (number), "local#1": 47 (number), "i64_local": -9223372036854775808 (string), "unicode☼f64": 0.14285714285714285 (number)
stack:
at call_func (5:2):
- scope (global):
globals: "global#0": 15 (number)
at (anonymous) (0:17):
- scope (global):
-- skipped globals
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment