Index: src/log.cc |
diff --git a/src/log.cc b/src/log.cc |
index 1c82f8525c95f954e87091a7d3b964e7c6fe24aa..d1d9a31e49b1b76a8201f9a13d8849a2f9bc299d 100644 |
--- a/src/log.cc |
+++ b/src/log.cc |
@@ -934,6 +934,21 @@ void Logger::HeapSampleJSRetainersEvent( |
} |
+void Logger::HeapSampleJSProducerEvent(const char* constructor, |
+ Address* stack) { |
+#ifdef ENABLE_LOGGING_AND_PROFILING |
+ if (!Log::IsEnabled() || !FLAG_log_gc) return; |
+ LogMessageBuilder msg; |
+ msg.Append("heap-js-prod-item,%s", constructor); |
+ while (*stack != NULL) { |
+ msg.Append(",0x%" V8PRIxPTR, *stack++); |
+ } |
+ msg.Append("\n"); |
+ msg.WriteToLogFile(); |
+#endif |
+} |
+ |
+ |
void Logger::DebugTag(const char* call_site_tag) { |
#ifdef ENABLE_LOGGING_AND_PROFILING |
if (!Log::IsEnabled() || !FLAG_log) return; |