Index: src/log.cc |
diff --git a/src/log.cc b/src/log.cc |
index ab4148c05d04337436dde4585bb3bf6e37dc3f99..0095cf43a7d5ddad1a38e4d37a899b7cae537fc9 100644 |
--- a/src/log.cc |
+++ b/src/log.cc |
@@ -1248,6 +1248,28 @@ |
msg.WriteToLogFile(); |
} |
+ |
+void Logger::DebugTag(const char* call_site_tag) { |
+ if (!log_->IsEnabled() || !FLAG_log) return; |
+ Log::MessageBuilder msg(log_); |
+ msg.Append("debug-tag,%s", call_site_tag); |
+ msg.WriteToLogFile(); |
+} |
+ |
+ |
+void Logger::DebugEvent(const char* event_type, Vector<uint16_t> parameter) { |
+ if (!log_->IsEnabled() || !FLAG_log) return; |
+ StringBuilder s(parameter.length() + 1); |
+ for (int i = 0; i < parameter.length(); ++i) { |
+ s.AddCharacter(static_cast<char>(parameter[i])); |
+ } |
+ char* parameter_string = s.Finalize(); |
+ Log::MessageBuilder msg(log_); |
+ msg.Append("debug-queue-event,%s,%15.3f,%s", event_type, |
+ base::OS::TimeCurrentMillis(), parameter_string); |
+ DeleteArray(parameter_string); |
+ msg.WriteToLogFile(); |
+} |
void Logger::RuntimeCallTimerEvent() { |
RuntimeCallStats* stats = isolate_->counters()->runtime_call_stats(); |