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

Unified Diff: src/top.h

Issue 112082: Fix determining of JS lower stack bottom used in profiler's JS stack tracer to work with Chromium. (Closed)
Patch Set: Created 11 years, 7 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.cc ('k') | src/top.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_; }
« no previous file with comments | « src/log.cc ('k') | src/top.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698