summaryrefslogtreecommitdiff
path: root/libs/hwui/renderthread/RenderProxy.cpp
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2017-01-19 15:56:21 -0800
committerJohn Reck <jreck@google.com>2017-02-21 09:49:10 -0800
commitdf1742ed47da1e9b61afeae16fa448d5302a8aa0 (patch)
tree7986faf156f39bbe218ab13bad3ae5a1ea3dd581 /libs/hwui/renderthread/RenderProxy.cpp
parentf8a420097e54a369d3bd1aa152ea0eea58ff5c94 (diff)
Overhaul GraphicsStatsService
* 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
Diffstat (limited to 'libs/hwui/renderthread/RenderProxy.cpp')
-rw-r--r--libs/hwui/renderthread/RenderProxy.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/libs/hwui/renderthread/RenderProxy.cpp b/libs/hwui/renderthread/RenderProxy.cpp
index 11614fa144e3..f4a4773b2937 100644
--- a/libs/hwui/renderthread/RenderProxy.cpp
+++ b/libs/hwui/renderthread/RenderProxy.cpp
@@ -487,9 +487,22 @@ CREATE_BRIDGE2(setProcessStatsBuffer, RenderThread* thread, int fd) {
void RenderProxy::setProcessStatsBuffer(int fd) {
SETUP_TASK(setProcessStatsBuffer);
- args->thread = &mRenderThread;
+ auto& rt = RenderThread::getInstance();
+ args->thread = &rt;
args->fd = dup(fd);
- post(task);
+ rt.queue(task);
+}
+
+CREATE_BRIDGE1(rotateProcessStatsBuffer, RenderThread* thread) {
+ args->thread->jankTracker().rotateStorage();
+ return nullptr;
+}
+
+void RenderProxy::rotateProcessStatsBuffer() {
+ SETUP_TASK(rotateProcessStatsBuffer);
+ auto& rt = RenderThread::getInstance();
+ args->thread = &rt;
+ rt.queue(task);
}
int RenderProxy::getRenderThreadTid() {