summaryrefslogtreecommitdiff
path: root/compiler/optimizing
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/optimizing')
-rw-r--r--compiler/optimizing/code_generator_mips.cc10
-rw-r--r--compiler/optimizing/code_generator_mips64.cc10
2 files changed, 18 insertions, 2 deletions
diff --git a/compiler/optimizing/code_generator_mips.cc b/compiler/optimizing/code_generator_mips.cc
index 855da2b18f..eb122b7781 100644
--- a/compiler/optimizing/code_generator_mips.cc
+++ b/compiler/optimizing/code_generator_mips.cc
@@ -1281,7 +1281,9 @@ void CodeGeneratorMIPS::GenerateFrameEntry() {
__ Bind(&frame_entry_label_);
if (GetCompilerOptions().CountHotnessInCompiledCode()) {
- LOG(WARNING) << "Unimplemented hotness update in mips backend";
+ __ Lhu(TMP, kMethodRegisterArgument, ArtMethod::HotnessCountOffset().Int32Value());
+ __ Addiu(TMP, TMP, 1);
+ __ Sh(TMP, kMethodRegisterArgument, ArtMethod::HotnessCountOffset().Int32Value());
}
bool do_overflow_check =
@@ -4027,6 +4029,12 @@ void InstructionCodeGeneratorMIPS::HandleGoto(HInstruction* got, HBasicBlock* su
HLoopInformation* info = block->GetLoopInformation();
if (info != nullptr && info->IsBackEdge(*block) && info->HasSuspendCheck()) {
+ if (codegen_->GetCompilerOptions().CountHotnessInCompiledCode()) {
+ __ Lw(AT, SP, kCurrentMethodStackOffset);
+ __ Lhu(TMP, AT, ArtMethod::HotnessCountOffset().Int32Value());
+ __ Addiu(TMP, TMP, 1);
+ __ Sh(TMP, AT, ArtMethod::HotnessCountOffset().Int32Value());
+ }
GenerateSuspendCheck(info->GetSuspendCheck(), successor);
return;
}
diff --git a/compiler/optimizing/code_generator_mips64.cc b/compiler/optimizing/code_generator_mips64.cc
index 8a06061c6a..f1bb5c15eb 100644
--- a/compiler/optimizing/code_generator_mips64.cc
+++ b/compiler/optimizing/code_generator_mips64.cc
@@ -1082,7 +1082,9 @@ void CodeGeneratorMIPS64::GenerateFrameEntry() {
__ Bind(&frame_entry_label_);
if (GetCompilerOptions().CountHotnessInCompiledCode()) {
- LOG(WARNING) << "Unimplemented hotness update in mips64 backend";
+ __ Lhu(TMP, kMethodRegisterArgument, ArtMethod::HotnessCountOffset().Int32Value());
+ __ Addiu(TMP, TMP, 1);
+ __ Sh(TMP, kMethodRegisterArgument, ArtMethod::HotnessCountOffset().Int32Value());
}
bool do_overflow_check =
@@ -3553,6 +3555,12 @@ void InstructionCodeGeneratorMIPS64::HandleGoto(HInstruction* got, HBasicBlock*
HLoopInformation* info = block->GetLoopInformation();
if (info != nullptr && info->IsBackEdge(*block) && info->HasSuspendCheck()) {
+ if (codegen_->GetCompilerOptions().CountHotnessInCompiledCode()) {
+ __ Ld(AT, SP, kCurrentMethodStackOffset);
+ __ Lhu(TMP, AT, ArtMethod::HotnessCountOffset().Int32Value());
+ __ Addiu(TMP, TMP, 1);
+ __ Sh(TMP, AT, ArtMethod::HotnessCountOffset().Int32Value());
+ }
GenerateSuspendCheck(info->GetSuspendCheck(), successor);
return;
}