OLD | NEW |
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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 } | 205 } |
206 | 206 |
207 | 207 |
208 int OS::ActivationFrameAlignment() { | 208 int OS::ActivationFrameAlignment() { |
209 // OS X activation frames must be 16 byte-aligned; see "Mac OS X ABI | 209 // OS X activation frames must be 16 byte-aligned; see "Mac OS X ABI |
210 // Function Call Guide". | 210 // Function Call Guide". |
211 return 16; | 211 return 16; |
212 } | 212 } |
213 | 213 |
214 | 214 |
215 int OS::StackWalk(StackFrame* frames, int frames_size) { | 215 int OS::StackWalk(Vector<StackFrame> frames) { |
216 #ifndef MAC_OS_X_VERSION_10_5 | 216 #ifndef MAC_OS_X_VERSION_10_5 |
217 return 0; | 217 return 0; |
218 #else | 218 #else |
| 219 int frames_size = frames.length(); |
219 void** addresses = NewArray<void*>(frames_size); | 220 void** addresses = NewArray<void*>(frames_size); |
220 int frames_count = backtrace(addresses, frames_size); | 221 int frames_count = backtrace(addresses, frames_size); |
221 | 222 |
222 char** symbols; | 223 char** symbols; |
223 symbols = backtrace_symbols(addresses, frames_count); | 224 symbols = backtrace_symbols(addresses, frames_count); |
224 if (symbols == NULL) { | 225 if (symbols == NULL) { |
225 DeleteArray(addresses); | 226 DeleteArray(addresses); |
226 return kStackWalkError; | 227 return kStackWalkError; |
227 } | 228 } |
228 | 229 |
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
557 } | 558 } |
558 | 559 |
559 // This sampler is no longer the active sampler. | 560 // This sampler is no longer the active sampler. |
560 active_sampler_ = NULL; | 561 active_sampler_ = NULL; |
561 active_ = false; | 562 active_ = false; |
562 } | 563 } |
563 | 564 |
564 #endif // ENABLE_LOGGING_AND_PROFILING | 565 #endif // ENABLE_LOGGING_AND_PROFILING |
565 | 566 |
566 } } // namespace v8::internal | 567 } } // namespace v8::internal |
OLD | NEW |