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 CpuProfile* StopProfiling(int security_token_id, | 253 CpuProfile* StopProfiling(int security_token_id, |
254 const char* title, | 254 const char* title, |
255 double actual_sampling_rate); | 255 double actual_sampling_rate); |
256 CpuProfile* StopProfiling(int security_token_id, | 256 CpuProfile* StopProfiling(int security_token_id, |
257 String* title, | 257 String* title, |
258 double actual_sampling_rate); | 258 double actual_sampling_rate); |
259 List<CpuProfile*>* Profiles(int security_token_id); | 259 List<CpuProfile*>* Profiles(int security_token_id); |
260 CpuProfile* GetProfile(int security_token_id, unsigned uid); | 260 CpuProfile* GetProfile(int security_token_id, unsigned uid); |
261 inline bool is_last_profile(); | 261 inline bool is_last_profile(); |
262 | 262 |
| 263 const char* GetName(String* name); |
263 CodeEntry* NewCodeEntry(Logger::LogEventsAndTags tag, | 264 CodeEntry* NewCodeEntry(Logger::LogEventsAndTags tag, |
264 String* name, String* resource_name, int line_number); | 265 String* name, String* resource_name, int line_number); |
265 CodeEntry* NewCodeEntry(Logger::LogEventsAndTags tag, const char* name); | 266 CodeEntry* NewCodeEntry(Logger::LogEventsAndTags tag, const char* name); |
266 CodeEntry* NewCodeEntry(Logger::LogEventsAndTags tag, | 267 CodeEntry* NewCodeEntry(Logger::LogEventsAndTags tag, |
267 const char* name_prefix, String* name); | 268 const char* name_prefix, String* name); |
268 CodeEntry* NewCodeEntry(Logger::LogEventsAndTags tag, int args_count); | 269 CodeEntry* NewCodeEntry(Logger::LogEventsAndTags tag, int args_count); |
269 CodeEntry* NewCodeEntry(int security_token_id); | 270 CodeEntry* NewCodeEntry(int security_token_id); |
270 | 271 |
271 // Called from profile generator thread. | 272 // Called from profile generator thread. |
272 void AddPathToCurrentProfiles(const Vector<CodeEntry*>& path); | 273 void AddPathToCurrentProfiles(const Vector<CodeEntry*>& path); |
273 | 274 |
274 private: | 275 private: |
275 INLINE(const char* GetFunctionName(String* name)); | 276 INLINE(const char* GetFunctionName(String* name)); |
276 INLINE(const char* GetFunctionName(const char* name)); | 277 INLINE(const char* GetFunctionName(const char* name)); |
277 const char* GetName(String* name); | |
278 const char* GetName(int args_count); | 278 const char* GetName(int args_count); |
279 List<CpuProfile*>* GetProfilesList(int security_token_id); | 279 List<CpuProfile*>* GetProfilesList(int security_token_id); |
280 int TokenToIndex(int security_token_id); | 280 int TokenToIndex(int security_token_id); |
281 | 281 |
282 INLINE(static bool StringsMatch(void* key1, void* key2)) { | 282 INLINE(static bool StringsMatch(void* key1, void* key2)) { |
283 return strcmp(reinterpret_cast<char*>(key1), | 283 return strcmp(reinterpret_cast<char*>(key1), |
284 reinterpret_cast<char*>(key2)) == 0; | 284 reinterpret_cast<char*>(key2)) == 0; |
285 } | 285 } |
286 | 286 |
287 INLINE(static bool UidsMatch(void* key1, void* key2)) { | 287 INLINE(static bool UidsMatch(void* key1, void* key2)) { |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 SampleRateCalculator sample_rate_calc_; | 395 SampleRateCalculator sample_rate_calc_; |
396 | 396 |
397 DISALLOW_COPY_AND_ASSIGN(ProfileGenerator); | 397 DISALLOW_COPY_AND_ASSIGN(ProfileGenerator); |
398 }; | 398 }; |
399 | 399 |
400 } } // namespace v8::internal | 400 } } // namespace v8::internal |
401 | 401 |
402 #endif // ENABLE_LOGGING_AND_PROFILING | 402 #endif // ENABLE_LOGGING_AND_PROFILING |
403 | 403 |
404 #endif // V8_PROFILE_GENERATOR_H_ | 404 #endif // V8_PROFILE_GENERATOR_H_ |
OLD | NEW |