OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 13 matching lines...) Expand all Loading... |
24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 | 27 |
28 #ifndef V8_CPU_PROFILER_H_ | 28 #ifndef V8_CPU_PROFILER_H_ |
29 #define V8_CPU_PROFILER_H_ | 29 #define V8_CPU_PROFILER_H_ |
30 | 30 |
31 #ifdef ENABLE_LOGGING_AND_PROFILING | 31 #ifdef ENABLE_LOGGING_AND_PROFILING |
32 | 32 |
33 #include "circular-queue.h" | 33 #include "circular-queue.h" |
| 34 #include "unbound-queue.h" |
34 | 35 |
35 namespace v8 { | 36 namespace v8 { |
36 namespace internal { | 37 namespace internal { |
37 | 38 |
38 // Forward declarations. | 39 // Forward declarations. |
39 class CodeEntry; | 40 class CodeEntry; |
40 class CodeMap; | 41 class CodeMap; |
41 class CpuProfile; | 42 class CpuProfile; |
42 class CpuProfilesCollection; | 43 class CpuProfilesCollection; |
43 class ProfileGenerator; | 44 class ProfileGenerator; |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 }; | 175 }; |
175 | 176 |
176 // Called from events processing thread (Run() method.) | 177 // Called from events processing thread (Run() method.) |
177 bool ProcessCodeEvent(unsigned* dequeue_order); | 178 bool ProcessCodeEvent(unsigned* dequeue_order); |
178 bool ProcessTicks(unsigned dequeue_order); | 179 bool ProcessTicks(unsigned dequeue_order); |
179 | 180 |
180 INLINE(static bool FilterOutCodeCreateEvent(Logger::LogEventsAndTags tag)); | 181 INLINE(static bool FilterOutCodeCreateEvent(Logger::LogEventsAndTags tag)); |
181 | 182 |
182 ProfileGenerator* generator_; | 183 ProfileGenerator* generator_; |
183 bool running_; | 184 bool running_; |
184 CircularQueue<CodeEventsContainer> events_buffer_; | 185 UnboundQueue<CodeEventsContainer> events_buffer_; |
185 SamplingCircularQueue ticks_buffer_; | 186 SamplingCircularQueue ticks_buffer_; |
186 unsigned enqueue_order_; | 187 unsigned enqueue_order_; |
187 }; | 188 }; |
188 | 189 |
189 } } // namespace v8::internal | 190 } } // namespace v8::internal |
190 | 191 |
191 | 192 |
192 #define PROFILE(Call) \ | 193 #define PROFILE(Call) \ |
193 LOG(Call); \ | 194 LOG(Call); \ |
194 do { \ | 195 do { \ |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 #endif // ENABLE_LOGGING_AND_PROFILING | 271 #endif // ENABLE_LOGGING_AND_PROFILING |
271 | 272 |
272 private: | 273 private: |
273 DISALLOW_COPY_AND_ASSIGN(CpuProfiler); | 274 DISALLOW_COPY_AND_ASSIGN(CpuProfiler); |
274 }; | 275 }; |
275 | 276 |
276 } } // namespace v8::internal | 277 } } // namespace v8::internal |
277 | 278 |
278 | 279 |
279 #endif // V8_CPU_PROFILER_H_ | 280 #endif // V8_CPU_PROFILER_H_ |
OLD | NEW |