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 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 virtual void SetterCallbackEvent(Name* name, Address entry_point); | 234 virtual void SetterCallbackEvent(Name* name, Address entry_point); |
235 virtual void SharedFunctionInfoMoveEvent(Address from, Address to); | 235 virtual void SharedFunctionInfoMoveEvent(Address from, Address to); |
236 | 236 |
237 INLINE(bool is_profiling() const) { return is_profiling_; } | 237 INLINE(bool is_profiling() const) { return is_profiling_; } |
238 bool* is_profiling_address() { | 238 bool* is_profiling_address() { |
239 return &is_profiling_; | 239 return &is_profiling_; |
240 } | 240 } |
241 | 241 |
242 ProfileGenerator* generator() const { return generator_; } | 242 ProfileGenerator* generator() const { return generator_; } |
243 ProfilerEventsProcessor* processor() const { return processor_; } | 243 ProfilerEventsProcessor* processor() const { return processor_; } |
| 244 Isolate* isolate() const { return isolate_; } |
244 | 245 |
245 private: | 246 private: |
246 void StartProcessorIfNotStarted(); | 247 void StartProcessorIfNotStarted(); |
247 void StopProcessorIfLastProfile(const char* title); | 248 void StopProcessorIfLastProfile(const char* title); |
248 void StopProcessor(); | 249 void StopProcessor(); |
249 void ResetProfiles(); | 250 void ResetProfiles(); |
250 void LogBuiltins(); | 251 void LogBuiltins(); |
251 | 252 |
252 Isolate* isolate_; | 253 Isolate* isolate_; |
253 CpuProfilesCollection* profiles_; | 254 CpuProfilesCollection* profiles_; |
254 unsigned next_profile_uid_; | 255 unsigned next_profile_uid_; |
255 ProfileGenerator* generator_; | 256 ProfileGenerator* generator_; |
256 ProfilerEventsProcessor* processor_; | 257 ProfilerEventsProcessor* processor_; |
257 int saved_logging_nesting_; | 258 int saved_logging_nesting_; |
258 bool need_to_stop_sampler_; | 259 bool need_to_stop_sampler_; |
259 bool is_profiling_; | 260 bool is_profiling_; |
260 | 261 |
261 private: | |
262 DISALLOW_COPY_AND_ASSIGN(CpuProfiler); | 262 DISALLOW_COPY_AND_ASSIGN(CpuProfiler); |
263 }; | 263 }; |
264 | 264 |
265 } } // namespace v8::internal | 265 } } // namespace v8::internal |
266 | 266 |
267 | 267 |
268 #endif // V8_CPU_PROFILER_H_ | 268 #endif // V8_CPU_PROFILER_H_ |
OLD | NEW |