Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(80)

Side by Side Diff: src/base/platform/platform.h

Issue 1934453003: [prof] export slide offset in profile log (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: intptr_t, lint Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/base/platform/platform-macos.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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), slide(0) {}
Yang 2016/05/02 06:41:01 Can we call this aslr_slide across this whole CL?
fedor.indutny 2016/05/02 07:33:21 Acknowledged.
241 SharedLibraryAddress(const std::string& library_path, uintptr_t start,
242 uintptr_t end, intptr_t slide)
243 : library_path(library_path), start(start), end(end), slide(slide) {}
241 244
242 std::string library_path; 245 std::string library_path;
243 uintptr_t start; 246 uintptr_t start;
244 uintptr_t end; 247 uintptr_t end;
248 intptr_t slide;
245 }; 249 };
246 250
247 static std::vector<SharedLibraryAddress> GetSharedLibraryAddresses(); 251 static std::vector<SharedLibraryAddress> GetSharedLibraryAddresses();
248 252
249 // Support for the profiler. Notifies the external profiling 253 // Support for the profiler. Notifies the external profiling
250 // process that a code moving garbage collection starts. Can do 254 // process that a code moving garbage collection starts. Can do
251 // nothing, in which case the code objects must not move (e.g., by 255 // nothing, in which case the code objects must not move (e.g., by
252 // using --never-compact) if accurate profiling is desired. 256 // using --never-compact) if accurate profiling is desired.
253 static void SignalCodeMovingGC(); 257 static void SignalCodeMovingGC();
254 258
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 int stack_size_; 486 int stack_size_;
483 Semaphore* start_semaphore_; 487 Semaphore* start_semaphore_;
484 488
485 DISALLOW_COPY_AND_ASSIGN(Thread); 489 DISALLOW_COPY_AND_ASSIGN(Thread);
486 }; 490 };
487 491
488 } // namespace base 492 } // namespace base
489 } // namespace v8 493 } // namespace v8
490 494
491 #endif // V8_BASE_PLATFORM_PLATFORM_H_ 495 #endif // V8_BASE_PLATFORM_PLATFORM_H_
OLDNEW
« no previous file with comments | « no previous file | src/base/platform/platform-macos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698