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

Unified Diff: src/log.cc

Issue 290093005: Introduce a separate event for CodeDisableOpt (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: removed extra line Created 6 years, 7 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 | « src/log.h ('k') | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/log.cc
diff --git a/src/log.cc b/src/log.cc
index 623e08d8fae6b776c0c8dad24d294f6b18132f1f..5c88cb492c95a8adcbd44419ebfc73eb36a18c92 100644
--- a/src/log.cc
+++ b/src/log.cc
@@ -230,6 +230,7 @@ class PerfBasicLogger : public CodeEventLogger {
virtual ~PerfBasicLogger();
virtual void CodeMoveEvent(Address from, Address to) { }
+ virtual void CodeDisableOptEvent(Code* code, SharedFunctionInfo* shared) { }
virtual void CodeDeleteEvent(Address from) { }
private:
@@ -295,6 +296,7 @@ class PerfJitLogger : public CodeEventLogger {
virtual ~PerfJitLogger();
virtual void CodeMoveEvent(Address from, Address to) { }
+ virtual void CodeDisableOptEvent(Code* code, SharedFunctionInfo* shared) { }
virtual void CodeDeleteEvent(Address from) { }
private:
@@ -457,6 +459,7 @@ class LowLevelLogger : public CodeEventLogger {
virtual ~LowLevelLogger();
virtual void CodeMoveEvent(Address from, Address to);
+ virtual void CodeDisableOptEvent(Code* code, SharedFunctionInfo* shared) { }
virtual void CodeDeleteEvent(Address from);
virtual void SnapshotPositionEvent(Address addr, int pos);
virtual void CodeMovingGCEvent();
@@ -623,6 +626,7 @@ class JitLogger : public CodeEventLogger {
explicit JitLogger(JitCodeEventHandler code_event_handler);
virtual void CodeMoveEvent(Address from, Address to);
+ virtual void CodeDisableOptEvent(Code* code, SharedFunctionInfo* shared) { }
virtual void CodeDeleteEvent(Address from);
virtual void AddCodeLinePosInfoEvent(
void* jit_handler_data,
@@ -1446,6 +1450,24 @@ void Logger::CodeCreateEvent(LogEventsAndTags tag,
}
+void Logger::CodeDisableOptEvent(Code* code,
+ SharedFunctionInfo* shared) {
+ PROFILER_LOG(CodeDisableOptEvent(code, shared));
+
+ if (!is_logging_code_events()) return;
+ CALL_LISTENERS(CodeDisableOptEvent(code, shared));
+
+ if (!FLAG_log_code || !log_->IsEnabled()) return;
+ Log::MessageBuilder msg(log_);
+ msg.Append("%s,", kLogEventsNames[CODE_DISABLE_OPT_EVENT]);
+ SmartArrayPointer<char> name =
+ shared->DebugName()->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL);
+ msg.Append("\"%s\",", name.get());
+ msg.Append("\"%s\"\n", GetBailoutReason(shared->DisableOptimizationReason()));
+ msg.WriteToLogFile();
+}
+
+
void Logger::CodeMovingGCEvent() {
PROFILER_LOG(CodeMovingGCEvent());
« no previous file with comments | « src/log.h ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698