Additional tracing and performance improvements.

When debugging is enabled, emit the method name being called for all
outgoing Binder transactions.  This identified invalidateFuseDentry()
was calling StorageManager APIs too aggressively, so we introduce
sCachedVolumePathToId to answer its questions from a local cache.

Add tracing showing begin/end of SQLite transactions, along with the
overall scope of the transaction.  This identified that insertFile()
was doing getParent() work with a separate transaction, so we merge
that into the main transaction.

Bug: 152005629
Test: atest --test-mapping packages/providers/MediaProvider
Change-Id: I61e62ed773f4dc1a10acf7033848197d54d2ecf5
3 files changed