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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 | 257 |
258 // Walk the stack. | 258 // Walk the stack. |
259 static const int kStackWalkError = -1; | 259 static const int kStackWalkError = -1; |
260 static const int kStackWalkMaxNameLen = 256; | 260 static const int kStackWalkMaxNameLen = 256; |
261 static const int kStackWalkMaxTextLen = 256; | 261 static const int kStackWalkMaxTextLen = 256; |
262 struct StackFrame { | 262 struct StackFrame { |
263 void* address; | 263 void* address; |
264 char text[kStackWalkMaxTextLen]; | 264 char text[kStackWalkMaxTextLen]; |
265 }; | 265 }; |
266 | 266 |
| 267 static int StackWalk(Vector<StackFrame> frames); |
| 268 |
267 class MemoryMappedFile { | 269 class MemoryMappedFile { |
268 public: | 270 public: |
269 static MemoryMappedFile* open(const char* name); | 271 static MemoryMappedFile* open(const char* name); |
270 static MemoryMappedFile* create(const char* name, int size, void* initial); | 272 static MemoryMappedFile* create(const char* name, int size, void* initial); |
271 virtual ~MemoryMappedFile() { } | 273 virtual ~MemoryMappedFile() { } |
272 virtual void* memory() = 0; | 274 virtual void* memory() = 0; |
273 virtual int size() = 0; | 275 virtual int size() = 0; |
274 }; | 276 }; |
275 | 277 |
276 // Safe formatting print. Ensures that str is always null-terminated. | 278 // Safe formatting print. Ensures that str is always null-terminated. |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
588 char name_[kMaxThreadNameLength]; | 590 char name_[kMaxThreadNameLength]; |
589 int stack_size_; | 591 int stack_size_; |
590 Semaphore* start_semaphore_; | 592 Semaphore* start_semaphore_; |
591 | 593 |
592 DISALLOW_COPY_AND_ASSIGN(Thread); | 594 DISALLOW_COPY_AND_ASSIGN(Thread); |
593 }; | 595 }; |
594 | 596 |
595 } } // namespace v8::internal | 597 } } // namespace v8::internal |
596 | 598 |
597 #endif // V8_PLATFORM_H_ | 599 #endif // V8_PLATFORM_H_ |
OLD | NEW |