diff options
author | 2014-10-24 10:40:50 -0700 | |
---|---|---|
committer | 2014-10-24 10:40:50 -0700 | |
commit | 06cddec8570cbf29f89e89736afb0487b5b95abd (patch) | |
tree | 5f7dc9f5e0b0bba4953dd77bfb2be4891eed7855 /bench | |
parent | efb7e42e3779c9e8829d2edf1284ae57e310b847 (diff) |
Print GPU cache stats in nanobench/dm with veryVerbose
Review URL: https://codereview.chromium.org/680553002
Diffstat (limited to 'bench')
-rw-r--r-- | bench/nanobench.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/bench/nanobench.cpp b/bench/nanobench.cpp index 2758528a96..a5a96aa613 100644 --- a/bench/nanobench.cpp +++ b/bench/nanobench.cpp @@ -576,6 +576,10 @@ int nanobench_main() { gGrFactory.reset(SkNEW_ARGS(GrContextFactory, (grContextOpts))); #endif + if (FLAGS_veryVerbose) { + FLAGS_verbose = true; + } + if (kAutoTuneLoops != FLAGS_loops) { FLAGS_samples = 1; FLAGS_gpuFrameLag = 0; @@ -719,17 +723,23 @@ int nanobench_main() { , bench->getUniqueName() ); } +#if SK_SUPPORT_GPU && GR_CACHE_STATS + if (FLAGS_veryVerbose && + Benchmark::kGPU_Backend == targets[j]->config.backend) { + gGrFactory->get(targets[j]->config.ctxType)->printCacheStats(); + } +#endif } targets.deleteAll(); - #if SK_SUPPORT_GPU +#if SK_SUPPORT_GPU if (FLAGS_abandonGpuContext) { gGrFactory->abandonContexts(); } if (FLAGS_resetGpuContext || FLAGS_abandonGpuContext) { gGrFactory->destroyContexts(); } - #endif +#endif } return 0; |