Ignore ART frames in fdtrack traces.
Trying to find a leak this year, it was very annoying that our traces
were mostly filled with "junk" frames from the JNI implementation,
making it quite a struggle to see what the actual calling code was...
Bug: http://b/236197847
Test: treehugger
Change-Id: I69e7d9b6432e1872e238168ebf3dc36feb7de7df
diff --git a/libfdtrack/fdtrack.cpp b/libfdtrack/fdtrack.cpp
index 2d114f2..b064401 100644
--- a/libfdtrack/fdtrack.cpp
+++ b/libfdtrack/fdtrack.cpp
@@ -71,7 +71,11 @@
static constexpr size_t kStackDepth = 32;
// Skip any initial frames from libfdtrack.so.
-static std::vector<std::string> kSkipFdtrackLib [[clang::no_destroy]] = {"libfdtrack.so"};
+// Also ignore frames from ART (http://b/236197847) because we'd rather spend
+// our precious few frames on the actual Java calling code rather than the
+// implementation of JNI!
+static std::vector<std::string> kSkipFdtrackLib
+ [[clang::no_destroy]] = {"libfdtrack.so", "libart.so"};
static bool installed = false;
static std::array<FdEntry, kFdTableSize> stack_traces [[clang::no_destroy]];