From 398242f58266742f300a8e488e7292485946e1e8 Mon Sep 17 00:00:00 2001 From: "Ben L. Titzer" Date: Tue, 28 Aug 2018 11:38:48 +0200 Subject: [PATCH] [flags] s/wasm_trace/trace_wasm/g in flags This CL makes the names of tracing flags related to WASM consistent with the rest of V8 tracing flags. R=ahaas@chromium.org Change-Id: I871fb7b5e27ff7b8f587e08507d15c0719881990 Reviewed-on: https://chromium-review.googlesource.com/1193182 Commit-Queue: Ben Titzer Reviewed-by: Andreas Haas Cr-Commit-Position: refs/heads/master@{#55479} --- src/compiler/wasm-compiler.cc | 4 ++-- src/flag-definitions.h | 6 +++--- src/wasm/baseline/liftoff-compiler.cc | 4 ++-- src/wasm/wasm-code-manager.cc | 2 +- src/wasm/wasm-interpreter.cc | 4 ++-- src/wasm/wasm-serialization.cc | 8 ++++---- test/message/wasm-trace-memory-interpreted.js | 2 +- test/message/wasm-trace-memory-liftoff.js | 2 +- test/message/wasm-trace-memory.js | 2 +- 9 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/compiler/wasm-compiler.cc b/src/compiler/wasm-compiler.cc index 576ecf8550..8dfadb4d66 100644 --- a/src/compiler/wasm-compiler.cc +++ b/src/compiler/wasm-compiler.cc @@ -3203,7 +3203,7 @@ Node* WasmGraphBuilder::LoadMem(wasm::ValueType type, MachineType memtype, } } - if (FLAG_wasm_trace_memory) { + if (FLAG_trace_wasm_memory) { TraceMemoryOperation(false, memtype.representation(), index, offset, position); } @@ -3248,7 +3248,7 @@ Node* WasmGraphBuilder::StoreMem(MachineRepresentation mem_rep, Node* index, SetEffect(store); - if (FLAG_wasm_trace_memory) { + if (FLAG_trace_wasm_memory) { TraceMemoryOperation(true, mem_rep, index, offset, position); } diff --git a/src/flag-definitions.h b/src/flag-definitions.h index 940559d276..3f6367a268 100644 --- a/src/flag-definitions.h +++ b/src/flag-definitions.h @@ -536,11 +536,11 @@ DEFINE_BOOL(wasm_disable_structured_cloning, false, "disable wasm structured cloning") DEFINE_INT(wasm_num_compilation_tasks, 10, "number of parallel compilation tasks for wasm") -DEFINE_DEBUG_BOOL(wasm_trace_native_heap, false, +DEFINE_DEBUG_BOOL(trace_wasm_native_heap, false, "trace wasm native heap events") DEFINE_BOOL(wasm_write_protect_code_memory, false, "write protect code memory on the wasm native heap") -DEFINE_BOOL(wasm_trace_serialization, false, +DEFINE_BOOL(trace_wasm_serialization, false, "trace serialization/deserialization") DEFINE_BOOL(wasm_async_compilation, true, "enable actual asynchronous compilation for WebAssembly.compile") @@ -580,7 +580,7 @@ DEFINE_DEBUG_BOOL(trace_liftoff, false, "trace Liftoff, the baseline compiler for WebAssembly") DEFINE_DEBUG_BOOL(wasm_break_on_decoder_error, false, "debug break when wasm decoder encounters an error") -DEFINE_BOOL(wasm_trace_memory, false, +DEFINE_BOOL(trace_wasm_memory, false, "print all memory updates performed in wasm code") // Fuzzers use {wasm_tier_mask_for_testing} together with {liftoff} and // {no_wasm_tier_up} to force some functions to be compiled with Turbofan. diff --git a/src/wasm/baseline/liftoff-compiler.cc b/src/wasm/baseline/liftoff-compiler.cc index 4c6fc0a8d4..7ea2486b86 100644 --- a/src/wasm/baseline/liftoff-compiler.cc +++ b/src/wasm/baseline/liftoff-compiler.cc @@ -1494,7 +1494,7 @@ class LiftoffCompiler { } __ PushRegister(value_type, value); - if (FLAG_wasm_trace_memory) { + if (FLAG_trace_wasm_memory) { TraceMemoryOperation(false, type.mem_type().representation(), index.gp(), offset, decoder->position()); } @@ -1524,7 +1524,7 @@ class LiftoffCompiler { WasmCode::kThrowWasmTrapMemOutOfBounds, protected_store_pc); } - if (FLAG_wasm_trace_memory) { + if (FLAG_trace_wasm_memory) { TraceMemoryOperation(true, type.mem_rep(), index.gp(), offset, decoder->position()); } diff --git a/src/wasm/wasm-code-manager.cc b/src/wasm/wasm-code-manager.cc index a3fa20def7..924db05c51 100644 --- a/src/wasm/wasm-code-manager.cc +++ b/src/wasm/wasm-code-manager.cc @@ -23,7 +23,7 @@ #define TRACE_HEAP(...) \ do { \ - if (FLAG_wasm_trace_native_heap) PrintF(__VA_ARGS__); \ + if (FLAG_trace_wasm_native_heap) PrintF(__VA_ARGS__); \ } while (false) namespace v8 { diff --git a/src/wasm/wasm-interpreter.cc b/src/wasm/wasm-interpreter.cc index 0c7fb25b67..e13281d9ac 100644 --- a/src/wasm/wasm-interpreter.cc +++ b/src/wasm/wasm-interpreter.cc @@ -1426,7 +1426,7 @@ class ThreadImpl { Push(result); len = 1 + imm.length; - if (FLAG_wasm_trace_memory) { + if (FLAG_trace_wasm_memory) { MemoryTracingInfo info(imm.offset + index, false, rep); TraceMemoryOperation(ExecutionTier::kInterpreter, &info, code->function->func_index, static_cast(pc), @@ -1452,7 +1452,7 @@ class ThreadImpl { WriteLittleEndianValue(addr, converter{}(val)); len = 1 + imm.length; - if (FLAG_wasm_trace_memory) { + if (FLAG_trace_wasm_memory) { MemoryTracingInfo info(imm.offset + index, true, rep); TraceMemoryOperation(ExecutionTier::kInterpreter, &info, code->function->func_index, static_cast(pc), diff --git a/src/wasm/wasm-serialization.cc b/src/wasm/wasm-serialization.cc index 2edc412afa..200b42f827 100644 --- a/src/wasm/wasm-serialization.cc +++ b/src/wasm/wasm-serialization.cc @@ -46,7 +46,7 @@ class Writer { DCHECK_GE(current_size(), sizeof(T)); WriteUnalignedValue(reinterpret_cast
(current_location()), value); pos_ += sizeof(T); - if (FLAG_wasm_trace_serialization) { + if (FLAG_trace_wasm_serialization) { StdoutStream{} << "wrote: " << (size_t)value << " sized: " << sizeof(T) << std::endl; } @@ -58,7 +58,7 @@ class Writer { memcpy(current_location(), v.start(), v.size()); pos_ += v.size(); } - if (FLAG_wasm_trace_serialization) { + if (FLAG_trace_wasm_serialization) { StdoutStream{} << "wrote vector of " << v.size() << " elements" << std::endl; } @@ -90,7 +90,7 @@ class Reader { T value = ReadUnalignedValue(reinterpret_cast
(current_location())); pos_ += sizeof(T); - if (FLAG_wasm_trace_serialization) { + if (FLAG_trace_wasm_serialization) { StdoutStream{} << "read: " << (size_t)value << " sized: " << sizeof(T) << std::endl; } @@ -103,7 +103,7 @@ class Reader { memcpy(v.start(), current_location(), v.size()); pos_ += v.size(); } - if (FLAG_wasm_trace_serialization) { + if (FLAG_trace_wasm_serialization) { StdoutStream{} << "read vector of " << v.size() << " elements" << std::endl; } diff --git a/test/message/wasm-trace-memory-interpreted.js b/test/message/wasm-trace-memory-interpreted.js index 75f42e82e6..fdac585b39 100644 --- a/test/message/wasm-trace-memory-interpreted.js +++ b/test/message/wasm-trace-memory-interpreted.js @@ -2,6 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Flags: --no-stress-opt --expose-wasm --wasm-trace-memory --wasm-interpret-all +// Flags: --no-stress-opt --expose-wasm --trace-wasm-memory --wasm-interpret-all load("test/message/wasm-trace-memory.js"); diff --git a/test/message/wasm-trace-memory-liftoff.js b/test/message/wasm-trace-memory-liftoff.js index b56d1d7978..a23eca4a0f 100644 --- a/test/message/wasm-trace-memory-liftoff.js +++ b/test/message/wasm-trace-memory-liftoff.js @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Flags: --no-stress-opt --wasm-trace-memory --liftoff --no-future +// Flags: --no-stress-opt --trace-wasm-memory --liftoff --no-future // Flags: --no-wasm-tier-up load("test/message/wasm-trace-memory.js"); diff --git a/test/message/wasm-trace-memory.js b/test/message/wasm-trace-memory.js index adb1e2b7a7..53c46073ec 100644 --- a/test/message/wasm-trace-memory.js +++ b/test/message/wasm-trace-memory.js @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Flags: --no-stress-opt --wasm-trace-memory --no-liftoff --no-future +// Flags: --no-stress-opt --trace-wasm-memory --no-liftoff --no-future // Flags: --no-wasm-tier-up load("test/mjsunit/wasm/wasm-constants.js");