From a59af8aeaad8fe7d68d8f8de63eab9cf85b6ab31 Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Wed, 27 Nov 2019 17:42:32 +0000 Subject: JIT baseline: trigger optimized compilation on hotness threshold. - Add a new hotness count in the ProfilingInfo to not conflict with interpreter hotness which may use it for OSR. - Add a baseline flag in the OatQuickMethodHeader to identify baseline compiled methods. - Add a -Xusetieredjit flag to experiment and test. Bug: 119800099 Test: test.py with Xusetieredjit to true Change-Id: I8512853f869f1312e3edc60bf64413dee9143c52 --- compiler/optimizing/stack_map_stream.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'compiler/optimizing/stack_map_stream.cc') diff --git a/compiler/optimizing/stack_map_stream.cc b/compiler/optimizing/stack_map_stream.cc index 3f6010d7af..dd6d1a2959 100644 --- a/compiler/optimizing/stack_map_stream.cc +++ b/compiler/optimizing/stack_map_stream.cc @@ -42,7 +42,8 @@ void StackMapStream::SetStackMapNativePcOffset(size_t i, uint32_t native_pc_offs void StackMapStream::BeginMethod(size_t frame_size_in_bytes, size_t core_spill_mask, size_t fp_spill_mask, - uint32_t num_dex_registers) { + uint32_t num_dex_registers, + bool baseline) { DCHECK(!in_method_) << "Mismatched Begin/End calls"; in_method_ = true; DCHECK_EQ(packed_frame_size_, 0u) << "BeginMethod was already called"; @@ -52,6 +53,7 @@ void StackMapStream::BeginMethod(size_t frame_size_in_bytes, core_spill_mask_ = core_spill_mask; fp_spill_mask_ = fp_spill_mask; num_dex_registers_ = num_dex_registers; + baseline_ = baseline; if (kVerifyStackMaps) { dchecks_.emplace_back([=](const CodeInfo& code_info) { @@ -299,6 +301,7 @@ ScopedArenaVector StackMapStream::Encode() { DCHECK(in_inline_info_ == false) << "Mismatched Begin/End calls"; uint32_t flags = (inline_infos_.size() > 0) ? CodeInfo::kHasInlineInfo : 0; + flags |= baseline_ ? CodeInfo::kIsBaseline : 0; uint32_t bit_table_flags = 0; ForEachBitTable([&bit_table_flags](size_t i, auto bit_table) { if (bit_table->size() != 0) { // Record which bit-tables are stored. -- cgit v1.2.3-59-g8ed1b