OSDN Git Service

ART: Do not produce CFI when not asked for
authorAndreas Gampe <agampe@google.com>
Wed, 4 Mar 2015 22:00:56 +0000 (14:00 -0800)
committerAndreas Gampe <agampe@google.com>
Wed, 4 Mar 2015 22:55:17 +0000 (14:55 -0800)
Insignificant time savings on the host, but also reduces native
allocation size.

Change-Id: Iea3d335e5375a0076306059d094e5b994e24b9e6

compiler/dex/quick/codegen_util.cc

index 0be9fd4..0bac511 100644 (file)
@@ -1067,7 +1067,10 @@ CompiledMethod* Mir2Lir::GetCompiledMethod() {
     return lhs.LiteralOffset() < rhs.LiteralOffset();
   });
 
-  std::unique_ptr<std::vector<uint8_t>> cfi_info(ReturnFrameDescriptionEntry());
+  std::unique_ptr<std::vector<uint8_t>> cfi_info(
+      cu_->compiler_driver->GetCompilerOptions().GetGenerateGDBInformation() ?
+          ReturnFrameDescriptionEntry() :
+          nullptr);
   ArrayRef<const uint8_t> cfi_ref;
   if (cfi_info.get() != nullptr) {
     cfi_ref = ArrayRef<const uint8_t>(*cfi_info);