Follow up to "Add ISA directory to image and odex pathnames."
Change-Id: I7f08cc3052fbed93a56ccf1ab7675ae8bc129da9
diff --git a/runtime/class_linker.h b/runtime/class_linker.h
index 22fd668..0811266 100644
--- a/runtime/class_linker.h
+++ b/runtime/class_linker.h
@@ -289,7 +289,7 @@
static bool VerifyOatFileChecksums(const OatFile* oat_file,
const char* dex_location,
uint32_t dex_location_checksum,
- const InstructionSet instruction_set,
+ InstructionSet instruction_set,
std::string* error_msg);
// TODO: replace this with multiple methods that allocate the correct managed type.
diff --git a/runtime/gc/heap.h b/runtime/gc/heap.h
index 3b071d1..9831861 100644
--- a/runtime/gc/heap.h
+++ b/runtime/gc/heap.h
@@ -144,7 +144,7 @@
size_t max_free, double target_utilization,
double foreground_heap_growth_multiplier, size_t capacity,
const std::string& original_image_file_name,
- const InstructionSet image_instruction_set,
+ InstructionSet image_instruction_set,
CollectorType foreground_collector_type, CollectorType background_collector_type,
size_t parallel_gc_threads, size_t conc_gc_threads, bool low_memory_mode,
size_t long_pause_threshold, size_t long_gc_threshold,
diff --git a/runtime/gc/space/image_space.h b/runtime/gc/space/image_space.h
index 622371f..1dc6c57 100644
--- a/runtime/gc/space/image_space.h
+++ b/runtime/gc/space/image_space.h
@@ -43,13 +43,13 @@
// 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, const InstructionSet image_isa)
+ static ImageSpace* Create(const char* image, InstructionSet image_isa)
SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
// Reads the image header from the specified image location for the
// instruction set image_isa.
static ImageHeader* ReadImageHeaderOrDie(const char* image_location,
- const InstructionSet image_isa);
+ InstructionSet image_isa);
// Releases the OatFile from the ImageSpace so it can be transfer to
// the caller, presumably the ClassLinker.
@@ -114,7 +114,7 @@
//
// Returns true if an image was found, false otherwise.
static bool FindImageFilename(const char* image_location,
- const InstructionSet image_isa,
+ InstructionSet image_isa,
std::string* location,
bool* is_system);
diff --git a/runtime/instruction_set.h b/runtime/instruction_set.h
index 1cea24b..679c575 100644
--- a/runtime/instruction_set.h
+++ b/runtime/instruction_set.h
@@ -35,7 +35,7 @@
};
std::ostream& operator<<(std::ostream& os, const InstructionSet& rhs);
-const char* GetInstructionSetString(const InstructionSet isa);
+const char* GetInstructionSetString(InstructionSet isa);
InstructionSet GetInstructionSetFromString(const char* instruction_set);
size_t GetInstructionSetPointerSize(InstructionSet isa);
diff --git a/runtime/utils.cc b/runtime/utils.cc
index 02b955a..c705701 100644
--- a/runtime/utils.cc
+++ b/runtime/utils.cc
@@ -1204,7 +1204,7 @@
return StringPrintf("%s/%s", cache_location, cache_file.c_str());
}
-static void InsertIsaDirectory(std::string* filename, const InstructionSet isa) {
+static void InsertIsaDirectory(const InstructionSet isa, std::string* filename) {
// in = /foo/bar/baz
// out = /foo/bar/<isa>/baz
size_t pos = filename->rfind('/');
@@ -1217,7 +1217,7 @@
// location = /system/framework/boot.art
// filename = /system/framework/<isa>/boot.art
std::string filename(location);
- InsertIsaDirectory(&filename, isa);
+ InsertIsaDirectory(isa, &filename);
return filename;
}
@@ -1226,7 +1226,7 @@
// odex_location = /foo/bar/<isa>/baz.odex
CHECK_GE(location.size(), 4U) << location; // must be at least .123
std::string odex_location(location);
- InsertIsaDirectory(&odex_location, isa);
+ InsertIsaDirectory(isa, &odex_location);
size_t dot_index = odex_location.size() - 3 - 1; // 3=dex or zip or apk
CHECK_EQ('.', odex_location[dot_index]) << location;
odex_location.resize(dot_index + 1);
diff --git a/runtime/utils.h b/runtime/utils.h
index 9de5d23..4a9236a 100644
--- a/runtime/utils.h
+++ b/runtime/utils.h
@@ -404,11 +404,11 @@
const char* cache_location);
// Returns the system location for an image
-std::string GetSystemImageFilename(const char* location, const InstructionSet isa);
+std::string GetSystemImageFilename(const char* location, InstructionSet isa);
// Returns an .odex file name next adjacent to the dex location.
// For example, for "/foo/bar/baz.jar", return "/foo/bar/<isa>/baz.odex".
-std::string DexFilenameToOdexFilename(const std::string& location, const InstructionSet isa);
+std::string DexFilenameToOdexFilename(const std::string& location, InstructionSet isa);
// Check whether the given magic matches a known file type.
bool IsZipMagic(uint32_t magic);