Improve logging around performance critical events
bug:17702227
Add details useful to developers (such as layer size/View name), and
switch away from logging implementation names/details, since they
are generally not relevant to developers.
Change-Id: Iee605d182f241450f7e75a6d0c283d51fa1312f5
diff --git a/libs/hwui/LayerRenderer.cpp b/libs/hwui/LayerRenderer.cpp
index 394c647..83f9c6a 100644
--- a/libs/hwui/LayerRenderer.cpp
+++ b/libs/hwui/LayerRenderer.cpp
@@ -27,6 +27,7 @@
#include "Matrix.h"
#include "Properties.h"
#include "Rect.h"
+#include "utils/TraceUtils.h"
namespace android {
namespace uirenderer {
@@ -185,7 +186,7 @@
///////////////////////////////////////////////////////////////////////////////
Layer* LayerRenderer::createRenderLayer(RenderState& renderState, uint32_t width, uint32_t height) {
- ATRACE_CALL();
+ ATRACE_FORMAT("Allocate %ux%u HW Layer", width, height);
LAYER_RENDERER_LOGD("Requesting new render layer %dx%d", width, height);
Caches& caches = Caches::getInstance();
@@ -310,7 +311,7 @@
void LayerRenderer::destroyLayer(Layer* layer) {
if (layer) {
- ATRACE_CALL();
+ ATRACE_FORMAT("Destroy %ux%u HW Layer", layer->getWidth(), layer->getHeight());
LAYER_RENDERER_LOGD("Recycling layer, %dx%d fbo = %d",
layer->getWidth(), layer->getHeight(), layer->getFbo());