Closed Bug 1151606 Opened 8 years ago Closed 8 years ago

Stream atoms instead of raw pointers for native functions in tracked optimizations

Categories

(DevTools :: Performance Tools (Profiler/Timeline), defect)

x86_64
Linux
defect
Not set
normal

Tracking

(firefox40 fixed)

RESOLVED FIXED
Firefox 40
Tracking Status
firefox40 --- fixed

People

(Reporter: shu, Assigned: shu)

Details

Attachments

(1 file)

Instead of streaming the raw JSNative function pointer, stream the JSFunction's displayAtom if one exists.
Comment on attachment 8588851 [details] [diff] [review]
Stream atoms instead of raw pointers for native functions in tracked optimizations.

Review of attachment 8588851 [details] [diff] [review]:
-----------------------------------------------------------------

Forgot to request review...
Attachment #8588851 - Flags: review?(kvijayan)
Comment on attachment 8588851 [details] [diff] [review]
Stream atoms instead of raw pointers for native functions in tracked optimizations.

Review of attachment 8588851 [details] [diff] [review]:
-----------------------------------------------------------------

::: js/src/jit/OptimizationTracking.cpp
@@ +1215,5 @@
>              //   Dl_info info;
>              //   if (dladdr(addr, &info) != 0)
>              //       offset = uintptr_t(addr) - uintptr_t(info.dli_fbase);
>              //
> +            char locationBuf[16];

If we're printing a pointer into this, and a pointer can be 8 bytes, then 8*2 hexchars + 1 terminal char is 17 maximally used.  Let's just set this to 20 and avoid any issues.
Attachment #8588851 - Flags: review?(kvijayan) → review+
https://hg.mozilla.org/mozilla-central/rev/bab25fb63a20
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 40
Assignee: nobody → shu
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.