OSDN Git Service

resolve merge conflicts of 7a2ff82b29 to nyc-dev-plus-aosp
authorCalin Juravle <calin@google.com>
Thu, 3 Mar 2016 11:50:37 +0000 (11:50 +0000)
committerCalin Juravle <calin@google.com>
Thu, 3 Mar 2016 11:50:37 +0000 (11:50 +0000)
Change-Id: Ibbd4c6e39b1e30aa1aec7ff6edb0b9a01c585fb3

1  2 
dex2oat/dex2oat.cc
runtime/oat_file.h

@@@ -2581,25 -2569,16 +2576,20 @@@ static int dex2oat(int argc, char** arg
  
    TimingLogger timings("compiler", false, false);
  
 -  Dex2Oat dex2oat(&timings);
 +  // Allocate `dex2oat` on the heap instead of on the stack, as Clang
 +  // might produce a stack frame too large for this function or for
 +  // functions inlining it (such as main), that would not fit the
 +  // requirements of the `-Wframe-larger-than` option.
 +  std::unique_ptr<Dex2Oat> dex2oat = MakeUnique<Dex2Oat>(&timings);
  
    // Parse arguments. Argument mistakes will lead to exit(EXIT_FAILURE) in UsageError.
 -  dex2oat.ParseArgs(argc, argv);
 +  dex2oat->ParseArgs(argc, argv);
  
-   // Process profile information and assess if we need to do a profile guided compilation.
+   // If needed, process profile information for profile guided compilation.
    // This operation involves I/O.
 -  if (dex2oat.UseProfileGuidedCompilation()) {
 -    if (!dex2oat.LoadProfile()) {
 +  if (dex2oat->UseProfileGuidedCompilation()) {
-     if (dex2oat->LoadProfile()) {
-       if (!dex2oat->ShouldCompileBasedOnProfiles()) {
-         LOG(INFO) << "Skipped compilation because of insignificant profile delta";
-         return EXIT_SUCCESS;
-       }
-     } else {
-       LOG(WARNING) << "Failed to process profile files";
++    if (!dex2oat->LoadProfile()) {
+       LOG(ERROR) << "Failed to process profile file";
        return EXIT_FAILURE;
      }
    }
Simple merge