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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 } | 86 } |
87 } | 87 } |
88 if (!FLAGS_verbose) { | 88 if (!FLAGS_verbose) { |
89 note = ""; | 89 note = ""; |
90 } | 90 } |
91 if (!log.isEmpty()) { | 91 if (!log.isEmpty()) { |
92 log.prepend("\n"); | 92 log.prepend("\n"); |
93 } | 93 } |
94 auto pending = sk_atomic_dec(&gPending)-1; | 94 auto pending = sk_atomic_dec(&gPending)-1; |
95 if (!FLAGS_quiet) { | 95 if (!FLAGS_quiet) { |
96 SkDebugf("%s(%4d/%-4dMB %5d) %s\t%s%s%s", FLAGS_verbose ? "\n" : kSkOver
writeLine | 96 SkDebugf("%s(%4d/%-4dMB %6d) %s\t%s%s%s", FLAGS_verbose ? "\n" : kSkOver
writeLine |
97 , sk_tools::getCurrResidentSetSizeMB(
) | 97 , sk_tools::getCurrResidentSetSizeMB(
) |
98 , sk_tools::getMaxResidentSetSizeMB() | 98 , sk_tools::getMaxResidentSetSizeMB() |
99 , pending | 99 , pending |
100 , HumanizeMs(ms).c_str() | 100 , HumanizeMs(ms).c_str() |
101 , id.c_str() | 101 , id.c_str() |
102 , note.c_str() | 102 , note.c_str() |
103 , log.c_str()); | 103 , log.c_str()); |
104 } | 104 } |
105 // We write our dm.json file every once in a while in case we crash. | 105 // We write our dm.json file every once in a while in case we crash. |
106 // Notice this also handles the final dm.json when pending == 0. | 106 // Notice this also handles the final dm.json when pending == 0. |
(...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
821 } | 821 } |
822 return 0; | 822 return 0; |
823 } | 823 } |
824 | 824 |
825 #if !defined(SK_BUILD_FOR_IOS) | 825 #if !defined(SK_BUILD_FOR_IOS) |
826 int main(int argc, char** argv) { | 826 int main(int argc, char** argv) { |
827 SkCommandLineFlags::Parse(argc, argv); | 827 SkCommandLineFlags::Parse(argc, argv); |
828 return dm_main(); | 828 return dm_main(); |
829 } | 829 } |
830 #endif | 830 #endif |
OLD | NEW |