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

Unified Diff: dm/DM.cpp

Issue 886233004: Print gpu/cache stats from DM. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: minor Created 5 years, 11 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/DMSrcSink.h » ('j') | dm/DMSrcSink.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dm/DM.cpp
diff --git a/dm/DM.cpp b/dm/DM.cpp
index f087a327afd3951aa3c54f7576fa45bbdc63ee0d..327d7783800dc18f9fccace54c01de724db91411 100644
--- a/dm/DM.cpp
+++ b/dm/DM.cpp
@@ -48,7 +48,8 @@ static void fail(ImplicitString err) {
static int32_t gPending = 0; // Atomic.
-static void done(double ms, ImplicitString config, ImplicitString src, ImplicitString name) {
+static void done(double ms, ImplicitString config, ImplicitString src, ImplicitString name,
+ ImplicitString verboseLog) {
int32_t pending = sk_atomic_dec(&gPending)-1;
SkDebugf("%s(%4dMB %5d) %s\t%s %s %s ", FLAGS_verbose ? "\n" : kSkOverwriteLine
mtklein 2015/02/02 16:23:17 I think you'll have a better time if we log everyt
, sk_tools::getMaxResidentSetSizeMB()
@@ -57,6 +58,9 @@ static void done(double ms, ImplicitString config, ImplicitString src, ImplicitS
, config.c_str()
, src.c_str()
, name.c_str());
+ if (FLAGS_verbose && !verboseLog.isEmpty()) {
+ SkDebugf("\n%s", verboseLog.c_str());
+ }
// We write our dm.json file every once in a while in case we crash.
// Notice this also handles the final dm.json when pending == 0.
if (pending % 500 == 0) {
@@ -350,7 +354,7 @@ struct Task {
if (!whyBlacklisted.isEmpty()) {
name.appendf(" (--blacklist, %s)", whyBlacklisted.c_str());
}
- done(timer.fWall, task->sink.tag, task->src.tag, name);
+ done(timer.fWall, task->sink.tag, task->src.tag, name, task->sink->verboseLog());
}
static void WriteToDisk(const Task& task,
@@ -471,7 +475,7 @@ static void run_test(skiatest::Test* test) {
test->proc(&reporter, &factory);
}
timer.end();
- done(timer.fWall, "unit", "test", test->name);
+ done(timer.fWall, "unit", "test", test->name, "");
}
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
« no previous file with comments | « no previous file | dm/DMSrcSink.h » ('j') | dm/DMSrcSink.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698