OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
249 | 249 |
250 // Sleep for a number of milliseconds. | 250 // Sleep for a number of milliseconds. |
251 static void Sleep(const int milliseconds); | 251 static void Sleep(const int milliseconds); |
252 | 252 |
253 // Abort the current process. | 253 // Abort the current process. |
254 static void Abort(); | 254 static void Abort(); |
255 | 255 |
256 // Debug break. | 256 // Debug break. |
257 static void DebugBreak(); | 257 static void DebugBreak(); |
258 | 258 |
259 // Dump C++ current stack trace (only functional on Linux). | |
260 static void DumpBacktrace(); | |
261 | |
262 // Walk the stack. | 259 // Walk the stack. |
263 static const int kStackWalkError = -1; | 260 static const int kStackWalkError = -1; |
264 static const int kStackWalkMaxNameLen = 256; | 261 static const int kStackWalkMaxNameLen = 256; |
265 static const int kStackWalkMaxTextLen = 256; | 262 static const int kStackWalkMaxTextLen = 256; |
266 struct StackFrame { | 263 struct StackFrame { |
267 void* address; | 264 void* address; |
268 char text[kStackWalkMaxTextLen]; | 265 char text[kStackWalkMaxTextLen]; |
269 }; | 266 }; |
270 | 267 |
271 class MemoryMappedFile { | 268 class MemoryMappedFile { |
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
592 char name_[kMaxThreadNameLength]; | 589 char name_[kMaxThreadNameLength]; |
593 int stack_size_; | 590 int stack_size_; |
594 Semaphore* start_semaphore_; | 591 Semaphore* start_semaphore_; |
595 | 592 |
596 DISALLOW_COPY_AND_ASSIGN(Thread); | 593 DISALLOW_COPY_AND_ASSIGN(Thread); |
597 }; | 594 }; |
598 | 595 |
599 } } // namespace v8::internal | 596 } } // namespace v8::internal |
600 | 597 |
601 #endif // V8_PLATFORM_H_ | 598 #endif // V8_PLATFORM_H_ |
OLD | NEW |