Skip to content
Commit 90516b92 authored by Stanislav Zholnin's avatar Stanislav Zholnin
Browse files

Stack Trace sampling and reporting.

Sampling is done in cycles where length of single cycle is
configurable server side.
During one sampling cycle only one stack trace / message is reported.

Two sampling strategies are used in this CL.

1. Sampling uniformly packages and appops, and waiting only for
messages coming from sampled package (all other packages are
silenced to presereve system resources). All appops are recorded,
but sampled appop has preference and replaces any previous stack
trace / message. This strategy is created to focus on all packages
and all apps uniformly.

2. Creating list of rarely used packages - packages which were not
using any dangerous permissions for more than a week. Any newly
installed app is automatically added to this list, including apps
which were updated. Whenever message is received for rarely used
package, there is 50% probability that this message will replace
whatever is being sampled in current sampling cycle. This strategy
is created to focus on newly installed apps, on apps which are used
infrequently and on apps which use dangerous permissions infrequently.

Bug:136134050
Test: atest android.app.appops.cts.RuntimeMessageCollectionTest
Change-Id: I3109b38bf0482481acf945d5441a26bfe704c9b5
parent f11642db
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