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

Side by Side Diff: src/frames-arm.cc

Issue 73020: Implemented "no heap access" mode for JSFrame which is used for stack sampling in profiler. (Closed)
Patch Set: Renamings as Soeren suggested Created 11 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 } 73 }
74 74
75 75
76 int JavaScriptFrame::GetProvidedParametersCount() const { 76 int JavaScriptFrame::GetProvidedParametersCount() const {
77 return ComputeParametersCount(); 77 return ComputeParametersCount();
78 } 78 }
79 79
80 80
81 Address JavaScriptFrame::GetCallerStackPointer() const { 81 Address JavaScriptFrame::GetCallerStackPointer() const {
82 int arguments; 82 int arguments;
83 if (Heap::gc_state() != Heap::NOT_IN_GC) { 83 if (Heap::gc_state() != Heap::NOT_IN_GC || disable_heap_access_) {
84 // The arguments for cooked frames are traversed as if they were 84 // The arguments for cooked frames are traversed as if they were
85 // expression stack elements of the calling frame. The reason for 85 // expression stack elements of the calling frame. The reason for
86 // this rather strange decision is that we cannot access the 86 // this rather strange decision is that we cannot access the
87 // function during mark-compact GCs when the stack is cooked. 87 // function during mark-compact GCs when the stack is cooked.
88 // In fact accessing heap objects (like function->shared() below) 88 // In fact accessing heap objects (like function->shared() below)
89 // at all during GC is problematic. 89 // at all during GC is problematic.
90 arguments = 0; 90 arguments = 0;
91 } else { 91 } else {
92 // Compute the number of arguments by getting the number of formal 92 // Compute the number of arguments by getting the number of formal
93 // parameters of the function. We must remember to take the 93 // parameters of the function. We must remember to take the
(...skipping 14 matching lines...) Expand all
108 108
109 109
110 Address InternalFrame::GetCallerStackPointer() const { 110 Address InternalFrame::GetCallerStackPointer() const {
111 // Internal frames have no arguments. The stack pointer of the 111 // Internal frames have no arguments. The stack pointer of the
112 // caller is at a fixed offset from the frame pointer. 112 // caller is at a fixed offset from the frame pointer.
113 return fp() + StandardFrameConstants::kCallerSPOffset; 113 return fp() + StandardFrameConstants::kCallerSPOffset;
114 } 114 }
115 115
116 116
117 } } // namespace v8::internal 117 } } // namespace v8::internal
OLDNEW
« src/frames.h ('K') | « src/frames.cc ('k') | src/frames-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698