Closed Bug 993071 Opened 6 years ago Closed 3 years ago

Add JIT-Optimization info to JS profiler

Categories

(Core :: JavaScript Engine: JIT, defect)

x86
macOS
defect
Not set

Tracking

()

RESOLVED FIXED

People

(Reporter: djvj, Unassigned)

Details

(Whiteboard: [leave open])

Attachments

(2 files, 1 obsolete file)

Add JIT optimization info to JS profiler.

To start off, we want the profiler to identify traces which go through slow-paths in the scripts on stack.  The implementation is pretty simple: push pseudostack entries before starting a slowpath, and pop after ending the slowpath.
Preparatory patch: rename MFunctionBoundary in Ion to MProfilerStackOp.  FunctionBoundary doesn't make sense for annotating slowpaths within functions.

Try run: https://tbpl.mozilla.org/?tree=Try&rev=925abe474e90
Attachment #8402853 - Flags: review?(luke)
This patch modifies the usage of the pseudostack to allow js pseudostack entries to indicate if they are for optimized code or not.  It uses the fact that for js entries, the |sp| field is expected to be null.

The patch modifies this to allow |sp| to be either null or (void*)1, where a (void*)1 value indicates that it is for an optimized JS frame.

Try run: https://tbpl.mozilla.org/?tree=Try&rev=439e69c25d2a
Attachment #8403347 - Flags: review?(luke)
Comment on attachment 8403347 [details] [diff] [review]
add-optimization-tier-to-profiler-pseudostack.patch

Canceling review request on this as I just noticed some relevant try failures.
Attachment #8403347 - Flags: review?(luke)
Attachment #8402853 - Flags: review?(luke) → review+
Fixed version of previous patch.  Minor change to sp() method to get this to pass.  Same basic idea.  Copying description from previous patch post:

This patch modifies the usage of the pseudostack to allow js pseudostack entries to indicate if they are for optimized code or not.  It uses the fact that for js entries, the |sp| field is expected to be null.

The patch modifies this to allow |sp| to be either null or (void*)1, where a (void*)1 value indicates that it is for an optimized JS frame.

Now passes try: https://tbpl.mozilla.org/?tree=Try&rev=841f374c2bff
Attachment #8403347 - Attachment is obsolete: true
Attachment #8403530 - Flags: review?(luke)
Attachment #8403530 - Flags: review?(luke) → review+
This has long landed.
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.