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

Unified Diff: src/log.cc

Issue 2644233003: Revert of [debugger api] remove legacy JSON debug protocol. (Closed)
Patch Set: Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/log.h ('k') | no next file » | 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 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();
« no previous file with comments | « src/log.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698