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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 | 163 |
164 int i = 0; | 164 int i = 0; |
165 const Address callback = VMState::external_callback(); | 165 const Address callback = VMState::external_callback(); |
166 if (callback != NULL) { | 166 if (callback != NULL) { |
167 sample->stack[i++] = callback; | 167 sample->stack[i++] = callback; |
168 } | 168 } |
169 | 169 |
170 SafeStackTraceFrameIterator it(sample->fp, sample->sp, | 170 SafeStackTraceFrameIterator it(sample->fp, sample->sp, |
171 sample->sp, js_entry_sp); | 171 sample->sp, js_entry_sp); |
172 while (!it.done() && i < TickSample::kMaxFramesCount) { | 172 while (!it.done() && i < TickSample::kMaxFramesCount) { |
173 sample->stack[i++] = it.frame()->pc(); | 173 sample->stack[i++] = reinterpret_cast<Address>(it.frame()->function()); |
174 it.Advance(); | 174 it.Advance(); |
175 } | 175 } |
176 sample->frames_count = i; | 176 sample->frames_count = i; |
177 } | 177 } |
178 | 178 |
179 | 179 |
180 // | 180 // |
181 // Ticker used to provide ticks to the profiler and the sliding state | 181 // Ticker used to provide ticks to the profiler and the sliding state |
182 // window. | 182 // window. |
183 // | 183 // |
(...skipping 1364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1548 } | 1548 } |
1549 // Otherwise, if the sliding state window computation has not been | 1549 // Otherwise, if the sliding state window computation has not been |
1550 // started we do it now. | 1550 // started we do it now. |
1551 if (sliding_state_window_ == NULL) { | 1551 if (sliding_state_window_ == NULL) { |
1552 sliding_state_window_ = new SlidingStateWindow(); | 1552 sliding_state_window_ = new SlidingStateWindow(); |
1553 } | 1553 } |
1554 #endif | 1554 #endif |
1555 } | 1555 } |
1556 | 1556 |
1557 } } // namespace v8::internal | 1557 } } // namespace v8::internal |
OLD | NEW |