Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(409)

Side by Side Diff: src/profile-generator.h

Issue 3108004: Fix CPU profiler crash in start / stop sequence when non-existent name is passed (Closed)
Patch Set: Created 10 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/cpu-profiler.cc ('k') | src/profile-generator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 class CpuProfilesCollection { 272 class CpuProfilesCollection {
273 public: 273 public:
274 CpuProfilesCollection(); 274 CpuProfilesCollection();
275 ~CpuProfilesCollection(); 275 ~CpuProfilesCollection();
276 276
277 bool StartProfiling(const char* title, unsigned uid); 277 bool StartProfiling(const char* title, unsigned uid);
278 bool StartProfiling(String* title, unsigned uid); 278 bool StartProfiling(String* title, unsigned uid);
279 CpuProfile* StopProfiling(int security_token_id, 279 CpuProfile* StopProfiling(int security_token_id,
280 const char* title, 280 const char* title,
281 double actual_sampling_rate); 281 double actual_sampling_rate);
282 CpuProfile* StopProfiling(int security_token_id,
283 String* title,
284 double actual_sampling_rate);
285 List<CpuProfile*>* Profiles(int security_token_id); 282 List<CpuProfile*>* Profiles(int security_token_id);
286 const char* GetName(String* name) { 283 const char* GetName(String* name) {
287 return function_and_resource_names_.GetName(name); 284 return function_and_resource_names_.GetName(name);
288 } 285 }
289 CpuProfile* GetProfile(int security_token_id, unsigned uid); 286 CpuProfile* GetProfile(int security_token_id, unsigned uid);
290 inline bool is_last_profile(); 287 bool IsLastProfile(const char* title);
291 288
292 CodeEntry* NewCodeEntry(Logger::LogEventsAndTags tag, 289 CodeEntry* NewCodeEntry(Logger::LogEventsAndTags tag,
293 String* name, String* resource_name, int line_number); 290 String* name, String* resource_name, int line_number);
294 CodeEntry* NewCodeEntry(Logger::LogEventsAndTags tag, const char* name); 291 CodeEntry* NewCodeEntry(Logger::LogEventsAndTags tag, const char* name);
295 CodeEntry* NewCodeEntry(Logger::LogEventsAndTags tag, 292 CodeEntry* NewCodeEntry(Logger::LogEventsAndTags tag,
296 const char* name_prefix, String* name); 293 const char* name_prefix, String* name);
297 CodeEntry* NewCodeEntry(Logger::LogEventsAndTags tag, int args_count); 294 CodeEntry* NewCodeEntry(Logger::LogEventsAndTags tag, int args_count);
298 CodeEntry* NewCodeEntry(int security_token_id); 295 CodeEntry* NewCodeEntry(int security_token_id);
299 296
300 // Called from profile generator thread. 297 // Called from profile generator thread.
(...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after
946 friend class IndexedReferencesExtractor; 943 friend class IndexedReferencesExtractor;
947 944
948 DISALLOW_COPY_AND_ASSIGN(HeapSnapshotGenerator); 945 DISALLOW_COPY_AND_ASSIGN(HeapSnapshotGenerator);
949 }; 946 };
950 947
951 } } // namespace v8::internal 948 } } // namespace v8::internal
952 949
953 #endif // ENABLE_LOGGING_AND_PROFILING 950 #endif // ENABLE_LOGGING_AND_PROFILING
954 951
955 #endif // V8_PROFILE_GENERATOR_H_ 952 #endif // V8_PROFILE_GENERATOR_H_
OLDNEW
« no previous file with comments | « src/cpu-profiler.cc ('k') | src/profile-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698