Chromium Code Reviews| Index: src/top.h |
| diff --git a/src/top.h b/src/top.h |
| index 8e928ed6313645acb389ed7ebdafc6dc7e5922f7..dcaeec50cab21a167c2cabdda725cfb4b2d4e114 100644 |
| --- a/src/top.h |
| +++ b/src/top.h |
| @@ -65,6 +65,9 @@ class ThreadLocalTop BASE_EMBEDDED { |
| // Stack. |
| Address c_entry_fp_; // the frame pointer of the top c entry frame |
| Address handler_; // try-blocks are chained through the stack |
| +#ifdef ENABLE_LOGGING_AND_PROFILING |
| + Address js_entry_sp_; // the stack pointer of the bottom js entry frame |
| +#endif |
| bool stack_is_cooked_; |
| inline bool stack_is_cooked() { return stack_is_cooked_; } |
| inline void set_stack_is_cooked(bool value) { stack_is_cooked_ = value; } |
| @@ -76,9 +79,16 @@ class ThreadLocalTop BASE_EMBEDDED { |
| v8::FailedAccessCheckCallback failed_access_check_callback_; |
| }; |
| +#ifdef ENABLE_LOGGING_AND_PROFILING |
| +#define JS_ENTRY_SP_ADDRESS(C) C(js_entry_sp_address) |
| +#else |
| +#define JS_ENTRY_SP_ADDRESS(C) |
| +#endif |
| + |
| #define TOP_ADDRESS_LIST(C) \ |
|
Søren Thygesen Gjesse
2009/06/02 09:00:25
How about making two lists TOP_ADDRESS_LIST_ALWAYS
Mikhail Naganov
2009/06/02 09:32:32
Good idea. Done.
|
| C(handler_address) \ |
| C(c_entry_fp_address) \ |
| + JS_ENTRY_SP_ADDRESS(C) \ |
| C(context_address) \ |
| C(pending_exception_address) \ |
| C(external_caught_exception_address) |
| @@ -179,6 +189,16 @@ class Top { |
| } |
| static inline Address* handler_address() { return &thread_local_.handler_; } |
| +#ifdef ENABLE_LOGGING_AND_PROFILING |
| + // Bottom JS entry (see StackTracer::Trace in log.cc). |
| + static Address js_entry_sp(ThreadLocalTop* thread) { |
| + return thread->js_entry_sp_; |
| + } |
| + static inline Address* js_entry_sp_address() { |
| + return &thread_local_.js_entry_sp_; |
| + } |
| +#endif |
| + |
| // Generated code scratch locations. |
| static void* formal_count_address() { return &thread_local_.formal_count_; } |