OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 | 141 |
142 // | 142 // |
143 // StackTracer implementation | 143 // StackTracer implementation |
144 // | 144 // |
145 void StackTracer::Trace(TickSample* sample) { | 145 void StackTracer::Trace(TickSample* sample) { |
146 sample->function = NULL; | 146 sample->function = NULL; |
147 sample->frames_count = 0; | 147 sample->frames_count = 0; |
148 | 148 |
149 if (sample->state == GC) return; | 149 if (sample->state == GC) return; |
150 | 150 |
151 const Address js_entry_sp = Top::js_entry_sp( | 151 const Address js_entry_sp = Isolate::js_entry_sp( |
152 Isolate::Current()->thread_local_top()); | 152 Isolate::Current()->thread_local_top()); |
153 if (js_entry_sp == 0) { | 153 if (js_entry_sp == 0) { |
154 // Not executing JS now. | 154 // Not executing JS now. |
155 return; | 155 return; |
156 } | 156 } |
157 | 157 |
158 const Address functionAddr = | 158 const Address functionAddr = |
159 sample->fp + JavaScriptFrameConstants::kFunctionOffset; | 159 sample->fp + JavaScriptFrameConstants::kFunctionOffset; |
160 if (SafeStackFrameIterator::IsWithinBounds(sample->sp, js_entry_sp, | 160 if (SafeStackFrameIterator::IsWithinBounds(sample->sp, js_entry_sp, |
161 functionAddr)) { | 161 functionAddr)) { |
(...skipping 1391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1553 } | 1553 } |
1554 // Otherwise, if the sliding state window computation has not been | 1554 // Otherwise, if the sliding state window computation has not been |
1555 // started we do it now. | 1555 // started we do it now. |
1556 if (sliding_state_window_ == NULL) { | 1556 if (sliding_state_window_ == NULL) { |
1557 sliding_state_window_ = new SlidingStateWindow(); | 1557 sliding_state_window_ = new SlidingStateWindow(); |
1558 } | 1558 } |
1559 #endif | 1559 #endif |
1560 } | 1560 } |
1561 | 1561 |
1562 } } // namespace v8::internal | 1562 } } // namespace v8::internal |
OLD | NEW |