| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 explicit ProfilerEventsProcessor(ProfileGenerator* generator); | 154 explicit ProfilerEventsProcessor(ProfileGenerator* generator); |
| 155 virtual ~ProfilerEventsProcessor() {} | 155 virtual ~ProfilerEventsProcessor() {} |
| 156 | 156 |
| 157 // Thread control. | 157 // Thread control. |
| 158 virtual void Run(); | 158 virtual void Run(); |
| 159 inline void Stop() { running_ = false; } | 159 inline void Stop() { running_ = false; } |
| 160 INLINE(bool running()) { return running_; } | 160 INLINE(bool running()) { return running_; } |
| 161 void Enqueue(const CodeEventsContainer& event); | 161 void Enqueue(const CodeEventsContainer& event); |
| 162 | 162 |
| 163 // Puts current stack into tick sample events buffer. | 163 // Puts current stack into tick sample events buffer. |
| 164 void AddCurrentStack(); | 164 void AddCurrentStack(Isolate* isolate); |
| 165 | 165 |
| 166 // Tick sample events are filled directly in the buffer of the circular | 166 // Tick sample events are filled directly in the buffer of the circular |
| 167 // queue (because the structure is of fixed width, but usually not all | 167 // queue (because the structure is of fixed width, but usually not all |
| 168 // stack frame entries are filled.) This method returns a pointer to the | 168 // stack frame entries are filled.) This method returns a pointer to the |
| 169 // next record of the buffer. | 169 // next record of the buffer. |
| 170 INLINE(TickSample* TickSampleEvent()); | 170 INLINE(TickSample* TickSampleEvent()); |
| 171 | 171 |
| 172 private: | 172 private: |
| 173 // Called from events processing thread (Run() method.) | 173 // Called from events processing thread (Run() method.) |
| 174 bool ProcessCodeEvent(unsigned* dequeue_order); | 174 bool ProcessCodeEvent(unsigned* dequeue_order); |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 bool is_profiling_; | 269 bool is_profiling_; |
| 270 | 270 |
| 271 private: | 271 private: |
| 272 DISALLOW_COPY_AND_ASSIGN(CpuProfiler); | 272 DISALLOW_COPY_AND_ASSIGN(CpuProfiler); |
| 273 }; | 273 }; |
| 274 | 274 |
| 275 } } // namespace v8::internal | 275 } } // namespace v8::internal |
| 276 | 276 |
| 277 | 277 |
| 278 #endif // V8_CPU_PROFILER_H_ | 278 #endif // V8_CPU_PROFILER_H_ |
| OLD | NEW |