Chromium Code Reviews| Index: src/compiler.h |
| diff --git a/src/compiler.h b/src/compiler.h |
| index 00074c899b4d06dc58f6bb2adc52d01515fe660c..cef068f723f471fc80496629d38a38f7a9515754 100644 |
| --- a/src/compiler.h |
| +++ b/src/compiler.h |
| @@ -47,6 +47,12 @@ enum ParseRestriction { |
| ONLY_SINGLE_FUNCTION_LITERAL // Only a single FunctionLiteral expression. |
| }; |
| +struct OffsetRange { |
| + OffsetRange(int from, int to) : from(from), to(to) {} |
| + int from; |
| + int to; |
| +}; |
| + |
| // CompilationInfo encapsulates some information known at compile time. It |
| // is constructed based on the resources available at compile-time. |
| class CompilationInfo { |
| @@ -257,6 +263,20 @@ class CompilationInfo { |
| prologue_offset_ = prologue_offset; |
| } |
| + // Adds offset range [from, to) where fp register does not point |
| + // to the current frame base. Used in CPU profiler to detect stack |
| + // samples where top frame is not setup. |
|
Jakob Kummerow
2013/05/14 12:38:51
nit: s/setup/set up/
yurys
2013/05/14 22:51:19
Done.
|
| + inline void AddNoFrameRange(int from, int to) { |
| + if (no_frame_ranges_) no_frame_ranges_->Add(OffsetRange(from, to)); |
| + } |
| + |
| + List<OffsetRange>* ReleaseNoFrameRanges() { |
| + List<OffsetRange>* result = no_frame_ranges_; |
| + no_frame_ranges_ = NULL; |
| + return result; |
| + } |
| + |
| + |
| private: |
| Isolate* isolate_; |
| @@ -361,6 +381,8 @@ class CompilationInfo { |
| int prologue_offset_; |
| + List<OffsetRange>* no_frame_ranges_; |
| + |
| // A copy of shared_info()->opt_count() to avoid handle deref |
| // during graph optimization. |
| int opt_count_; |