Use instruction specific dalvik cache dirs.
- All oat & art files are now placed under /data/dalvik-cache/<isa>/.
- GetDalvikCacheOrDie now requires a mandatory subdirectory argument,
and is implicitly rooted under /data/.
- Added helper methods to convert InstructionSet enums into strings
and vice versa.
(cherry picked from commit 2974bc3d8a5d161d449dd66826d668d87bdc3cbe)
Change-Id: Ic7986938e6a7091a2af675ebafec768f7b5fb8cd
diff --git a/runtime/gc/space/image_space.h b/runtime/gc/space/image_space.h
index f6daf89..1652ec9 100644
--- a/runtime/gc/space/image_space.h
+++ b/runtime/gc/space/image_space.h
@@ -18,6 +18,7 @@
#define ART_RUNTIME_GC_SPACE_IMAGE_SPACE_H_
#include "gc/accounting/space_bitmap.h"
+#include "runtime.h"
#include "space.h"
namespace art {
@@ -34,15 +35,16 @@
return kSpaceTypeImageSpace;
}
- // Create a Space from an image file. Cannot be used for future
- // allocation or collected.
+ // Create a Space from an image file for a specified instruction
+ // set. Cannot be used for future allocation or collected.
//
// Create also opens the OatFile associated with the image file so
// that it be contiguously allocated with the image before the
// creation of the alloc space. The ReleaseOatFile will later be
// used to transfer ownership of the OatFile to the ClassLinker when
// it is initialized.
- static ImageSpace* Create(const char* image) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
+ static ImageSpace* Create(const char* image, const InstructionSet image_isa)
+ SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
// Releases the OatFile from the ImageSpace so it can be transfer to
// the caller, presumably the ClassLinker.