summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author John Reck <jreck@google.com> 2023-07-21 16:35:41 -0400
committer John Reck <jreck@google.com> 2023-07-21 16:36:33 -0400
commit2c9a2db8316d4bb8bcc803ccd2585d35de9dd48a (patch)
tree2ebfb60b5da286f5c5f081222467c8c558cda856
parent22d86f519c414278dac1cdd918d76ddf98562ac1 (diff)
Dump gralloc information in dumpsys gfxinfo
This is really handy information to have and even though it's not strictly speaking in the realm of what gfxinfo is responsible for, it's a good-enough place to shove it so why not Test: dumpsys gfxinfo com.android.systemui Change-Id: I11982eca9460a38471bbb4eab019b2335f6b13a4
-rw-r--r--libs/hwui/renderthread/RenderProxy.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/libs/hwui/renderthread/RenderProxy.cpp b/libs/hwui/renderthread/RenderProxy.cpp
index 224c878bf43d..f949dddd8b44 100644
--- a/libs/hwui/renderthread/RenderProxy.cpp
+++ b/libs/hwui/renderthread/RenderProxy.cpp
@@ -16,7 +16,13 @@
#include "RenderProxy.h"
+#include <SkBitmap.h>
+#include <SkImage.h>
+#include <SkPicture.h>
#include <gui/TraceUtils.h>
+#include <pthread.h>
+#include <ui/GraphicBufferAllocator.h>
+
#include "DeferredLayerUpdater.h"
#include "DisplayList.h"
#include "Properties.h"
@@ -29,12 +35,6 @@
#include "utils/Macros.h"
#include "utils/TimeUtils.h"
-#include <SkBitmap.h>
-#include <SkImage.h>
-#include <SkPicture.h>
-
-#include <pthread.h>
-
namespace android {
namespace uirenderer {
namespace renderthread {
@@ -323,6 +323,9 @@ void RenderProxy::dumpGraphicsMemory(int fd, bool includeProfileData, bool reset
}
});
}
+ std::string grallocInfo;
+ GraphicBufferAllocator::getInstance().dump(grallocInfo);
+ dprintf(fd, "%s\n", grallocInfo.c_str());
}
void RenderProxy::getMemoryUsage(size_t* cpuUsage, size_t* gpuUsage) {