diff --git a/java/com/facebook/soloader/SoLoader.java b/java/com/facebook/soloader/SoLoader.java index fc15031..949c59c 100644 --- a/java/com/facebook/soloader/SoLoader.java +++ b/java/com/facebook/soloader/SoLoader.java @@ -986,7 +986,7 @@ private static boolean loadLibraryBySoNameImpl( if (!loaded) { try { LogUtil.d(TAG, "About to load: " + soName); - doLoadLibraryBySoName(soName, loadFlags, oldPolicy); + doLoadLibraryBySoName(soName, shortName, loadFlags, oldPolicy); } catch (UnsatisfiedLinkError ex) { String message = ex.getMessage(); if (message != null && message.contains("unexpected e_machine:")) { @@ -1074,7 +1074,10 @@ public static File unpackLibraryAndDependencies(String shortName) throws Unsatis } private static void doLoadLibraryBySoName( - String soName, int loadFlags, @Nullable StrictMode.ThreadPolicy oldPolicy) + String soName, + @Nullable String shortName, + int loadFlags, + @Nullable StrictMode.ThreadPolicy oldPolicy) throws UnsatisfiedLinkError { sSoSourcesLock.readLock().lock(); try { @@ -1096,6 +1099,9 @@ private static void doLoadLibraryBySoName( } if (SYSTRACE_LIBRARY_LOADING) { + if (shortName != null) { + Api18TraceUtils.beginTraceSection("SoLoader.loadLibrary[", shortName, "]"); + } Api18TraceUtils.beginTraceSection("SoLoader.loadLibrary[", soName, "]"); } @@ -1120,6 +1126,9 @@ private static void doLoadLibraryBySoName( } } finally { if (SYSTRACE_LIBRARY_LOADING) { + if (shortName != null) { + Api18TraceUtils.endSection(); + } Api18TraceUtils.endSection(); }