Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 23e59a07 authored by Lee Shombert's avatar Lee Shombert
Browse files

Allow selective detailed dumps of caches

Bug: 227383489

'dumpsys cacheinfo' can now dump more information about caches, by
supplying arguments to the command.  If no switches are specified
then the behavior is unchanged from the baseline.  If any switches are
specified then zero or more caches are selected; the command dumps
statistics and content for every selected cache.

The four switches each include a key string.

 The switch             Selects a cache if
 ---------------------  ------------------
 -name-has=<key>        the cache name contains the key
 -property-has=<key>    the property name contains the key
 -name-like=<regex>     the cache name matches the regex key
 -property-like=<regex> the property name matches the regex key

Tested by running the following commands and manually verifying the
output.

  dumpsys cacheinfo com.android.systemui
  dumpsys cacheinfo com.android.systemui -name-has=OrganizationOwned
  dumpsys cacheinfo com.android.systemui -name-like=OrganizationOwned
     - no results, as this regex does not match any cache
  dumpsys cacheinfo com.android.systemui -name-like=.*OrganizationOwned.*
  dumpsys cacheinfo com.android.systemui -property-has=package_info
  dumpsys cacheinfo com.android.systemui -property-like=cache_key.package.*

Test:
 * atest FrameworksCoreTests:IpcDataCacheTest
 * atest FrameworksCoreTests:PropertyInvalidatedCacheTests

Change-Id: I141d7e85ba3ea8b0f2615bbd49537c1170fb5449
parent b5310919
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment