summaryrefslogtreecommitdiffstats
path: root/patchoat
diff options
context:
space:
mode:
authorDavid Sehr <sehr@google.com>2018-03-02 12:01:51 -0800
committerDavid Sehr <sehr@google.com>2018-03-05 13:58:20 -0800
commitc431b9dc4b23cc950eb313695258df5d89f53b22 (patch)
tree422273559c3ae52caff0c6b1cf1a62a8312f0e26 /patchoat
parentf46f46cf5bd32788d5252b7107628a66594a5e98 (diff)
downloadart-c431b9dc4b23cc950eb313695258df5d89f53b22.tar.gz
art-c431b9dc4b23cc950eb313695258df5d89f53b22.tar.bz2
art-c431b9dc4b23cc950eb313695258df5d89f53b22.zip
Move most of runtime/base to libartbase/base
Enforce the layering that code in runtime/base should not depend on runtime by separating it into libartbase. Some of the code in runtime/base depends on the Runtime class, so it cannot be moved yet. Also, some of the tests depend on CommonRuntimeTest, which itself needs to be factored (in a subsequent CL). Bug: 22322814 Test: make -j 50 checkbuild make -j 50 test-art-host Change-Id: I8b096c1e2542f829eb456b4b057c71421b77d7e2
Diffstat (limited to 'patchoat')
-rw-r--r--patchoat/patchoat.cc6
-rw-r--r--patchoat/patchoat.h2
2 files changed, 5 insertions, 3 deletions
diff --git a/patchoat/patchoat.cc b/patchoat/patchoat.cc
index 0115772456..3df640902a 100644
--- a/patchoat/patchoat.cc
+++ b/patchoat/patchoat.cc
@@ -35,11 +35,14 @@
#include "base/file_utils.h"
#include "base/leb128.h"
#include "base/logging.h" // For InitLogging.
+#include "base/mutex.h"
#include "base/memory_tool.h"
+#include "base/os.h"
#include "base/scoped_flock.h"
#include "base/stringpiece.h"
#include "base/unix_file/fd_file.h"
#include "base/unix_file/random_access_file_utils.h"
+#include "base/utils.h"
#include "elf_file.h"
#include "elf_file_impl.h"
#include "elf_utils.h"
@@ -54,11 +57,9 @@
#include "mirror/reference.h"
#include "noop_compiler_callbacks.h"
#include "offsets.h"
-#include "os.h"
#include "runtime.h"
#include "scoped_thread_state_change-inl.h"
#include "thread.h"
-#include "utils.h"
namespace art {
@@ -1177,6 +1178,7 @@ static int patchoat_verify_image(TimingLogger& timings,
}
static int patchoat(int argc, char **argv) {
+ Locks::Init();
InitLogging(argv, Runtime::Abort);
MemMap::Init();
const bool debug = kIsDebugBuild;
diff --git a/patchoat/patchoat.h b/patchoat/patchoat.h
index feba523f56..2b1210b5b1 100644
--- a/patchoat/patchoat.h
+++ b/patchoat/patchoat.h
@@ -21,12 +21,12 @@
#include "base/enums.h"
#include "base/macros.h"
#include "base/mutex.h"
+#include "base/os.h"
#include "elf_file.h"
#include "elf_utils.h"
#include "gc/accounting/space_bitmap.h"
#include "gc/heap.h"
#include "gc/space/image_space.h"
-#include "os.h"
#include "runtime.h"
namespace art {