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

Unified Diff: src/runtime.cc

Issue 544143003: Store frame pointers (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.27
Patch Set: ptal Created 6 years, 3 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/mirror-debugger.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/runtime.cc
diff --git a/src/runtime.cc b/src/runtime.cc
index 36b3177b7c02c474b058bc3f0f8f2a8c1aa5b4c1..b0b585191d81b8fbfdd5fb617182dc5ab5464493 100644
--- a/src/runtime.cc
+++ b/src/runtime.cc
@@ -11192,9 +11192,10 @@ static const int kFrameDetailsLocalCountIndex = 4;
static const int kFrameDetailsSourcePositionIndex = 5;
static const int kFrameDetailsConstructCallIndex = 6;
static const int kFrameDetailsAtReturnIndex = 7;
-static const int kFrameDetailsFlagsIndex = 8;
-static const int kFrameDetailsFirstDynamicIndex = 9;
-
+static const int kFrameDetailsFramePointerHighIndex = 8;
+static const int kFrameDetailsFramePointerLowIndex = 9;
+static const int kFrameDetailsFlagsIndex = 10;
+static const int kFrameDetailsFirstDynamicIndex = 11;
static SaveContext* FindSavedContextForFrame(Isolate* isolate,
JavaScriptFrame* frame) {
@@ -11220,7 +11221,9 @@ static SaveContext* FindSavedContextForFrame(Isolate* isolate,
// 5: Source position
// 6: Constructor call
// 7: Is at return
-// 8: Flags
+// 8: Frame pointer high
+// 9: Frame pointer low
+// 10: Flags
// Arguments name, value
// Locals name, value
// Return value if any
@@ -11405,6 +11408,16 @@ RUNTIME_FUNCTION(Runtime_GetFrameDetails) {
// Add the at return information.
details->set(kFrameDetailsAtReturnIndex, heap->ToBoolean(at_return));
+ uintptr_t frame_pointer =
+ reinterpret_cast<uintptr_t>(it.frame()->UnpaddedFP());
+
+ details->set(kFrameDetailsFramePointerHighIndex,
+ *isolate->factory()->NewNumberFromUint(
Vyacheslav Egorov (Google) 2014/09/10 22:34:25 this is GC unsafe in V8, you need to split it into
Jacob 2014/09/11 00:45:56 Done.
+ static_cast<uint32_t>(frame_pointer >> 32)));
+ details->set(kFrameDetailsFramePointerLowIndex,
+ *isolate->factory()->NewNumberFromUint(
+ static_cast<uint32_t>(frame_pointer & 0xffffffff)));
+
// Add flags to indicate information on whether this frame is
// bit 0: invoked in the debugger context.
// bit 1: optimized frame.
« no previous file with comments | « src/mirror-debugger.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698