| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // This module contains the platform-specific code. This make the rest of the | 5 // This module contains the platform-specific code. This make the rest of the |
| 6 // code less dependent on operating system, compilers and runtime libraries. | 6 // code less dependent on operating system, compilers and runtime libraries. |
| 7 // This module does specifically not deal with differences between different | 7 // This module does specifically not deal with differences between different |
| 8 // processor architecture. | 8 // processor architecture. |
| 9 // The platform classes have the same definition for all platforms. The | 9 // The platform classes have the same definition for all platforms. The |
| 10 // implementation for a particular platform is put in platform_<os>.cc. | 10 // implementation for a particular platform is put in platform_<os>.cc. |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 const char* format, ...); | 228 const char* format, ...); |
| 229 static PRINTF_FORMAT(3, 0) int VSNPrintF(char* str, int length, | 229 static PRINTF_FORMAT(3, 0) int VSNPrintF(char* str, int length, |
| 230 const char* format, va_list args); | 230 const char* format, va_list args); |
| 231 | 231 |
| 232 static char* StrChr(char* str, int c); | 232 static char* StrChr(char* str, int c); |
| 233 static void StrNCpy(char* dest, int length, const char* src, size_t n); | 233 static void StrNCpy(char* dest, int length, const char* src, size_t n); |
| 234 | 234 |
| 235 // Support for the profiler. Can do nothing, in which case ticks | 235 // Support for the profiler. Can do nothing, in which case ticks |
| 236 // occuring in shared libraries will not be properly accounted for. | 236 // occuring in shared libraries will not be properly accounted for. |
| 237 struct SharedLibraryAddress { | 237 struct SharedLibraryAddress { |
| 238 SharedLibraryAddress( | 238 SharedLibraryAddress(const std::string& library_path, uintptr_t start, |
| 239 const std::string& library_path, uintptr_t start, uintptr_t end) | 239 uintptr_t end) |
| 240 : library_path(library_path), start(start), end(end) {} | 240 : library_path(library_path), start(start), end(end), aslr_slide(0) {} |
| 241 SharedLibraryAddress(const std::string& library_path, uintptr_t start, |
| 242 uintptr_t end, intptr_t aslr_slide) |
| 243 : library_path(library_path), |
| 244 start(start), |
| 245 end(end), |
| 246 aslr_slide(aslr_slide) {} |
| 241 | 247 |
| 242 std::string library_path; | 248 std::string library_path; |
| 243 uintptr_t start; | 249 uintptr_t start; |
| 244 uintptr_t end; | 250 uintptr_t end; |
| 251 intptr_t aslr_slide; |
| 245 }; | 252 }; |
| 246 | 253 |
| 247 static std::vector<SharedLibraryAddress> GetSharedLibraryAddresses(); | 254 static std::vector<SharedLibraryAddress> GetSharedLibraryAddresses(); |
| 248 | 255 |
| 249 // Support for the profiler. Notifies the external profiling | 256 // Support for the profiler. Notifies the external profiling |
| 250 // process that a code moving garbage collection starts. Can do | 257 // process that a code moving garbage collection starts. Can do |
| 251 // nothing, in which case the code objects must not move (e.g., by | 258 // nothing, in which case the code objects must not move (e.g., by |
| 252 // using --never-compact) if accurate profiling is desired. | 259 // using --never-compact) if accurate profiling is desired. |
| 253 static void SignalCodeMovingGC(); | 260 static void SignalCodeMovingGC(); |
| 254 | 261 |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 482 int stack_size_; | 489 int stack_size_; |
| 483 Semaphore* start_semaphore_; | 490 Semaphore* start_semaphore_; |
| 484 | 491 |
| 485 DISALLOW_COPY_AND_ASSIGN(Thread); | 492 DISALLOW_COPY_AND_ASSIGN(Thread); |
| 486 }; | 493 }; |
| 487 | 494 |
| 488 } // namespace base | 495 } // namespace base |
| 489 } // namespace v8 | 496 } // namespace v8 |
| 490 | 497 |
| 491 #endif // V8_BASE_PLATFORM_PLATFORM_H_ | 498 #endif // V8_BASE_PLATFORM_PLATFORM_H_ |
| OLD | NEW |