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

Side by Side Diff: runtime/vm/timer.cc

Issue 23072026: fix cpp11 compile errors (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/thread_test.cc ('k') | runtime/vm/verifier.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/timer.h" 5 #include "vm/timer.h"
6 6
7 namespace dart { 7 namespace dart {
8 8
9 // Define timer command line flags. 9 // Define timer command line flags.
10 #define DEFINE_TIMER_FLAG(name, msg) \ 10 #define DEFINE_TIMER_FLAG(name, msg) \
11 DEFINE_FLAG(bool, name, false, ""#name); 11 DEFINE_FLAG(bool, name, false, ""#name);
12 TIMER_LIST(DEFINE_TIMER_FLAG) 12 TIMER_LIST(DEFINE_TIMER_FLAG)
13 #undef DEFINE_TIMER_FLAG 13 #undef DEFINE_TIMER_FLAG
14 DEFINE_FLAG(bool, time_all, false, "Time all functionality"); 14 DEFINE_FLAG(bool, time_all, false, "Time all functionality");
15 15
16 16
17 // Maintains a list of timers per isolate. 17 // Maintains a list of timers per isolate.
18 #define INIT_TIMERS(name, msg) \ 18 #define INIT_TIMERS(name, msg) \
19 name##_((FLAG_##name || FLAG_time_all), msg), 19 name##_((FLAG_##name || FLAG_time_all), msg),
20 TimerList::TimerList() 20 TimerList::TimerList()
21 : TIMER_LIST(INIT_TIMERS) 21 : TIMER_LIST(INIT_TIMERS)
22 padding_(false) { 22 padding_(false) {
23 } 23 }
24 #undef INIT_TIMERS 24 #undef INIT_TIMERS
25 25
26 26
27 #define TIMER_FIELD_REPORT(name, msg) \ 27 #define TIMER_FIELD_REPORT(name, msg) \
28 if (name().enabled() && name().message() != NULL) { \ 28 if (name().enabled() && name().message() != NULL) { \
29 OS::Print("%s %"Pd64" micros.\n", \ 29 OS::Print("%s %" Pd64 " micros.\n", \
30 name().message(), \ 30 name().message(), \
31 name().TotalElapsedTime()); \ 31 name().TotalElapsedTime()); \
32 } 32 }
33 void TimerList::ReportTimers() { 33 void TimerList::ReportTimers() {
34 TIMER_LIST(TIMER_FIELD_REPORT); 34 TIMER_LIST(TIMER_FIELD_REPORT);
35 } 35 }
36 #undef TIMER_FIELD_REPORT 36 #undef TIMER_FIELD_REPORT
37 37
38 } // namespace dart 38 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/thread_test.cc ('k') | runtime/vm/verifier.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698