Move GraphicsStatsService to android.graphics package.
Move GraphicsStatsService JNI from libservices.core to
libandroid_runtime.
Declare GraphicsStatsService ctor as the only @SystemApi.
Remove MemoryFile usage from GraphicsStatsService, but use
SharedMemory and other SDK APIs instead. This is done to
avoid using unstable API MemoryFile.getFileDescriptor.
Propose new SharedMemory.getFdDup API for next release, which
is hidden for now.
Refactor statsd puller to avoid proto serialization by moving
data directly into AStatsEventList.
"libprotoutil" is added as a static dependancy to libhwui, which
should be fine because its implementation does not link anything.
Bug: 146353313
Test: Ran "adb shell cmd stats pull-source 10068"
Test: Passed unit tests and GraphicsStatsValidationTest CTS
Change-Id: If16c5addbd519cba33e03bd84ac312595032e0e1
Add atom definition for HWUI stats. Implement a C++
statsd puller inside GraphicsStatsService service.
GraphicsStatsService has new private API, which
returns a serialized proto with HWUI stats grouped
by application package and version.
Test: Ran "adb shell cmd stats pull-source 10068"
Test: Ran "statsd_testdrive 10068" and it looks OK
Bug: 142665516
Change-Id: I400c0dbf9e25181d36f9018688b03d86839ac3de
Protobuf 3.9.1 redefines google::protobuf::uint64 from unsigned long
long to uint64_t, which is sometimes unsigned long and sometimes
unsigned long long. Use PRIu64 to print it, and add an implementation
of ProtoOutputStream::write for long.
Bug: 117607748
Test: m checkbuild
Exempt-From-Owner-Approval: approved at https://android-review.googlesource.com/q/Ib2d3f4e17857f8ccbbe342ce6678e76b591df510
Change-Id: Ib2d3f4e17857f8ccbbe342ce6678e76b591df510
* Add explicit to conversion constructors/operators
* Use NOLINT or NOLINTNEXTLINE to suppress warnings on intended converters
Bug: 28341362
Test: make with WITH_TIDY=1 DEFAULT_GLOBAL_TIDY_CHECKS=-*,google-explicit-constructor
Change-Id: I8c6ebb99679b0a71251024d70a13f8164e67db5e
Protobuf 3.5.2 redefines google::protobuf::uint64 from unsigned long
long to uint64_t, which is sometimes unsigned long and sometimes
unsigned long long. Use PRIu64 to print it, and add an implementation
of ProtoOutputStream::write for long.
Bug: 117607748
Test: m checkbuild
Change-Id: I48912f58e2f63f4a98c3aefaa4f78cc2c719bb68
Creating a copy of the graphicsstats proto so that one can be tagged
with privacy annotations and the other can be used internally while
still using the protobuf-cpp-lite library.
Bug: 72570104
Test: flash device and check incident output
Merged-In: I2d72e7bd17689c1401a16d5a13956e6528ddb525
Change-Id: I0a46ee6cc463b133925be1cf8dee8cf3d107930c
This reverts commit a6d8fbf4ea634f5f605b2b7db3ca98975f8625b5.
Fixes an out-of-bounds read in COMPARISONS by switching up
how comparisons works. Instead of requiring all jank types
to have an associated COMPARISON's entry, which kHighInputLatency
and kMissedDeadline don't, instead have each
COMPARISON indicate which JankType it applies to so it can
be independently sized from JankTypes.
Bug: 70220906
Bug: 75566601
Test: launching & using maps works
Change-Id: I7fd90daeb320b4627e42c3418c89726d860998c1
This reverts commit 09979fbee7201b46158c2c033194529e4284ea13.
Reason for revert: Based on stacktraces and change history, I think this is causing a cluster of P crashes.
https://b.corp.google.com/issues?q=(%22android%22%20%22:uirenderer::JankTracker::finishFrame%22)
Bug: 75566601
Bug: 75811585
Bug: 75407175
Bug: 75736222
Bug: 75391447
Bug: 75659839
Change-Id: I59a8c2d8906d347210c77fb3628f5801bc299bfb
As graphicsstats can be subjected to data coming
from the disk and is in system_server we want
to bias towards best-effort instead of strict
no-errors that the rest of HWUI typically uses.
So treat any dump/merge of graphics stats as
best effort, ignoring any errors that occur.
Bug: 65652900
Test: verified 'dumpsys graphicsstats' still works
Change-Id: Ia9b91b745c2a9aedad2f22e3087e1d4bf37a1135
Move ProfileData out to its own file with helper
accessors. This keeps policy (what is/isn't jank)
outside of the data storage.
Also use lambdas to iterate over the histogram
to make it nicer for dumping & proto-ifying.
Test: hwui_unit_tests pass & jank data still dumps
Change-Id: I88488369ec77590a2867f51128e65bb786aa34e6
Fixes: 36272398
Protobuf lite isn't just smaller, it also doesn't
have the problematic DescriptorPool at all. So no
need to switch this to a shared library.
Test: hwui_unit_test passes and doesn't crash. CTS incident tests pass
as well
Change-Id: I2693ba2c47af89a5c561c4f63cc7e1f509ebbbec
* LRU cache of recently-used is dead, replaced
disk storage
* ASHMEM size is read from native by the system service,
no longer requires keeping a sizeof() in sync with a
constant in Java
* Supports dumping in proto format by passing --proto
* Rotates logs on a daily basis
* Keeps a history of the most recent 3 days
Bug: 33705836
Test: Manual. Verified log rotating works by setting it up to
rotate every minute instead of day. Confirmed /data/system/graphicsstats
only has the most recent 3 entries after several minutes
Change-Id: Ib84bafb26c58701cc86f123236de4fff01aaa4aa