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

Side by Side Diff: bench/benchmain.cpp

Issue 343583005: Add basic stacktrace handler using libunwind. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: wimpy linux Created 6 years, 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | dm/DM.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2011 Google Inc. 2 * Copyright 2011 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 "BenchTimer.h" 8 #include "BenchTimer.h"
9 #include "CrashHandler.h"
9 #include "ResultsWriter.h" 10 #include "ResultsWriter.h"
10 #include "SkBenchLogger.h" 11 #include "SkBenchLogger.h"
11 #include "SkBenchmark.h" 12 #include "SkBenchmark.h"
12 #include "SkBitmapDevice.h" 13 #include "SkBitmapDevice.h"
13 #include "SkCanvas.h" 14 #include "SkCanvas.h"
14 #include "SkColorPriv.h" 15 #include "SkColorPriv.h"
15 #include "SkCommandLineFlags.h" 16 #include "SkCommandLineFlags.h"
16 #include "SkData.h" 17 #include "SkData.h"
17 #include "SkDeferredCanvas.h" 18 #include "SkDeferredCanvas.h"
18 #include "SkGMBench.h" 19 #include "SkGMBench.h"
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 if (currRaw < FLAGS_minMs) { 267 if (currRaw < FLAGS_minMs) {
267 return false; 268 return false;
268 } 269 }
269 const double low = 1 - FLAGS_error, high = 1 + FLAGS_error; 270 const double low = 1 - FLAGS_error, high = 1 + FLAGS_error;
270 const double ratio = currPerLoop / prevPerLoop; 271 const double ratio = currPerLoop / prevPerLoop;
271 return low < ratio && ratio < high; 272 return low < ratio && ratio < high;
272 } 273 }
273 274
274 int tool_main(int argc, char** argv); 275 int tool_main(int argc, char** argv);
275 int tool_main(int argc, char** argv) { 276 int tool_main(int argc, char** argv) {
277 SetupCrashHandler();
276 SkCommandLineFlags::Parse(argc, argv); 278 SkCommandLineFlags::Parse(argc, argv);
277 #if SK_ENABLE_INST_COUNT 279 #if SK_ENABLE_INST_COUNT
278 if (FLAGS_leaks) { 280 if (FLAGS_leaks) {
279 gPrintInstCount = true; 281 gPrintInstCount = true;
280 } 282 }
281 #endif 283 #endif
282 SkAutoGraphics ag; 284 SkAutoGraphics ag;
283 285
284 // First, parse some flags. 286 // First, parse some flags.
285 SkBenchLogger logger; 287 SkBenchLogger logger;
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
684 gContextFactory.destroyContexts(); 686 gContextFactory.destroyContexts();
685 #endif 687 #endif
686 return 0; 688 return 0;
687 } 689 }
688 690
689 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) 691 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL)
690 int main(int argc, char * const argv[]) { 692 int main(int argc, char * const argv[]) {
691 return tool_main(argc, (char**) argv); 693 return tool_main(argc, (char**) argv);
692 } 694 }
693 #endif 695 #endif
OLDNEW
« 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