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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 // This class implements both the profile events processor thread and | 121 // This class implements both the profile events processor thread and |
122 // methods called by event producers: VM and stack sampler threads. | 122 // methods called by event producers: VM and stack sampler threads. |
123 class ProfilerEventsProcessor : public Thread { | 123 class ProfilerEventsProcessor : public Thread { |
124 public: | 124 public: |
125 explicit ProfilerEventsProcessor(ProfileGenerator* generator); | 125 explicit ProfilerEventsProcessor(ProfileGenerator* generator); |
126 virtual ~ProfilerEventsProcessor() { } | 126 virtual ~ProfilerEventsProcessor() { } |
127 | 127 |
128 // Thread control. | 128 // Thread control. |
129 virtual void Run(); | 129 virtual void Run(); |
130 inline void Stop() { running_ = false; } | 130 inline void Stop() { running_ = false; } |
| 131 INLINE(bool running()) { return running_; } |
131 | 132 |
132 // Events adding methods. Called by VM threads. | 133 // Events adding methods. Called by VM threads. |
133 void CodeCreateEvent(Logger::LogEventsAndTags tag, | 134 void CodeCreateEvent(Logger::LogEventsAndTags tag, |
134 String* name, | 135 String* name, |
135 String* resource_name, int line_number, | 136 String* resource_name, int line_number, |
136 Address start, unsigned size); | 137 Address start, unsigned size); |
137 void CodeCreateEvent(Logger::LogEventsAndTags tag, | 138 void CodeCreateEvent(Logger::LogEventsAndTags tag, |
138 const char* name, | 139 const char* name, |
139 Address start, unsigned size); | 140 Address start, unsigned size); |
140 void CodeCreateEvent(Logger::LogEventsAndTags tag, | 141 void CodeCreateEvent(Logger::LogEventsAndTags tag, |
(...skipping 30 matching lines...) Expand all Loading... |
171 bool running_; | 172 bool running_; |
172 CircularQueue<CodeEventsContainer> events_buffer_; | 173 CircularQueue<CodeEventsContainer> events_buffer_; |
173 SamplingCircularQueue ticks_buffer_; | 174 SamplingCircularQueue ticks_buffer_; |
174 unsigned enqueue_order_; | 175 unsigned enqueue_order_; |
175 }; | 176 }; |
176 | 177 |
177 | 178 |
178 } } // namespace v8::internal | 179 } } // namespace v8::internal |
179 | 180 |
180 #endif // V8_CPU_PROFILER_H_ | 181 #endif // V8_CPU_PROFILER_H_ |
OLD | NEW |