Merge "Include core library jars in runtime apex."
diff --git a/build/apex/ld.config.txt b/build/apex/ld.config.txt
index 0129772..d5eb9fa 100644
--- a/build/apex/ld.config.txt
+++ b/build/apex/ld.config.txt
@@ -10,9 +10,13 @@
[runtime]
additional.namespaces = platform,conscrypt
-# Keep in sync with runtime namespace in /system/etc/ld.config.txt.
+# Keep in sync with the runtime namespace in /system/etc/ld.config.txt.
namespace.default.isolated = true
+# Visible because some libraries are dlopen'ed, e.g. libopenjdk is dlopen'ed by
+# libart.
+namespace.default.visible = true
namespace.default.search.paths = /apex/com.android.runtime/${LIB}
+namespace.default.asan.search.paths = /apex/com.android.runtime/${LIB}
# odex files are in /system/framework. dalvikvm has to be able to dlopen the
# files for CTS.
namespace.default.permitted.paths = /system/framework
@@ -20,9 +24,10 @@
# TODO(b/119867084): Restrict fallback to platform namespace to PALette library.
namespace.default.link.platform.allow_all_shared_libs = true
-# Keep in sync with default namespace in /system/etc/ld.config.txt.
+# Keep in sync with the default namespace in /system/etc/ld.config.txt.
namespace.platform.isolated = true
namespace.platform.search.paths = /system/${LIB}
+namespace.platform.asan.search.paths = /data/asan/system/${LIB}
namespace.platform.links = default
namespace.platform.link.default.shared_libs = libart.so:libartd.so
namespace.platform.link.default.shared_libs += libnativebridge.so
@@ -44,6 +49,7 @@
namespace.conscrypt.visible = true
namespace.conscrypt.search.paths = /apex/com.android.conscrypt/${LIB}
+namespace.conscrypt.asan.search.paths = /apex/com.android.conscrypt/${LIB}
namespace.conscrypt.links = platform
namespace.conscrypt.link.platform.shared_libs = libc.so
namespace.conscrypt.link.platform.shared_libs += libm.so
diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc
index 3b34e8d..42dbc77 100644
--- a/compiler/optimizing/optimizing_compiler.cc
+++ b/compiler/optimizing/optimizing_compiler.cc
@@ -1460,22 +1460,27 @@
const debug::MethodDebugInfo& info) {
const CompilerOptions& compiler_options = GetCompilerDriver()->GetCompilerOptions();
DCHECK(compiler_options.GenerateAnyDebugInfo());
+ TimingLogger logger("Generate JIT debug info logger", true, VLOG_IS_ON(jit));
+ {
+ TimingLogger::ScopedTiming st("Generate JIT debug info", &logger);
- // If both flags are passed, generate full debug info.
- const bool mini_debug_info = !compiler_options.GetGenerateDebugInfo();
+ // If both flags are passed, generate full debug info.
+ const bool mini_debug_info = !compiler_options.GetGenerateDebugInfo();
- // Create entry for the single method that we just compiled.
- std::vector<uint8_t> elf_file = debug::MakeElfFileForJIT(
- compiler_options.GetInstructionSet(),
- compiler_options.GetInstructionSetFeatures(),
- mini_debug_info,
- info);
- AddNativeDebugInfoForJit(Thread::Current(),
- reinterpret_cast<const void*>(info.code_address),
- elf_file,
- debug::PackElfFileForJIT,
- compiler_options.GetInstructionSet(),
- compiler_options.GetInstructionSetFeatures());
+ // Create entry for the single method that we just compiled.
+ std::vector<uint8_t> elf_file = debug::MakeElfFileForJIT(
+ compiler_options.GetInstructionSet(),
+ compiler_options.GetInstructionSetFeatures(),
+ mini_debug_info,
+ info);
+ AddNativeDebugInfoForJit(Thread::Current(),
+ reinterpret_cast<const void*>(info.code_address),
+ elf_file,
+ debug::PackElfFileForJIT,
+ compiler_options.GetInstructionSet(),
+ compiler_options.GetInstructionSetFeatures());
+ }
+ Runtime::Current()->GetJit()->AddTimingLogger(logger);
}
} // namespace art
diff --git a/runtime/Android.bp b/runtime/Android.bp
index a3081e9..b89eb02 100644
--- a/runtime/Android.bp
+++ b/runtime/Android.bp
@@ -396,10 +396,8 @@
"libnativeloader",
"libbacktrace",
"liblog",
- // For atrace, properties, ashmem.
+ // For atrace, properties, ashmem, set_sched_policy.
"libcutils",
- // For set_sched_policy.
- "libprocessgroup",
// For common macros.
"libbase",
],
diff --git a/runtime/thread_android.cc b/runtime/thread_android.cc
index 24864f9..8ff6c52 100644
--- a/runtime/thread_android.cc
+++ b/runtime/thread_android.cc
@@ -21,7 +21,7 @@
#include <sys/resource.h>
#include <sys/time.h>
-#include <processgroup/sched_policy.h>
+#include <cutils/sched_policy.h>
#include <utils/threads.h>
#include "base/macros.h"
diff --git a/tools/hiddenapi/hiddenapi.cc b/tools/hiddenapi/hiddenapi.cc
index 97fbcbf..f426d02 100644
--- a/tools/hiddenapi/hiddenapi.cc
+++ b/tools/hiddenapi/hiddenapi.cc
@@ -974,11 +974,8 @@
auto fn_shared = [&](const DexMember& boot_member) {
auto it = api_list.find(boot_member.GetApiEntry());
bool api_list_found = (it != api_list.end());
- // TODO: Fix ART buildbots and turn this into a CHECK.
- if (force_assign_all_ && !api_list_found) {
- LOG(WARNING) << "Could not find hiddenapi flags for dex entry: "
- << boot_member.GetApiEntry();
- }
+ CHECK(!force_assign_all_ || api_list_found)
+ << "Could not find hiddenapi flags for dex entry: " << boot_member.GetApiEntry();
builder.WriteFlags(api_list_found ? it->second : ApiList::Whitelist());
};
auto fn_field = [&](const ClassAccessor::Field& boot_field) {