diff options
author | John Reck <jreck@google.com> | 2021-05-11 17:04:54 -0400 |
---|---|---|
committer | John Reck <jreck@google.com> | 2021-05-11 17:06:53 -0400 |
commit | 66e06d4ff1e238e077f29294452325f7b4f7be1c (patch) | |
tree | 67eb988090bfb0d987e5922a85449e192a53c667 /libs/hwui/tests/macrobench/TestSceneRunner.cpp | |
parent | 3a8ea8727d703d8f0b790874cd6e63c87cc3f56b (diff) |
Macrobenchmark tweaks & gpu memory dumping
Add support for glob matching
Ensure glob matches are alphabetically sorted
Add feature to dump GPU memory usage after a test pass
Adjust gpu memory dump to be a bit more compact (skip empty outputs)
Test: this
Bug: 187718492
Change-Id: I6dc80b2d3379d8d10001116e1240727d9914bc10
Diffstat (limited to 'libs/hwui/tests/macrobench/TestSceneRunner.cpp')
-rw-r--r-- | libs/hwui/tests/macrobench/TestSceneRunner.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libs/hwui/tests/macrobench/TestSceneRunner.cpp b/libs/hwui/tests/macrobench/TestSceneRunner.cpp index cf9b0c5536fc..9d3b732d75c3 100644 --- a/libs/hwui/tests/macrobench/TestSceneRunner.cpp +++ b/libs/hwui/tests/macrobench/TestSceneRunner.cpp @@ -162,6 +162,11 @@ static void doRun(const TestScene::Info& info, const TestScene::Options& opts, i void run(const TestScene::Info& info, const TestScene::Options& opts, benchmark::BenchmarkReporter* reporter) { + if (opts.reportGpuMemoryUsage) { + // If we're reporting GPU memory usage we need to first start with a clean slate + // All repetitions of the same test will share a single memory usage report + RenderProxy::trimMemory(100); + } BenchmarkResults results; for (int i = 0; i < opts.repeatCount; i++) { doRun(info, opts, i, reporter ? &results : nullptr); @@ -172,4 +177,7 @@ void run(const TestScene::Info& info, const TestScene::Options& opts, // TODO: Report summary } } + if (opts.reportGpuMemoryUsage) { + RenderProxy::dumpGraphicsMemory(STDOUT_FILENO, false); + } } |