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

Unified Diff: src/log.cc

Issue 437004: Store API callback entry address prior to entering a callback. (Closed)
Patch Set: Created 11 years, 1 month 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/log-inl.h » ('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 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;
« no previous file with comments | « src/log.h ('k') | src/log-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698