OLD | NEW |
---|---|
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // TODO(port): the ifdefs in here are a first step towards trying to determine | 5 // TODO(port): the ifdefs in here are a first step towards trying to determine |
6 // the correct abstraction for all the OS functionality required at this | 6 // the correct abstraction for all the OS functionality required at this |
7 // stage of process initialization. It should not be taken as a final | 7 // stage of process initialization. It should not be taken as a final |
8 // abstraction. | 8 // abstraction. |
9 | 9 |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
453 | 453 |
454 // Initialize the Stats Counters table. With this initialized, | 454 // Initialize the Stats Counters table. With this initialized, |
455 // the StatsViewer can be utilized to read counters outside of | 455 // the StatsViewer can be utilized to read counters outside of |
456 // Chrome. These lines can be commented out to effectively turn | 456 // Chrome. These lines can be commented out to effectively turn |
457 // counters 'off'. The table is created and exists for the life | 457 // counters 'off'. The table is created and exists for the life |
458 // of the process. It is not cleaned up. | 458 // of the process. It is not cleaned up. |
459 // TODO(port): we probably need to shut this down correctly to avoid | 459 // TODO(port): we probably need to shut this down correctly to avoid |
460 // leaking shared memory regions on posix platforms. | 460 // leaking shared memory regions on posix platforms. |
461 if (parsed_command_line.HasSwitch(switches::kEnableStatsTable) || | 461 if (parsed_command_line.HasSwitch(switches::kEnableStatsTable) || |
462 parsed_command_line.HasSwitch(switches::kEnableBenchmarking)) { | 462 parsed_command_line.HasSwitch(switches::kEnableBenchmarking)) { |
463 std::string statsfile = StringPrintf("%s-%lld", chrome::kStatsFilename, | 463 std::string statsfile = StringPrintf("%s-%ul", chrome::kStatsFilename, |
Mark Mentovai
2009/11/18 20:55:27
The cast is to unsigned int but you've got %ul.
E
| |
464 static_cast<int64>(browser_pid)); | 464 static_cast<unsigned int>(browser_pid)) ; |
465 StatsTable *stats_table = new StatsTable(statsfile, | 465 StatsTable *stats_table = new StatsTable(statsfile, |
466 chrome::kStatsMaxThreads, chrome::kStatsMaxCounters); | 466 chrome::kStatsMaxThreads, chrome::kStatsMaxCounters); |
467 StatsTable::set_current(stats_table); | 467 StatsTable::set_current(stats_table); |
468 } | 468 } |
469 | 469 |
470 StatsScope<StatsCounterTimer> | 470 StatsScope<StatsCounterTimer> |
471 startup_timer(chrome::Counters::chrome_main()); | 471 startup_timer(chrome::Counters::chrome_main()); |
472 | 472 |
473 // Enable the heap profiler as early as possible! | 473 // Enable the heap profiler as early as possible! |
474 EnableHeapProfiler(parsed_command_line); | 474 EnableHeapProfiler(parsed_command_line); |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
658 | 658 |
659 logging::CleanupChromeLogging(); | 659 logging::CleanupChromeLogging(); |
660 | 660 |
661 #if defined(OS_MACOSX) && defined(GOOGLE_CHROME_BUILD) | 661 #if defined(OS_MACOSX) && defined(GOOGLE_CHROME_BUILD) |
662 // TODO(mark): See the TODO(mark) above at InitCrashReporter. | 662 // TODO(mark): See the TODO(mark) above at InitCrashReporter. |
663 DestructCrashReporter(); | 663 DestructCrashReporter(); |
664 #endif // OS_MACOSX && GOOGLE_CHROME_BUILD | 664 #endif // OS_MACOSX && GOOGLE_CHROME_BUILD |
665 | 665 |
666 return rv; | 666 return rv; |
667 } | 667 } |
OLD | NEW |