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

Unified Diff: src/log.h

Issue 537833002: Make logger use new sampling API for ticks and code events. Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/log.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/log.h
diff --git a/src/log.h b/src/log.h
index 1b32fded6c980fbc6c6ecf14ea2f310e22950409..c23b7f103ce3ba49494b4bd07ce5e89fe0740c63 100644
--- a/src/log.h
+++ b/src/log.h
@@ -229,6 +229,7 @@ class Logger {
void GetterCallbackEvent(Name* name, Address entry_point);
void SetterCallbackEvent(Name* name, Address entry_point);
// Emits a code create event.
+ void CodeCreateEvent(const v8::JitCodeEvent* event);
void CodeCreateEvent(LogEventsAndTags tag,
Code* code, const char* source);
void CodeCreateEvent(LogEventsAndTags tag,
@@ -249,9 +250,11 @@ class Logger {
void CodeMovingGCEvent();
// Emits a code create event for a RegExp.
void RegExpCodeCreateEvent(Code* code, String* source);
- // Emits a code move event.
+ // Emit a code move event.
+ void CodeMoveEvent(const v8::JitCodeEvent* event);
void CodeMoveEvent(Address from, Address to);
- // Emits a code delete event.
+ // Emit a code delete event.
+ void CodeDeleteEvent(const v8::JitCodeEvent* event);
void CodeDeleteEvent(Address from);
// Emits a code line info add event with Postion type.
void CodeLinePosInfoAddPositionEvent(void* jit_handler_data,
@@ -329,6 +332,20 @@ class Logger {
const char* name_;
};
+
+ class SamplerThread : public v8::base::Thread {
+ public:
+ explicit SamplerThread(v8::Isolate* isolate);
+ virtual ~SamplerThread();
+ virtual void Run();
+
+ private:
+ static void JitCodeEventHandler(const v8::JitCodeEvent* event);
+ v8::Isolate* isolate_;
+ bool done_sampling_;
+ };
+
+
// ==== Events logged by --log-regexp ====
// Regexp compilation and execution events.
@@ -395,7 +412,9 @@ class Logger {
void InitNameBuffer(LogEventsAndTags tag);
// Emits a profiler tick event. Used by the profiler thread.
- void TickEvent(TickSample* sample, bool overflow);
+ void TickEvent(TickSample* sample, bool overflow) {}
+
+ void LogSample(v8::Sample* sample);
void ApiEvent(const char* name, ...);
@@ -435,6 +454,7 @@ class Logger {
LowLevelLogger* ll_logger_;
JitLogger* jit_logger_;
List<CodeEventListener*> listeners_;
+ SamplerThread* sampler_thread_;
// Guards against multiple calls to TearDown() that can happen in some tests.
// 'true' between SetUp() and TearDown().
« no previous file with comments | « no previous file | src/log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698