Add systrace output for dlclose/dlsym calls
Bug: http://b/27195126
Test: manual: adb shell atrace -t 5 bionic
and run bionic-unit-tests --gtest_filter=dl*
Change-Id: I9e93a069dd440bb643890d9952913938442ac375
diff --git a/linker/linker_soinfo.cpp b/linker/linker_soinfo.cpp
index 15f2502..1d59dbb 100644
--- a/linker/linker_soinfo.cpp
+++ b/linker/linker_soinfo.cpp
@@ -426,7 +426,8 @@
if (!constructors_called) {
return;
}
- TRACE("\"%s\": calling destructors", get_realpath());
+
+ ScopedTrace trace((std::string("calling destructors: ") + get_realpath()).c_str());
// DT_FINI_ARRAY must be parsed in reverse order.
call_array("DT_FINI_ARRAY", fini_array_, fini_array_count_, true, get_realpath());