The default bug view has changed. See this FAQ.

Profiler address output broken by bug 739800 on Mac 64 bit

RESOLVED FIXED in mozilla14

Status

()

Core
Gecko Profiler
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: mstange, Assigned: vladan)

Tracking

({regression})

Trunk
mozilla14
x86_64
Mac OS X
regression
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

5 years ago
Created attachment 611316 [details] [diff] [review]
v1

%#x uses an int value which truncates 64 bit addresses to 32 bit. We need to use %#lx instead.
Do things still work on Windows with this change?
Attachment #611316 - Flags: review?(vdjeric)
I think we need '(long unsigned int)pc'.
(Assignee)

Comment 2

5 years ago
Comment on attachment 611316 [details] [diff] [review]
v1

%lx truncates the address on 64-bit windows

Let's do this:

snprintf(tagBuff, 1024, "l-0x%p\n", pc);

^^^ explicitly specifying "0x" because "%#p" outputs "OX"

Can you guys test this on 32-bit/64-bit Unix and Mac?
Attachment #611316 - Flags: review?(vdjeric) → review-
Tested, %p appends 0x so we get it twice. Let's use some ifdefs here.
(Assignee)

Comment 4

5 years ago
Created attachment 611522 [details] [diff] [review]
Use %#llx to print pointers
Attachment #611522 - Flags: review?(bgirard)

Updated

5 years ago
Attachment #611522 - Flags: review?(bgirard) → review+
(Assignee)

Updated

5 years ago
Assignee: nobody → vdjeric
Target Milestone: --- → mozilla14
(Assignee)

Comment 5

5 years ago
Comment on attachment 611522 [details] [diff] [review]
Use %#llx to print pointers

https://hg.mozilla.org/integration/mozilla-inbound/rev/d4f6c908dc17
Attachment #611522 - Flags: checkin+
https://hg.mozilla.org/mozilla-central/rev/d4f6c908dc17
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.