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

Unified Diff: src/cpu-profiler.h

Issue 19724007: Logger: introduce abstract interface for CodeEvent listeners. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: comments addressed. rebaselined. Created 7 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/log.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/cpu-profiler.h
diff --git a/src/cpu-profiler.h b/src/cpu-profiler.h
index 66e2b8bd18ca8b9d047a4f37585d2a9f07f5d4f8..cbe3e3cf81dd16030a672f75b613fa481ef4187e 100644
--- a/src/cpu-profiler.h
+++ b/src/cpu-profiler.h
@@ -184,7 +184,7 @@ class ProfilerEventsProcessor : public Thread {
} while (false)
-class CpuProfiler {
+class CpuProfiler : public CodeEventListener {
public:
explicit CpuProfiler(Isolate* isolate);
@@ -193,7 +193,7 @@ class CpuProfiler {
ProfileGenerator* test_generator,
ProfilerEventsProcessor* test_processor);
- ~CpuProfiler();
+ virtual ~CpuProfiler();
void StartProfiling(const char* title, bool record_samples = false);
void StartProfiling(String* title, bool record_samples);
@@ -209,30 +209,30 @@ class CpuProfiler {
// Must be called via PROFILE macro, otherwise will crash when
// profiling is not enabled.
- void CallbackEvent(Name* name, Address entry_point);
- void CodeCreateEvent(Logger::LogEventsAndTags tag,
- Code* code, const char* comment);
- void CodeCreateEvent(Logger::LogEventsAndTags tag,
- Code* code, Name* name);
- void CodeCreateEvent(Logger::LogEventsAndTags tag,
- Code* code,
- SharedFunctionInfo* shared,
- CompilationInfo* info,
- Name* name);
- void CodeCreateEvent(Logger::LogEventsAndTags tag,
- Code* code,
- SharedFunctionInfo* shared,
- CompilationInfo* info,
- Name* source, int line);
- void CodeCreateEvent(Logger::LogEventsAndTags tag,
- Code* code, int args_count);
- void CodeMovingGCEvent() {}
- void CodeMoveEvent(Address from, Address to);
- void CodeDeleteEvent(Address from);
- void GetterCallbackEvent(Name* name, Address entry_point);
- void RegExpCodeCreateEvent(Code* code, String* source);
- void SetterCallbackEvent(Name* name, Address entry_point);
- void SharedFunctionInfoMoveEvent(Address from, Address to);
+ virtual void CallbackEvent(Name* name, Address entry_point);
+ virtual void CodeCreateEvent(Logger::LogEventsAndTags tag,
+ Code* code, const char* comment);
+ virtual void CodeCreateEvent(Logger::LogEventsAndTags tag,
+ Code* code, Name* name);
+ virtual void CodeCreateEvent(Logger::LogEventsAndTags tag,
+ Code* code,
+ SharedFunctionInfo* shared,
+ CompilationInfo* info,
+ Name* name);
+ virtual void CodeCreateEvent(Logger::LogEventsAndTags tag,
+ Code* code,
+ SharedFunctionInfo* shared,
+ CompilationInfo* info,
+ Name* source, int line);
+ virtual void CodeCreateEvent(Logger::LogEventsAndTags tag,
+ Code* code, int args_count);
+ virtual void CodeMovingGCEvent() {}
+ virtual void CodeMoveEvent(Address from, Address to);
+ virtual void CodeDeleteEvent(Address from);
+ virtual void GetterCallbackEvent(Name* name, Address entry_point);
+ virtual void RegExpCodeCreateEvent(Code* code, String* source);
+ virtual void SetterCallbackEvent(Name* name, Address entry_point);
+ virtual void SharedFunctionInfoMoveEvent(Address from, Address to);
INLINE(bool is_profiling() const) { return is_profiling_; }
bool* is_profiling_address() {
« no previous file with comments | « no previous file | src/log.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698