Commit b98b4621 authored by Clemens Backes's avatar Clemens Backes Committed by Commit Bot

[wasm][debug] Remove WasmNumInterpretedCalls runtime function

Redirection to the interpreter is removed from mjsunit tests. Hence the
runtime function will always return 0.
This CL removes the runtime function and the respective method from the
interpreter.

R=thibaudm@chromium.org

Bug: v8:10389
Change-Id: Ia17bebf3992f42a17a9c1b385ecdc2f2e3061b65
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2164794
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Reviewed-by: 's avatarThibaud Michaud <thibaudm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67447}
parent 053d7329
......@@ -1320,15 +1320,6 @@ RUNTIME_FUNCTION(Runtime_WasmGetNumberOfInstances) {
return Smi::FromInt(instance_count);
}
RUNTIME_FUNCTION(Runtime_WasmNumInterpretedCalls) {
DCHECK_EQ(1, args.length());
HandleScope scope(isolate);
CONVERT_ARG_HANDLE_CHECKED(WasmInstanceObject, instance, 0);
if (!instance->has_debug_info()) return Object();
uint64_t num = instance->debug_info().NumInterpretedCalls();
return *isolate->factory()->NewNumberFromSize(static_cast<size_t>(num));
}
RUNTIME_FUNCTION(Runtime_WasmNumCodeSpaces) {
DCHECK_EQ(1, args.length());
HandleScope scope(isolate);
......
......@@ -537,7 +537,6 @@ namespace internal {
F(TurbofanStaticAssert, 1, 1) \
F(UnblockConcurrentRecompilation, 0, 1) \
F(WasmGetNumberOfInstances, 1, 1) \
F(WasmNumInterpretedCalls, 1, 1) \
F(WasmNumCodeSpaces, 1, 1) \
F(WasmTierDownModule, 1, 1) \
F(WasmTierUpFunction, 2, 1) \
......
......@@ -261,11 +261,6 @@ class InterpreterHandle {
return thread->GetFrame(frame_range.first + idx);
}
uint64_t NumInterpretedCalls() {
DCHECK_EQ(1, interpreter()->GetThreadCount());
return interpreter()->GetThread(0)->NumInterpretedCalls();
}
private:
DISALLOW_COPY_AND_ASSIGN(InterpreterHandle);
};
......@@ -928,12 +923,6 @@ wasm::InterpreterHandle* GetInterpreterHandle(WasmDebugInfo debug_info) {
return Managed<wasm::InterpreterHandle>::cast(handle_obj).raw();
}
wasm::InterpreterHandle* GetInterpreterHandleOrNull(WasmDebugInfo debug_info) {
Object handle_obj = debug_info.interpreter_handle();
if (handle_obj.IsUndefined()) return nullptr;
return Managed<wasm::InterpreterHandle>::cast(handle_obj).raw();
}
} // namespace
Handle<WasmDebugInfo> WasmDebugInfo::New(Handle<WasmInstanceObject> instance) {
......@@ -991,11 +980,6 @@ wasm::WasmInterpreter::FramePtr WasmDebugInfo::GetInterpretedFrame(
return GetInterpreterHandle(*this)->GetInterpretedFrame(frame_pointer, idx);
}
uint64_t WasmDebugInfo::NumInterpretedCalls() {
auto* handle = GetInterpreterHandleOrNull(*this);
return handle ? handle->NumInterpretedCalls() : 0;
}
// static
Handle<Code> WasmDebugInfo::GetCWasmEntry(Handle<WasmDebugInfo> debug_info,
const wasm::FunctionSig* sig) {
......
......@@ -865,9 +865,6 @@ class WasmDebugInfo : public Struct {
std::unique_ptr<wasm::InterpretedFrame, wasm::InterpretedFrameDeleter>
GetInterpretedFrame(Address frame_pointer, int frame_index);
// Returns the number of calls / function frames executed in the interpreter.
V8_EXPORT_PRIVATE uint64_t NumInterpretedCalls();
V8_EXPORT_PRIVATE static Handle<Code> GetCWasmEntry(Handle<WasmDebugInfo>,
const wasm::FunctionSig*);
......
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