diff options
author | Ian Rogers <irogers@google.com> | 2013-10-13 10:44:14 -0700 |
---|---|---|
committer | Ian Rogers <irogers@google.com> | 2013-10-21 17:01:11 -0700 |
commit | 8d31bbd3d6536de12bc20e3d29cfe03fe848f9da (patch) | |
tree | 2373ae08ddddaf1034623df85d647ecf9ac6c831 /runtime/base | |
parent | 57e6d8a99058e5c74d5244b68a5f4d53526fa108 (diff) | |
download | art-8d31bbd3d6536de12bc20e3d29cfe03fe848f9da.zip art-8d31bbd3d6536de12bc20e3d29cfe03fe848f9da.tar.gz art-8d31bbd3d6536de12bc20e3d29cfe03fe848f9da.tar.bz2 |
Throw IOException at source of failing to open a dex file.
Before is:
java.lang.ClassNotFoundException: Didn't find class "GCBench" on path: DexPathList[[zip file "/disk2/dalvik-dev/out/host/linux-x86/framework/GCBench.jar"],nativeLibraryDirectories=[/disk2/dalvik-dev/out/host/linux-x86/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
Suppressed: java.lang.ClassNotFoundException: GCBench
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 1 more
Caused by: java.lang.NoClassDefFoundError: Class "LGCBench;" not found
... 5 more
And after is:
java.lang.ClassNotFoundException: Didn't find class "GCBench" on path: DexPathList[[zip file "/disk2/dalvik-dev/out/host/linux-x86/framework/GCBench.jar"],nativeLibraryDirectories=[/disk2/dalvik-dev/out/host/linux-x86/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
Suppressed: java.io.IOException: Zip archive '/disk2/dalvik-dev/out/host/linux-x86/framework/GCBench.jar' doesn't contain classes.dex
at dalvik.system.DexFile.openDexFile(Native Method)
at dalvik.system.DexFile.<init>(DexFile.java:80)
at dalvik.system.DexFile.<init>(DexFile.java:59)
at dalvik.system.DexPathList.loadDexFile(DexPathList.java:268)
at dalvik.system.DexPathList.makeDexElements(DexPathList.java:235)
at dalvik.system.DexPathList.<init>(DexPathList.java:113)
at dalvik.system.BaseDexClassLoader.<init>(BaseDexClassLoader.java:48)
at dalvik.system.PathClassLoader.<init>(PathClassLoader.java:38)
at java.lang.ClassLoader.createSystemClassLoader(ClassLoader.java:128)
at java.lang.ClassLoader.access$000(ClassLoader.java:65)
at java.lang.ClassLoader$SystemClassLoader.<clinit>(ClassLoader.java:81)
at java.lang.ClassLoader.getSystemClassLoader(ClassLoader.java:137)
Suppressed: java.lang.ClassNotFoundException: GCBench
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 1 more
Caused by: java.lang.NoClassDefFoundError: Class "LGCBench;" not found
... 5 more
Also, move dex file verifier messages out of logs.
In the process the ClassLinker::dex_lock_ needed tidying to cover a smaller
scope. Bug 11301553.
Change-Id: I80058652e11e7ea63457cc01a0cb48afe1c15543
Diffstat (limited to 'runtime/base')
-rw-r--r-- | runtime/base/macros.h | 2 | ||||
-rw-r--r-- | runtime/base/unix_file/fd_file.cc | 4 | ||||
-rw-r--r-- | runtime/base/unix_file/fd_file.h | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/runtime/base/macros.h b/runtime/base/macros.h index 6531858..d00c64a 100644 --- a/runtime/base/macros.h +++ b/runtime/base/macros.h @@ -138,8 +138,10 @@ char (&ArraySizeHelper(T (&array)[N]))[N]; #if defined (__APPLE__) #define HOT_ATTR +#define COLD_ATTR #else #define HOT_ATTR __attribute__ ((hot)) +#define COLD_ATTR __attribute__ ((cold)) #endif #define PURE __attribute__ ((__pure__)) diff --git a/runtime/base/unix_file/fd_file.cc b/runtime/base/unix_file/fd_file.cc index 36f8ba7..f48c76d 100644 --- a/runtime/base/unix_file/fd_file.cc +++ b/runtime/base/unix_file/fd_file.cc @@ -102,10 +102,6 @@ bool FdFile::IsOpened() const { return fd_ >= 0; } -std::string FdFile::GetPath() const { - return file_path_; -} - bool FdFile::ReadFully(void* buffer, int64_t byte_count) { char* ptr = static_cast<char*>(buffer); while (byte_count > 0) { diff --git a/runtime/base/unix_file/fd_file.h b/runtime/base/unix_file/fd_file.h index 79a0db9..19e3511 100644 --- a/runtime/base/unix_file/fd_file.h +++ b/runtime/base/unix_file/fd_file.h @@ -57,7 +57,9 @@ class FdFile : public RandomAccessFile { // Bonus API. int Fd() const; bool IsOpened() const; - std::string GetPath() const; + const std::string& GetPath() const { + return file_path_; + } void DisableAutoClose(); bool ReadFully(void* buffer, int64_t byte_count); bool WriteFully(const void* buffer, int64_t byte_count); |