Index: src/log.cc |
diff --git a/src/log.cc b/src/log.cc |
index 039f026b2b111033f4e66d1bd27a581fa3dc623b..ae54ff915edb5e9ed8547e677b3cc75c35dcfe6e 100644 |
--- a/src/log.cc |
+++ b/src/log.cc |
@@ -155,12 +155,18 @@ void StackTracer::Trace(TickSample* sample) { |
return; |
} |
+ int i = 0; |
+ const Address callback = Logger::current_state_ ? |
Søren Thygesen Gjesse
2009/11/23 14:35:12
Please use Logger::current_state_ != NULL.
mnaganov (inactive)
2009/11/23 14:42:26
Done.
|
+ Logger::current_state_->external_callback() : NULL; |
+ if (callback != NULL) { |
+ sample->stack[i++] = callback; |
+ } |
+ |
SafeStackTraceFrameIterator it( |
reinterpret_cast<Address>(sample->fp), |
reinterpret_cast<Address>(sample->sp), |
reinterpret_cast<Address>(sample->sp), |
js_entry_sp); |
- int i = 0; |
while (!it.done() && i < TickSample::kMaxFramesCount) { |
sample->stack[i++] = it.frame()->pc(); |
it.Advance(); |
@@ -683,7 +689,7 @@ void Logger::CallbackEvent(String* name, Address entry_point) { |
msg.AppendAddress(entry_point); |
SmartPointer<char> str = |
name->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL); |
- msg.Append(",0,\"%s\"", *str); |
+ msg.Append(",1,\"%s\"", *str); |
if (FLAG_compress_log) { |
ASSERT(compression_helper_ != NULL); |
if (!compression_helper_->HandleMessage(&msg)) return; |