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 | |
269 class MemoryMappedFile { | 267 class MemoryMappedFile { |
270 public: | 268 public: |
271 static MemoryMappedFile* open(const char* name); | 269 static MemoryMappedFile* open(const char* name); |
272 static MemoryMappedFile* create(const char* name, int size, void* initial); | 270 static MemoryMappedFile* create(const char* name, int size, void* initial); |
273 virtual ~MemoryMappedFile() { } | 271 virtual ~MemoryMappedFile() { } |
274 virtual void* memory() = 0; | 272 virtual void* memory() = 0; |
275 virtual int size() = 0; | 273 virtual int size() = 0; |
276 }; | 274 }; |
277 | 275 |
278 // Safe formatting print. Ensures that str is always null-terminated. | 276 // Safe formatting print. Ensures that str is always null-terminated. |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
590 char name_[kMaxThreadNameLength]; | 588 char name_[kMaxThreadNameLength]; |
591 int stack_size_; | 589 int stack_size_; |
592 Semaphore* start_semaphore_; | 590 Semaphore* start_semaphore_; |
593 | 591 |
594 DISALLOW_COPY_AND_ASSIGN(Thread); | 592 DISALLOW_COPY_AND_ASSIGN(Thread); |
595 }; | 593 }; |
596 | 594 |
597 } } // namespace v8::internal | 595 } } // namespace v8::internal |
598 | 596 |
599 #endif // V8_PLATFORM_H_ | 597 #endif // V8_PLATFORM_H_ |
OLD | NEW |