Closed Bug 1047010 Opened 6 years ago Closed 6 years ago

OdinMonkey: improve asm.js profiling data

Categories

(Core :: JavaScript Engine, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla34

People

(Reporter: luke, Assigned: luke)

Details

Attachments

(2 files)

Attached patch better-ffisSplinter Review
Pretty easy to do and useful for profiling.
Attachment #8465711 - Flags: review?(dtc-moz)
Summary: OdinMonkey: separate fast and slow FFI trampolines in the profiler → OdinMonkey: improve asm.js profiling data
With this tiny patch, time spent in the out-of-bounds and slow-script handlers will be appropriately represented as such.
Attachment #8465765 - Flags: review?(dtc-moz)
Comment on attachment 8465711 [details] [diff] [review]
better-ffis

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

Looks good.

::: js/src/asmjs/AsmJSModule.h
@@ +829,5 @@
>      }
> +    bool addCodeRange(CodeRange::Kind kind, uint32_t begin, uint32_t end) {
> +        return codeRanges_.append(CodeRange(kind, begin, end));
> +    }
> +    bool addCodeRange(CodeRange::Kind kind, uint32_t begin, uint32_t pret, uint32_t end) {

s/pret/pRet/ ?
Attachment #8465711 - Flags: review?(dtc-moz) → review+
Comment on attachment 8465765 [details] [diff] [review]
better-signal-handlers

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

Looks good.

Just out of curiosity, does the interrupt frame include the profiler SIGPROF interrupts?
Attachment #8465765 - Flags: review?(dtc-moz) → review+
(In reply to Douglas Crosher [:dougc] from comment #3)
> Just out of curiosity, does the interrupt frame include the profiler SIGPROF
> interrupts?

Nope: when the signal or suspend-thread + get-thread-state calls stop the thread, the context retrieved is the point of execution when the asynchronous suspension happened so, if we were executing asm.js code, the pc will be in asm.js code.  The case handled here is executing asm.js code, then you take a fault for out-of-bounds or slow-script-interrupt, then you are in the handler and THEN you get suspended for profiling.  Madness.
https://hg.mozilla.org/mozilla-central/rev/ca9fa41e977c
https://hg.mozilla.org/mozilla-central/rev/9dc9557dca8e
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
You need to log in before you can comment on or make changes to this bug.