Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3312)

Unified Diff: bench/nanobench.cpp

Issue 680553002: Print GPU cache stats in nanobench/dm with veryVerbose (Closed) Base URL: https://skia.googlesource.com/skia.git@stats
Patch Set: Fix no-gpu build Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | dm/DM.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/nanobench.cpp
diff --git a/bench/nanobench.cpp b/bench/nanobench.cpp
index 2758528a9624448c52b61d5898d064e067e7d759..a5a96aa6131ae45028d0c9ed6c455630286997f8 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;
« no previous file with comments | « no previous file | dm/DM.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698