Statically disable --perf-prof-unwinding-info if not supported

This just removes the flag if it is not supported anyway. This avoids
fuzzers trapping over this.
The same was done for the --perf-prof flag in
https://crrev.com/c/1993969.

R=ahaas@chromium.org

Bug: chromium:1035233
Change-Id: I7b4b8fdd141df717cc62d795534f30435f7b38c1
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1998083
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Reviewed-by: Maya Lekova <mslekova@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65760}
This commit is contained in:
Clemens Backes 2020-01-13 21:56:20 +01:00 committed by Commit Bot
parent 3e8407cef1
commit a711a82ed8
3 changed files with 19 additions and 17 deletions

View File

@ -33,20 +33,19 @@ namespace compiler {
class InstructionBlock;
static_assert(!FLAG_perf_prof_unwinding_info,
"--perf-prof-unwinding-info should be statically disabled if not "
"supported");
class UnwindingInfoWriter {
public:
explicit UnwindingInfoWriter(Zone* zone) {}
explicit UnwindingInfoWriter(Zone*) {}
void SetNumberOfInstructionBlocks(int number) {
if (FLAG_perf_prof_unwinding_info) UNIMPLEMENTED();
}
void SetNumberOfInstructionBlocks(int number) {}
void BeginInstructionBlock(int pc_offset, const InstructionBlock* block) {
if (FLAG_perf_prof_unwinding_info) UNIMPLEMENTED();
}
void EndInstructionBlock(const InstructionBlock* block) {
if (FLAG_perf_prof_unwinding_info) UNIMPLEMENTED();
}
void BeginInstructionBlock(int pc_offset, const InstructionBlock*) {}
void EndInstructionBlock(const InstructionBlock*) {}
void Finish(int code_size) {}

View File

@ -1526,6 +1526,16 @@ DEFINE_NEG_IMPLICATION(perf_prof, compact_code_space)
// TODO(v8:8462) Remove implication once perf supports remapping.
DEFINE_NEG_IMPLICATION(perf_prof, write_protect_code_memory)
DEFINE_NEG_IMPLICATION(perf_prof, wasm_write_protect_code_memory)
// --perf-prof-unwinding-info is available only on selected architectures.
#if !V8_TARGET_ARCH_ARM && !V8_TARGET_ARCH_ARM64 && !V8_TARGET_ARCH_X64 && \
!V8_TARGET_ARCH_S390X && !V8_TARGET_ARCH_PPC64
#undef DEFINE_PERF_PROF_BOOL
#define DEFINE_PERF_PROF_BOOL(nam, cmt) DEFINE_BOOL_READONLY(nam, false, cmt)
#undef DEFINE_PERF_PROF_IMPLICATION
#define DEFINE_PERF_PROF_IMPLICATION(...)
#endif
DEFINE_PERF_PROF_BOOL(
perf_prof_unwinding_info,
"Enable unwinding info for perf linux profiler (experimental).")

View File

@ -1076,13 +1076,6 @@
'wasm/tier-down-to-liftoff': [SKIP],
}], # arch not in (x64, ia32, arm64, arm)
##############################################################################
['arch not in [x64, arm, arm64] or system != linux', {
# Unwinding info writer is only supported on x64, arm, and arm64 Linux
'regress/regress-913844': [SKIP],
'regress/wasm/regress-1032753': [SKIP],
}],
##############################################################################
['system != linux', {
# Multi-mapped mock allocator is only available on Linux.