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

Side by Side Diff: src/cpu-profiler.h

Issue 9227007: Version 3.8.6 (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 8 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « src/cpu.h ('k') | src/cpu-profiler.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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 } while (false) 197 } while (false)
198 198
199 199
200 namespace v8 { 200 namespace v8 {
201 namespace internal { 201 namespace internal {
202 202
203 203
204 // TODO(isolates): isolatify this class. 204 // TODO(isolates): isolatify this class.
205 class CpuProfiler { 205 class CpuProfiler {
206 public: 206 public:
207 static void Setup(); 207 static void SetUp();
208 static void TearDown(); 208 static void TearDown();
209 209
210 static void StartProfiling(const char* title); 210 static void StartProfiling(const char* title);
211 static void StartProfiling(String* title); 211 static void StartProfiling(String* title);
212 static CpuProfile* StopProfiling(const char* title); 212 static CpuProfile* StopProfiling(const char* title);
213 static CpuProfile* StopProfiling(Object* security_token, String* title); 213 static CpuProfile* StopProfiling(Object* security_token, String* title);
214 static int GetProfilesCount(); 214 static int GetProfilesCount();
215 static CpuProfile* GetProfile(Object* security_token, int index); 215 static CpuProfile* GetProfile(Object* security_token, int index);
216 static CpuProfile* FindProfile(Object* security_token, unsigned uid); 216 static CpuProfile* FindProfile(Object* security_token, unsigned uid);
217 static void DeleteAllProfiles(); 217 static void DeleteAllProfiles();
218 static void DeleteProfile(CpuProfile* profile); 218 static void DeleteProfile(CpuProfile* profile);
219 static bool HasDetachedProfiles(); 219 static bool HasDetachedProfiles();
220 220
221 // Invoked from stack sampler (thread or signal handler.) 221 // Invoked from stack sampler (thread or signal handler.)
222 static TickSample* TickSampleEvent(Isolate* isolate); 222 static TickSample* TickSampleEvent(Isolate* isolate);
223 223
224 // Must be called via PROFILE macro, otherwise will crash when 224 // Must be called via PROFILE macro, otherwise will crash when
225 // profiling is not enabled. 225 // profiling is not enabled.
226 static void CallbackEvent(String* name, Address entry_point); 226 static void CallbackEvent(String* name, Address entry_point);
227 static void CodeCreateEvent(Logger::LogEventsAndTags tag, 227 static void CodeCreateEvent(Logger::LogEventsAndTags tag,
228 Code* code, const char* comment); 228 Code* code, const char* comment);
229 static void CodeCreateEvent(Logger::LogEventsAndTags tag, 229 static void CodeCreateEvent(Logger::LogEventsAndTags tag,
230 Code* code, String* name); 230 Code* code, String* name);
231 static void CodeCreateEvent(Logger::LogEventsAndTags tag, 231 static void CodeCreateEvent(Logger::LogEventsAndTags tag,
232 Code* code, 232 Code* code,
233 SharedFunctionInfo *shared, 233 SharedFunctionInfo* shared,
234 String* name); 234 String* name);
235 static void CodeCreateEvent(Logger::LogEventsAndTags tag, 235 static void CodeCreateEvent(Logger::LogEventsAndTags tag,
236 Code* code, 236 Code* code,
237 SharedFunctionInfo *shared, 237 SharedFunctionInfo* shared,
238 String* source, int line); 238 String* source, int line);
239 static void CodeCreateEvent(Logger::LogEventsAndTags tag, 239 static void CodeCreateEvent(Logger::LogEventsAndTags tag,
240 Code* code, int args_count); 240 Code* code, int args_count);
241 static void CodeMovingGCEvent() {} 241 static void CodeMovingGCEvent() {}
242 static void CodeMoveEvent(Address from, Address to); 242 static void CodeMoveEvent(Address from, Address to);
243 static void CodeDeleteEvent(Address from); 243 static void CodeDeleteEvent(Address from);
244 static void GetterCallbackEvent(String* name, Address entry_point); 244 static void GetterCallbackEvent(String* name, Address entry_point);
245 static void RegExpCodeCreateEvent(Code* code, String* source); 245 static void RegExpCodeCreateEvent(Code* code, String* source);
246 static void SetterCallbackEvent(String* name, Address entry_point); 246 static void SetterCallbackEvent(String* name, Address entry_point);
247 static void SharedFunctionInfoMoveEvent(Address from, Address to); 247 static void SharedFunctionInfoMoveEvent(Address from, Address to);
(...skipping 27 matching lines...) Expand all
275 Atomic32 is_profiling_; 275 Atomic32 is_profiling_;
276 276
277 private: 277 private:
278 DISALLOW_COPY_AND_ASSIGN(CpuProfiler); 278 DISALLOW_COPY_AND_ASSIGN(CpuProfiler);
279 }; 279 };
280 280
281 } } // namespace v8::internal 281 } } // namespace v8::internal
282 282
283 283
284 #endif // V8_CPU_PROFILER_H_ 284 #endif // V8_CPU_PROFILER_H_
OLDNEW
« no previous file with comments | « src/cpu.h ('k') | src/cpu-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698