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

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

Issue 3287005: CPU profiler: limit the number of simultaneously collected profiles. (Closed)
Patch Set: Created 10 years, 3 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 | « no previous file | 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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 String* name, String* resource_name, int line_number); 292 String* name, String* resource_name, int line_number);
293 CodeEntry* NewCodeEntry(Logger::LogEventsAndTags tag, const char* name); 293 CodeEntry* NewCodeEntry(Logger::LogEventsAndTags tag, const char* name);
294 CodeEntry* NewCodeEntry(Logger::LogEventsAndTags tag, 294 CodeEntry* NewCodeEntry(Logger::LogEventsAndTags tag,
295 const char* name_prefix, String* name); 295 const char* name_prefix, String* name);
296 CodeEntry* NewCodeEntry(Logger::LogEventsAndTags tag, int args_count); 296 CodeEntry* NewCodeEntry(Logger::LogEventsAndTags tag, int args_count);
297 CodeEntry* NewCodeEntry(int security_token_id); 297 CodeEntry* NewCodeEntry(int security_token_id);
298 298
299 // Called from profile generator thread. 299 // Called from profile generator thread.
300 void AddPathToCurrentProfiles(const Vector<CodeEntry*>& path); 300 void AddPathToCurrentProfiles(const Vector<CodeEntry*>& path);
301 301
302 // Limits the number of profiles that can be simultaneously collected.
303 static const int kMaxSimultaneousProfiles = 100;
304
302 private: 305 private:
303 const char* GetName(int args_count); 306 const char* GetName(int args_count);
304 const char* GetFunctionName(String* name) { 307 const char* GetFunctionName(String* name) {
305 return function_and_resource_names_.GetFunctionName(name); 308 return function_and_resource_names_.GetFunctionName(name);
306 } 309 }
307 const char* GetFunctionName(const char* name) { 310 const char* GetFunctionName(const char* name) {
308 return function_and_resource_names_.GetFunctionName(name); 311 return function_and_resource_names_.GetFunctionName(name);
309 } 312 }
310 List<CpuProfile*>* GetProfilesList(int security_token_id); 313 List<CpuProfile*>* GetProfilesList(int security_token_id);
311 int TokenToIndex(int security_token_id); 314 int TokenToIndex(int security_token_id);
(...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after
971 friend class IndexedReferencesExtractor; 974 friend class IndexedReferencesExtractor;
972 975
973 DISALLOW_COPY_AND_ASSIGN(HeapSnapshotGenerator); 976 DISALLOW_COPY_AND_ASSIGN(HeapSnapshotGenerator);
974 }; 977 };
975 978
976 } } // namespace v8::internal 979 } } // namespace v8::internal
977 980
978 #endif // ENABLE_LOGGING_AND_PROFILING 981 #endif // ENABLE_LOGGING_AND_PROFILING
979 982
980 #endif // V8_PROFILE_GENERATOR_H_ 983 #endif // V8_PROFILE_GENERATOR_H_
OLDNEW
« no previous file with comments | « no previous file | src/profile-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698