Fix issue 434: make OS::LogSharedLibraryAddresses work on x64 Mac.
Also, enable tick processor to process 64-bit profiler logs on Mac. BUG=http://code.google.com/p/v8/issues/detail?id=434 Review URL: http://codereview.chromium.org/180063 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2810 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
ea58f9f097
commit
c8d358aa91
@ -211,8 +211,14 @@ void OS::LogSharedLibraryAddresses() {
|
||||
for (unsigned int i = 0; i < images_count; ++i) {
|
||||
const mach_header* header = _dyld_get_image_header(i);
|
||||
if (header == NULL) continue;
|
||||
#if V8_HOST_ARCH_X64
|
||||
uint64_t size;
|
||||
char* code_ptr = getsectdatafromheader_64(
|
||||
(mach_header_64*)header, SEG_TEXT, SECT_TEXT, &size);
|
||||
#else
|
||||
unsigned int size;
|
||||
char* code_ptr = getsectdatafromheader(header, SEG_TEXT, SECT_TEXT, &size);
|
||||
#endif
|
||||
if (code_ptr == NULL) continue;
|
||||
const uintptr_t slide = _dyld_get_image_vmaddr_slide(i);
|
||||
const uintptr_t start = reinterpret_cast<uintptr_t>(code_ptr) + slide;
|
||||
|
@ -476,7 +476,7 @@ UnixCppEntriesProvider.prototype.parseNextLine = function() {
|
||||
function MacCppEntriesProvider(nmExec) {
|
||||
UnixCppEntriesProvider.call(this, nmExec);
|
||||
// Note an empty group. It is required, as UnixCppEntriesProvider expects 3 groups.
|
||||
this.FUNC_RE = /^([0-9a-fA-F]{8}) ()[iItT] (.*)$/;
|
||||
this.FUNC_RE = /^([0-9a-fA-F]{8,16}) ()[iItT] (.*)$/;
|
||||
};
|
||||
inherits(MacCppEntriesProvider, UnixCppEntriesProvider);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user