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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 } | 253 } |
254 | 254 |
255 private: | 255 private: |
256 CpuProfiler(); | 256 CpuProfiler(); |
257 ~CpuProfiler(); | 257 ~CpuProfiler(); |
258 void StartCollectingProfile(const char* title); | 258 void StartCollectingProfile(const char* title); |
259 void StartCollectingProfile(String* title); | 259 void StartCollectingProfile(String* title); |
260 void StartProcessorIfNotStarted(); | 260 void StartProcessorIfNotStarted(); |
261 CpuProfile* StopCollectingProfile(const char* title); | 261 CpuProfile* StopCollectingProfile(const char* title); |
262 CpuProfile* StopCollectingProfile(Object* security_token, String* title); | 262 CpuProfile* StopCollectingProfile(Object* security_token, String* title); |
263 void StopProcessorIfLastProfile(); | 263 void StopProcessorIfLastProfile(const char* title); |
264 | 264 |
265 CpuProfilesCollection* profiles_; | 265 CpuProfilesCollection* profiles_; |
266 unsigned next_profile_uid_; | 266 unsigned next_profile_uid_; |
267 TokenEnumerator* token_enumerator_; | 267 TokenEnumerator* token_enumerator_; |
268 ProfileGenerator* generator_; | 268 ProfileGenerator* generator_; |
269 ProfilerEventsProcessor* processor_; | 269 ProfilerEventsProcessor* processor_; |
270 int saved_logging_nesting_; | 270 int saved_logging_nesting_; |
271 | 271 |
272 static CpuProfiler* singleton_; | 272 static CpuProfiler* singleton_; |
273 | 273 |
274 #else | 274 #else |
275 static INLINE(bool is_profiling()) { return false; } | 275 static INLINE(bool is_profiling()) { return false; } |
276 #endif // ENABLE_LOGGING_AND_PROFILING | 276 #endif // ENABLE_LOGGING_AND_PROFILING |
277 | 277 |
278 private: | 278 private: |
279 DISALLOW_COPY_AND_ASSIGN(CpuProfiler); | 279 DISALLOW_COPY_AND_ASSIGN(CpuProfiler); |
280 }; | 280 }; |
281 | 281 |
282 } } // namespace v8::internal | 282 } } // namespace v8::internal |
283 | 283 |
284 | 284 |
285 #endif // V8_CPU_PROFILER_H_ | 285 #endif // V8_CPU_PROFILER_H_ |
OLD | NEW |