Avoid the warning heapprofd_client_api.so does not include an
initialization function.
Since heapprofd_client_api.so is not an ART plugin change the code to
remove that and cleanup.
Test: Passing Tests
Local Testing
Bug: 183123789
Change-Id: I60ae00d7628a4b54664dbd27b50624e358928095
diff --git a/runtime/runtime.cc b/runtime/runtime.cc
index f6429f8..572e071 100644
--- a/runtime/runtime.cc
+++ b/runtime/runtime.cc
@@ -1108,12 +1108,8 @@
if (IsPerfettoJavaHeapStackProfEnabled() &&
(Dbg::IsJdwpAllowed() || IsProfileable() || IsProfileableFromShell() || IsJavaDebuggable() ||
Runtime::Current()->IsSystemServer())) {
- std::string err;
+ // Marker used for dev tracing similar to above markers.
ScopedTrace tr("perfetto_javaheapprof init.");
- ScopedThreadSuspension sts(Thread::Current(), ThreadState::kNative);
- if (!EnsurePerfettoJavaHeapProfPlugin(&err)) {
- LOG(WARNING) << "Failed to load perfetto_javaheapprof: " << err;
- }
}
if (Runtime::Current()->IsSystemServer()) {
std::string err;
@@ -1902,14 +1898,6 @@
// subsequent dlopens for the library no-ops.
dlopen(plugin_name, RTLD_NOW | RTLD_LOCAL);
}
- if (IsZygote() && IsPerfettoJavaHeapStackProfEnabled()) {
- // There is no debug build of heapprofd_client_api.so currently.
- // Add debug build .so when available.
- constexpr const char* jhp_plugin_name = "heapprofd_client_api.so";
- // Load eagerly in Zygote to improve app startup times. This will make
- // subsequent dlopens for the library no-ops.
- dlopen(jhp_plugin_name, RTLD_NOW | RTLD_LOCAL);
- }
VLOG(startup) << "Runtime::Init exiting";
@@ -1954,13 +1942,6 @@
return EnsurePluginLoaded(plugin_name, error_msg);
}
-bool Runtime::EnsurePerfettoJavaHeapProfPlugin(std::string* error_msg) {
- // There is no debug build of heapprofd_client_api.so currently.
- // Add debug build .so when available.
- constexpr const char* jhp_plugin_name = "heapprofd_client_api.so";
- return EnsurePluginLoaded(jhp_plugin_name, error_msg);
-}
-
static bool EnsureJvmtiPlugin(Runtime* runtime,
std::string* error_msg) {
// TODO Rename Dbg::IsJdwpAllowed is IsDebuggingAllowed.
diff --git a/runtime/runtime.h b/runtime/runtime.h
index 8513cd5..6f11916 100644
--- a/runtime/runtime.h
+++ b/runtime/runtime.h
@@ -132,7 +132,6 @@
bool EnsurePluginLoaded(const char* plugin_name, std::string* error_msg);
bool EnsurePerfettoPlugin(std::string* error_msg);
- bool EnsurePerfettoJavaHeapProfPlugin(std::string* error_msg);
// IsAotCompiler for compilers that don't have a running runtime. Only dex2oat currently.
bool IsAotCompiler() const {