| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "CrashHandler.h" | 8 #include "CrashHandler.h" |
| 9 #include "DMJsonWriter.h" | 9 #include "DMJsonWriter.h" |
| 10 #include "DMSrcSink.h" | 10 #include "DMSrcSink.h" |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 } | 82 } |
| 83 } | 83 } |
| 84 } | 84 } |
| 85 if (!FLAGS_verbose) { | 85 if (!FLAGS_verbose) { |
| 86 note = ""; | 86 note = ""; |
| 87 } | 87 } |
| 88 if (!log.isEmpty()) { | 88 if (!log.isEmpty()) { |
| 89 log.prepend("\n"); | 89 log.prepend("\n"); |
| 90 } | 90 } |
| 91 auto pending = sk_atomic_dec(&gPending)-1; | 91 auto pending = sk_atomic_dec(&gPending)-1; |
| 92 SkDebugf("%s(%4dMB %5d) %s\t%s%s%s", FLAGS_verbose ? "\n" : kSkOverwriteLine | 92 SkDebugf("%s(%4d/%-4dMB %5d) %s\t%s%s%s", FLAGS_verbose ? "\n" : kSkOverwrit
eLine |
| 93 , sk_tools::getBestResidentSetSizeMB() | 93 , sk_tools::getCurrResidentSetSizeMB() |
| 94 , sk_tools::getMaxResidentSetSizeMB() |
| 94 , pending | 95 , pending |
| 95 , HumanizeMs(ms).c_str() | 96 , HumanizeMs(ms).c_str() |
| 96 , id.c_str() | 97 , id.c_str() |
| 97 , note.c_str() | 98 , note.c_str() |
| 98 , log.c_str()); | 99 , log.c_str()); |
| 99 // We write our dm.json file every once in a while in case we crash. | 100 // We write our dm.json file every once in a while in case we crash. |
| 100 // Notice this also handles the final dm.json when pending == 0. | 101 // Notice this also handles the final dm.json when pending == 0. |
| 101 if (pending % 500 == 0) { | 102 if (pending % 500 == 0) { |
| 102 JsonWriter::DumpJson(); | 103 JsonWriter::DumpJson(); |
| 103 } | 104 } |
| (...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 754 } | 755 } |
| 755 return 0; | 756 return 0; |
| 756 } | 757 } |
| 757 | 758 |
| 758 #if !defined(SK_BUILD_FOR_IOS) | 759 #if !defined(SK_BUILD_FOR_IOS) |
| 759 int main(int argc, char** argv) { | 760 int main(int argc, char** argv) { |
| 760 SkCommandLineFlags::Parse(argc, argv); | 761 SkCommandLineFlags::Parse(argc, argv); |
| 761 return dm_main(); | 762 return dm_main(); |
| 762 } | 763 } |
| 763 #endif | 764 #endif |
| OLD | NEW |