[interpreter] Use builtin names for bytecode handlers
... to make them unique. With this fix the --trace-turbo no longer overwrites bytecode handler graphs and --trace-turbo-filter allows to select exact bytecode handler version. Bug: v8:9396 Change-Id: I260edc8872e320aadd5d70aa95cf5bf2cd24b22f Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1792904 Commit-Queue: Igor Sheludko <ishell@chromium.org> Commit-Queue: Leszek Swirski <leszeks@chromium.org> Auto-Submit: Igor Sheludko <ishell@chromium.org> Reviewed-by: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/master@{#63620}
This commit is contained in:
parent
3041f17089
commit
6165355e96
@ -264,13 +264,12 @@ void SetupIsolateDelegate::ReplacePlaceholders(Isolate* isolate) {
|
|||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
Code GenerateBytecodeHandler(Isolate* isolate, int builtin_index,
|
Code GenerateBytecodeHandler(Isolate* isolate, int builtin_index,
|
||||||
const char* name,
|
|
||||||
interpreter::OperandScale operand_scale,
|
interpreter::OperandScale operand_scale,
|
||||||
interpreter::Bytecode bytecode) {
|
interpreter::Bytecode bytecode) {
|
||||||
DCHECK(interpreter::Bytecodes::BytecodeHasHandler(bytecode, operand_scale));
|
DCHECK(interpreter::Bytecodes::BytecodeHasHandler(bytecode, operand_scale));
|
||||||
Handle<Code> code = interpreter::GenerateBytecodeHandler(
|
Handle<Code> code = interpreter::GenerateBytecodeHandler(
|
||||||
isolate, bytecode, operand_scale, builtin_index,
|
isolate, Builtins::name(builtin_index), bytecode, operand_scale,
|
||||||
BuiltinAssemblerOptions(isolate, builtin_index));
|
builtin_index, BuiltinAssemblerOptions(isolate, builtin_index));
|
||||||
return *code;
|
return *code;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -314,9 +313,8 @@ void SetupIsolateDelegate::SetupBuiltinsInternal(Isolate* isolate) {
|
|||||||
CallDescriptors::InterfaceDescriptor, #Name); \
|
CallDescriptors::InterfaceDescriptor, #Name); \
|
||||||
AddBuiltin(builtins, index++, code);
|
AddBuiltin(builtins, index++, code);
|
||||||
|
|
||||||
#define BUILD_BCH(Name, OperandScale, Bytecode) \
|
#define BUILD_BCH(Name, OperandScale, Bytecode) \
|
||||||
code = GenerateBytecodeHandler(isolate, index, Builtins::name(index), \
|
code = GenerateBytecodeHandler(isolate, index, OperandScale, Bytecode); \
|
||||||
OperandScale, Bytecode); \
|
|
||||||
AddBuiltin(builtins, index++, code);
|
AddBuiltin(builtins, index++, code);
|
||||||
|
|
||||||
#define BUILD_ASM(Name, InterfaceDescriptor) \
|
#define BUILD_ASM(Name, InterfaceDescriptor) \
|
||||||
|
@ -3351,14 +3351,15 @@ IGNITION_HANDLER(ResumeGenerator, InterpreterAssembler) {
|
|||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
Handle<Code> GenerateBytecodeHandler(Isolate* isolate, Bytecode bytecode,
|
Handle<Code> GenerateBytecodeHandler(Isolate* isolate, const char* debug_name,
|
||||||
|
Bytecode bytecode,
|
||||||
OperandScale operand_scale,
|
OperandScale operand_scale,
|
||||||
int builtin_index,
|
int builtin_index,
|
||||||
const AssemblerOptions& options) {
|
const AssemblerOptions& options) {
|
||||||
Zone zone(isolate->allocator(), ZONE_NAME);
|
Zone zone(isolate->allocator(), ZONE_NAME);
|
||||||
compiler::CodeAssemblerState state(
|
compiler::CodeAssemblerState state(
|
||||||
isolate, &zone, InterpreterDispatchDescriptor{}, Code::BYTECODE_HANDLER,
|
isolate, &zone, InterpreterDispatchDescriptor{}, Code::BYTECODE_HANDLER,
|
||||||
Bytecodes::ToString(bytecode),
|
debug_name,
|
||||||
FLAG_untrusted_code_mitigations
|
FLAG_untrusted_code_mitigations
|
||||||
? PoisoningMitigationLevel::kPoisonCriticalOnly
|
? PoisoningMitigationLevel::kPoisonCriticalOnly
|
||||||
: PoisoningMitigationLevel::kDontPoison,
|
: PoisoningMitigationLevel::kDontPoison,
|
||||||
|
@ -15,7 +15,9 @@ struct AssemblerOptions;
|
|||||||
|
|
||||||
namespace interpreter {
|
namespace interpreter {
|
||||||
|
|
||||||
extern Handle<Code> GenerateBytecodeHandler(Isolate* isolate, Bytecode bytecode,
|
extern Handle<Code> GenerateBytecodeHandler(Isolate* isolate,
|
||||||
|
const char* debug_name,
|
||||||
|
Bytecode bytecode,
|
||||||
OperandScale operand_scale,
|
OperandScale operand_scale,
|
||||||
int builtin_index,
|
int builtin_index,
|
||||||
const AssemblerOptions& options);
|
const AssemblerOptions& options);
|
||||||
|
Loading…
Reference in New Issue
Block a user