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

Side by Side Diff: vm/timer.h

Issue 8970004: Changes to create an application snapshot which can be layered on top (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: '' Created 9 years 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 | « vm/snapshot_test.cc ('k') | no next file » | 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 #ifndef VM_TIMER_H_ 5 #ifndef VM_TIMER_H_
6 #define VM_TIMER_H_ 6 #define VM_TIMER_H_
7 7
8 #include "vm/allocation.h" 8 #include "vm/allocation.h"
9 #include "vm/flags.h" 9 #include "vm/flags.h"
10 #include "vm/os.h" 10 #include "vm/os.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 int64_t total_; 71 int64_t total_;
72 bool enabled_; 72 bool enabled_;
73 const char* message_; 73 const char* message_;
74 74
75 DISALLOW_COPY_AND_ASSIGN(Timer); 75 DISALLOW_COPY_AND_ASSIGN(Timer);
76 }; 76 };
77 77
78 // List of per isolate timers. 78 // List of per isolate timers.
79 #define TIMER_LIST(V) \ 79 #define TIMER_LIST(V) \
80 V(time_script_loading, "Script Loading : ") \ 80 V(time_script_loading, "Script Loading : ") \
81 V(time_creating_snapshot, "Snapshot Creation : ") \
81 V(time_compilation, "Function compilation : ") \ 82 V(time_compilation, "Function compilation : ") \
82 V(time_bootstrap, "Bootstrap of core classes : ") \ 83 V(time_bootstrap, "Bootstrap of core classes : ") \
83 V(time_total_runtime, "Total runtime for isolate : ") \ 84 V(time_total_runtime, "Total runtime for isolate : ") \
84 85
85 // Declare command line flags for the timers. 86 // Declare command line flags for the timers.
86 #define DECLARE_TIMER_FLAG(name, msg) \ 87 #define DECLARE_TIMER_FLAG(name, msg) \
87 DECLARE_FLAG(bool, name); 88 DECLARE_FLAG(bool, name);
88 TIMER_LIST(DECLARE_TIMER_FLAG) 89 TIMER_LIST(DECLARE_TIMER_FLAG)
89 #undef DECLARE_TIMER_FLAG 90 #undef DECLARE_TIMER_FLAG
90 DECLARE_FLAG(bool, time_all); // In order to turn on all the timer flags. 91 DECLARE_FLAG(bool, time_all); // In order to turn on all the timer flags.
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 DISALLOW_COPY_AND_ASSIGN(TimerScope); 151 DISALLOW_COPY_AND_ASSIGN(TimerScope);
151 }; 152 };
152 153
153 #define TIMERSCOPE(name) \ 154 #define TIMERSCOPE(name) \
154 TimerScope vm_internal_timer_((FLAG_##name || FLAG_time_all), \ 155 TimerScope vm_internal_timer_((FLAG_##name || FLAG_time_all), \
155 &(Isolate::Current()->timer_list().name())) 156 &(Isolate::Current()->timer_list().name()))
156 157
157 } // namespace dart 158 } // namespace dart
158 159
159 #endif // VM_TIMER_H_ 160 #endif // VM_TIMER_H_
OLDNEW
« no previous file with comments | « vm/snapshot_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698