diff options
| author | 2015-06-19 14:47:01 +0100 | |
|---|---|---|
| committer | 2015-06-19 14:47:01 +0100 | |
| commit | 9931f319cf86c56c2855d800339a3410697633a6 (patch) | |
| tree | 94e98f4a670d9bded4ed3fbc194c31e4c733d198 /compiler/optimizing | |
| parent | edb83c606e034d76bed1331f34cdc435df47bb95 (diff) | |
Opt compiler: Add a description to slow paths.
Change-Id: I22160d90de3fe0ab3e6a2acc440bda8daa00e0f0
Diffstat (limited to 'compiler/optimizing')
| -rw-r--r-- | compiler/optimizing/code_generator.h | 2 | ||||
| -rw-r--r-- | compiler/optimizing/code_generator_arm.cc | 16 | ||||
| -rw-r--r-- | compiler/optimizing/code_generator_arm64.cc | 16 | ||||
| -rw-r--r-- | compiler/optimizing/code_generator_x86.cc | 18 | ||||
| -rw-r--r-- | compiler/optimizing/code_generator_x86_64.cc | 18 | ||||
| -rw-r--r-- | compiler/optimizing/intrinsics_arm.cc | 2 | ||||
| -rw-r--r-- | compiler/optimizing/intrinsics_arm64.cc | 2 | ||||
| -rw-r--r-- | compiler/optimizing/intrinsics_x86.cc | 2 | ||||
| -rw-r--r-- | compiler/optimizing/intrinsics_x86_64.cc | 2 |
9 files changed, 78 insertions, 0 deletions
diff --git a/compiler/optimizing/code_generator.h b/compiler/optimizing/code_generator.h index 5b0abd76b3..b1f1674891 100644 --- a/compiler/optimizing/code_generator.h +++ b/compiler/optimizing/code_generator.h @@ -97,6 +97,8 @@ class SlowPathCode : public ArenaObject<kArenaAllocSlowPaths> { return saved_fpu_stack_offsets_[reg]; } + virtual const char* GetDescription() const = 0; + protected: static constexpr size_t kMaximumNumberOfExpectedRegisters = 32; static constexpr uint32_t kRegisterNotSaved = -1; diff --git a/compiler/optimizing/code_generator_arm.cc b/compiler/optimizing/code_generator_arm.cc index f6ae45238c..71696799f8 100644 --- a/compiler/optimizing/code_generator_arm.cc +++ b/compiler/optimizing/code_generator_arm.cc @@ -69,6 +69,8 @@ class NullCheckSlowPathARM : public SlowPathCodeARM { QUICK_ENTRY_POINT(pThrowNullPointer), instruction_, instruction_->GetDexPc(), this); } + const char* GetDescription() const OVERRIDE { return "NullCheckSlowPathARM"; } + private: HNullCheck* const instruction_; DISALLOW_COPY_AND_ASSIGN(NullCheckSlowPathARM); @@ -85,6 +87,8 @@ class DivZeroCheckSlowPathARM : public SlowPathCodeARM { QUICK_ENTRY_POINT(pThrowDivZero), instruction_, instruction_->GetDexPc(), this); } + const char* GetDescription() const OVERRIDE { return "DivZeroCheckSlowPathARM"; } + private: HDivZeroCheck* const instruction_; DISALLOW_COPY_AND_ASSIGN(DivZeroCheckSlowPathARM); @@ -118,6 +122,8 @@ class SuspendCheckSlowPathARM : public SlowPathCodeARM { return successor_; } + const char* GetDescription() const OVERRIDE { return "SuspendCheckSlowPathARM"; } + private: HSuspendCheck* const instruction_; // If not null, the block to branch to after the suspend check. @@ -155,6 +161,8 @@ class BoundsCheckSlowPathARM : public SlowPathCodeARM { QUICK_ENTRY_POINT(pThrowArrayBounds), instruction_, instruction_->GetDexPc(), this); } + const char* GetDescription() const OVERRIDE { return "BoundsCheckSlowPathARM"; } + private: HBoundsCheck* const instruction_; const Location index_location_; @@ -197,6 +205,8 @@ class LoadClassSlowPathARM : public SlowPathCodeARM { __ b(GetExitLabel()); } + const char* GetDescription() const OVERRIDE { return "LoadClassSlowPathARM"; } + private: // The class this slow path will load. HLoadClass* const cls_; @@ -236,6 +246,8 @@ class LoadStringSlowPathARM : public SlowPathCodeARM { __ b(GetExitLabel()); } + const char* GetDescription() const OVERRIDE { return "LoadStringSlowPathARM"; } + private: HLoadString* const instruction_; @@ -286,6 +298,8 @@ class TypeCheckSlowPathARM : public SlowPathCodeARM { __ b(GetExitLabel()); } + const char* GetDescription() const OVERRIDE { return "TypeCheckSlowPathARM"; } + private: HInstruction* const instruction_; const Location class_to_check_; @@ -310,6 +324,8 @@ class DeoptimizationSlowPathARM : public SlowPathCodeARM { arm_codegen->InvokeRuntime(QUICK_ENTRY_POINT(pDeoptimize), instruction_, dex_pc, this); } + const char* GetDescription() const OVERRIDE { return "DeoptimizationSlowPathARM"; } + private: HInstruction* const instruction_; DISALLOW_COPY_AND_ASSIGN(DeoptimizationSlowPathARM); diff --git a/compiler/optimizing/code_generator_arm64.cc b/compiler/optimizing/code_generator_arm64.cc index 3c8f117011..7ec6b54285 100644 --- a/compiler/optimizing/code_generator_arm64.cc +++ b/compiler/optimizing/code_generator_arm64.cc @@ -213,6 +213,8 @@ class BoundsCheckSlowPathARM64 : public SlowPathCodeARM64 { CheckEntrypointTypes<kQuickThrowArrayBounds, void, int32_t, int32_t>(); } + const char* GetDescription() const OVERRIDE { return "BoundsCheckSlowPathARM64"; } + private: HBoundsCheck* const instruction_; const Location index_location_; @@ -233,6 +235,8 @@ class DivZeroCheckSlowPathARM64 : public SlowPathCodeARM64 { CheckEntrypointTypes<kQuickThrowDivZero, void, void>(); } + const char* GetDescription() const OVERRIDE { return "DivZeroCheckSlowPathARM64"; } + private: HDivZeroCheck* const instruction_; DISALLOW_COPY_AND_ASSIGN(DivZeroCheckSlowPathARM64); @@ -278,6 +282,8 @@ class LoadClassSlowPathARM64 : public SlowPathCodeARM64 { __ B(GetExitLabel()); } + const char* GetDescription() const OVERRIDE { return "LoadClassSlowPathARM64"; } + private: // The class this slow path will load. HLoadClass* const cls_; @@ -319,6 +325,8 @@ class LoadStringSlowPathARM64 : public SlowPathCodeARM64 { __ B(GetExitLabel()); } + const char* GetDescription() const OVERRIDE { return "LoadStringSlowPathARM64"; } + private: HLoadString* const instruction_; @@ -337,6 +345,8 @@ class NullCheckSlowPathARM64 : public SlowPathCodeARM64 { CheckEntrypointTypes<kQuickThrowNullPointer, void, void>(); } + const char* GetDescription() const OVERRIDE { return "NullCheckSlowPathARM64"; } + private: HNullCheck* const instruction_; @@ -373,6 +383,8 @@ class SuspendCheckSlowPathARM64 : public SlowPathCodeARM64 { return successor_; } + const char* GetDescription() const OVERRIDE { return "SuspendCheckSlowPathARM64"; } + private: HSuspendCheck* const instruction_; // If not null, the block to branch to after the suspend check. @@ -429,6 +441,8 @@ class TypeCheckSlowPathARM64 : public SlowPathCodeARM64 { __ B(GetExitLabel()); } + const char* GetDescription() const OVERRIDE { return "TypeCheckSlowPathARM64"; } + private: HInstruction* const instruction_; const Location class_to_check_; @@ -453,6 +467,8 @@ class DeoptimizationSlowPathARM64 : public SlowPathCodeARM64 { arm64_codegen->InvokeRuntime(QUICK_ENTRY_POINT(pDeoptimize), instruction_, dex_pc, this); } + const char* GetDescription() const OVERRIDE { return "DeoptimizationSlowPathARM64"; } + private: HInstruction* const instruction_; DISALLOW_COPY_AND_ASSIGN(DeoptimizationSlowPathARM64); diff --git a/compiler/optimizing/code_generator_x86.cc b/compiler/optimizing/code_generator_x86.cc index e39a1c2bd5..4d106c4fa4 100644 --- a/compiler/optimizing/code_generator_x86.cc +++ b/compiler/optimizing/code_generator_x86.cc @@ -56,6 +56,8 @@ class NullCheckSlowPathX86 : public SlowPathCodeX86 { RecordPcInfo(codegen, instruction_, instruction_->GetDexPc()); } + const char* GetDescription() const OVERRIDE { return "NullCheckSlowPathX86"; } + private: HNullCheck* const instruction_; DISALLOW_COPY_AND_ASSIGN(NullCheckSlowPathX86); @@ -71,6 +73,8 @@ class DivZeroCheckSlowPathX86 : public SlowPathCodeX86 { RecordPcInfo(codegen, instruction_, instruction_->GetDexPc()); } + const char* GetDescription() const OVERRIDE { return "DivZeroCheckSlowPathX86"; } + private: HDivZeroCheck* const instruction_; DISALLOW_COPY_AND_ASSIGN(DivZeroCheckSlowPathX86); @@ -90,6 +94,8 @@ class DivRemMinusOneSlowPathX86 : public SlowPathCodeX86 { __ jmp(GetExitLabel()); } + const char* GetDescription() const OVERRIDE { return "DivRemMinusOneSlowPathX86"; } + private: Register reg_; bool is_div_; @@ -122,6 +128,8 @@ class BoundsCheckSlowPathX86 : public SlowPathCodeX86 { RecordPcInfo(codegen, instruction_, instruction_->GetDexPc()); } + const char* GetDescription() const OVERRIDE { return "BoundsCheckSlowPathX86"; } + private: HBoundsCheck* const instruction_; const Location index_location_; @@ -158,6 +166,8 @@ class SuspendCheckSlowPathX86 : public SlowPathCodeX86 { return successor_; } + const char* GetDescription() const OVERRIDE { return "SuspendCheckSlowPathX86"; } + private: HSuspendCheck* const instruction_; HBasicBlock* const successor_; @@ -188,6 +198,8 @@ class LoadStringSlowPathX86 : public SlowPathCodeX86 { __ jmp(GetExitLabel()); } + const char* GetDescription() const OVERRIDE { return "LoadStringSlowPathX86"; } + private: HLoadString* const instruction_; @@ -228,6 +240,8 @@ class LoadClassSlowPathX86 : public SlowPathCodeX86 { __ jmp(GetExitLabel()); } + const char* GetDescription() const OVERRIDE { return "LoadClassSlowPathX86"; } + private: // The class this slow path will load. HLoadClass* const cls_; @@ -293,6 +307,8 @@ class TypeCheckSlowPathX86 : public SlowPathCodeX86 { __ jmp(GetExitLabel()); } + const char* GetDescription() const OVERRIDE { return "TypeCheckSlowPathX86"; } + private: HInstruction* const instruction_; const Location class_to_check_; @@ -318,6 +334,8 @@ class DeoptimizationSlowPathX86 : public SlowPathCodeX86 { codegen->RecordPcInfo(instruction_, dex_pc, this); } + const char* GetDescription() const OVERRIDE { return "DeoptimizationSlowPathX86"; } + private: HInstruction* const instruction_; DISALLOW_COPY_AND_ASSIGN(DeoptimizationSlowPathX86); diff --git a/compiler/optimizing/code_generator_x86_64.cc b/compiler/optimizing/code_generator_x86_64.cc index bfc827de1c..e64540be43 100644 --- a/compiler/optimizing/code_generator_x86_64.cc +++ b/compiler/optimizing/code_generator_x86_64.cc @@ -59,6 +59,8 @@ class NullCheckSlowPathX86_64 : public SlowPathCodeX86_64 { RecordPcInfo(codegen, instruction_, instruction_->GetDexPc()); } + const char* GetDescription() const OVERRIDE { return "NullCheckSlowPathX86_64"; } + private: HNullCheck* const instruction_; DISALLOW_COPY_AND_ASSIGN(NullCheckSlowPathX86_64); @@ -75,6 +77,8 @@ class DivZeroCheckSlowPathX86_64 : public SlowPathCodeX86_64 { RecordPcInfo(codegen, instruction_, instruction_->GetDexPc()); } + const char* GetDescription() const OVERRIDE { return "DivZeroCheckSlowPathX86_64"; } + private: HDivZeroCheck* const instruction_; DISALLOW_COPY_AND_ASSIGN(DivZeroCheckSlowPathX86_64); @@ -105,6 +109,8 @@ class DivRemMinusOneSlowPathX86_64 : public SlowPathCodeX86_64 { __ jmp(GetExitLabel()); } + const char* GetDescription() const OVERRIDE { return "DivRemMinusOneSlowPathX86_64"; } + private: const CpuRegister cpu_reg_; const Primitive::Type type_; @@ -140,6 +146,8 @@ class SuspendCheckSlowPathX86_64 : public SlowPathCodeX86_64 { return successor_; } + const char* GetDescription() const OVERRIDE { return "SuspendCheckSlowPathX86_64"; } + private: HSuspendCheck* const instruction_; HBasicBlock* const successor_; @@ -174,6 +182,8 @@ class BoundsCheckSlowPathX86_64 : public SlowPathCodeX86_64 { RecordPcInfo(codegen, instruction_, instruction_->GetDexPc()); } + const char* GetDescription() const OVERRIDE { return "BoundsCheckSlowPathX86_64"; } + private: HBoundsCheck* const instruction_; const Location index_location_; @@ -217,6 +227,8 @@ class LoadClassSlowPathX86_64 : public SlowPathCodeX86_64 { __ jmp(GetExitLabel()); } + const char* GetDescription() const OVERRIDE { return "LoadClassSlowPathX86_64"; } + private: // The class this slow path will load. HLoadClass* const cls_; @@ -257,6 +269,8 @@ class LoadStringSlowPathX86_64 : public SlowPathCodeX86_64 { __ jmp(GetExitLabel()); } + const char* GetDescription() const OVERRIDE { return "LoadStringSlowPathX86_64"; } + private: HLoadString* const instruction_; @@ -312,6 +326,8 @@ class TypeCheckSlowPathX86_64 : public SlowPathCodeX86_64 { __ jmp(GetExitLabel()); } + const char* GetDescription() const OVERRIDE { return "TypeCheckSlowPathX86_64"; } + private: HInstruction* const instruction_; const Location class_to_check_; @@ -337,6 +353,8 @@ class DeoptimizationSlowPathX86_64 : public SlowPathCodeX86_64 { codegen->RecordPcInfo(instruction_, dex_pc, this); } + const char* GetDescription() const OVERRIDE { return "DeoptimizationSlowPathX86_64"; } + private: HInstruction* const instruction_; DISALLOW_COPY_AND_ASSIGN(DeoptimizationSlowPathX86_64); diff --git a/compiler/optimizing/intrinsics_arm.cc b/compiler/optimizing/intrinsics_arm.cc index 749bedf99e..71fadfbcc2 100644 --- a/compiler/optimizing/intrinsics_arm.cc +++ b/compiler/optimizing/intrinsics_arm.cc @@ -121,6 +121,8 @@ class IntrinsicSlowPathARM : public SlowPathCodeARM { __ b(GetExitLabel()); } + const char* GetDescription() const OVERRIDE { return "IntrinsicSlowPathARM"; } + private: // The instruction where this slow path is happening. HInvoke* const invoke_; diff --git a/compiler/optimizing/intrinsics_arm64.cc b/compiler/optimizing/intrinsics_arm64.cc index c108ad5daa..8bcb88b4ea 100644 --- a/compiler/optimizing/intrinsics_arm64.cc +++ b/compiler/optimizing/intrinsics_arm64.cc @@ -130,6 +130,8 @@ class IntrinsicSlowPathARM64 : public SlowPathCodeARM64 { __ B(GetExitLabel()); } + const char* GetDescription() const OVERRIDE { return "IntrinsicSlowPathARM64"; } + private: // The instruction where this slow path is happening. HInvoke* const invoke_; diff --git a/compiler/optimizing/intrinsics_x86.cc b/compiler/optimizing/intrinsics_x86.cc index 424ac7c855..b04cc5cace 100644 --- a/compiler/optimizing/intrinsics_x86.cc +++ b/compiler/optimizing/intrinsics_x86.cc @@ -158,6 +158,8 @@ class IntrinsicSlowPathX86 : public SlowPathCodeX86 { __ jmp(GetExitLabel()); } + const char* GetDescription() const OVERRIDE { return "IntrinsicSlowPathX86"; } + private: // The instruction where this slow path is happening. HInvoke* const invoke_; diff --git a/compiler/optimizing/intrinsics_x86_64.cc b/compiler/optimizing/intrinsics_x86_64.cc index 891531435e..888c7b8037 100644 --- a/compiler/optimizing/intrinsics_x86_64.cc +++ b/compiler/optimizing/intrinsics_x86_64.cc @@ -149,6 +149,8 @@ class IntrinsicSlowPathX86_64 : public SlowPathCodeX86_64 { __ jmp(GetExitLabel()); } + const char* GetDescription() const OVERRIDE { return "IntrinsicSlowPathX86_64"; } + private: // The instruction where this slow path is happening. HInvoke* const invoke_; |