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

Side by Side Diff: src/log.cc

Issue 3436006: Enhance SafeStackFrameIterator to avoid triggering assertions in debug mode. (Closed)
Patch Set: Created 10 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 unified diff | Download patch
« no previous file with comments | « src/ia32/frames-ia32.cc ('k') | src/mips/frames-mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 164
165 int i = 0; 165 int i = 0;
166 const Address callback = VMState::external_callback(); 166 const Address callback = VMState::external_callback();
167 if (callback != NULL) { 167 if (callback != NULL) {
168 sample->stack[i++] = callback; 168 sample->stack[i++] = callback;
169 } 169 }
170 170
171 SafeStackTraceFrameIterator it(sample->fp, sample->sp, 171 SafeStackTraceFrameIterator it(sample->fp, sample->sp,
172 sample->sp, js_entry_sp); 172 sample->sp, js_entry_sp);
173 while (!it.done() && i < TickSample::kMaxFramesCount) { 173 while (!it.done() && i < TickSample::kMaxFramesCount) {
174 sample->stack[i++] = reinterpret_cast<Address>(it.frame()->function()); 174 sample->stack[i++] =
175 reinterpret_cast<Address>(it.frame()->function_slot_object()) -
176 kHeapObjectTag;
175 it.Advance(); 177 it.Advance();
176 } 178 }
177 sample->frames_count = i; 179 sample->frames_count = i;
178 } 180 }
179 181
180 182
181 // 183 //
182 // Ticker used to provide ticks to the profiler and the sliding state 184 // Ticker used to provide ticks to the profiler and the sliding state
183 // window. 185 // window.
184 // 186 //
(...skipping 1369 matching lines...) Expand 10 before | Expand all | Expand 10 after
1554 } 1556 }
1555 // Otherwise, if the sliding state window computation has not been 1557 // Otherwise, if the sliding state window computation has not been
1556 // started we do it now. 1558 // started we do it now.
1557 if (sliding_state_window_ == NULL) { 1559 if (sliding_state_window_ == NULL) {
1558 sliding_state_window_ = new SlidingStateWindow(); 1560 sliding_state_window_ = new SlidingStateWindow();
1559 } 1561 }
1560 #endif 1562 #endif
1561 } 1563 }
1562 1564
1563 } } // namespace v8::internal 1565 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/frames-ia32.cc ('k') | src/mips/frames-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698