Profiled line number is the head of a function too frequently

RESOLVED FIXED in mozilla17

Status

()

Core
JavaScript Engine
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: u443197, Assigned: u443197)

Tracking

unspecified
mozilla17
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Comment hidden (empty)
(Assignee)

Comment 1

5 years ago
When SPS is enabled in the JS engine, the line number is too frequently the head of a function. This was an error on my part mishandling the case where the pc for a script is at the head of a function. The relevant changes need to be made to ProfileEntry::{pc,setPC} and the emitted instrumentation.
(Assignee)

Comment 2

5 years ago
Created attachment 652180 [details] [diff] [review]
patch
Attachment #652180 - Flags: review?(bhackett1024)
Comment on attachment 652180 [details] [diff] [review]
patch

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

::: js/src/methodjit/BaseAssembler.h
@@ +1545,5 @@
>  
>          storePtr(ImmPtr(str),  Address(reg, ProfileEntry::offsetOfString()));
>          storePtr(ImmPtr(s),    Address(reg, ProfileEntry::offsetOfScript()));
>          storePtr(ImmPtr(NULL), Address(reg, ProfileEntry::offsetOfStackAddress()));
> +        store32(Imm32(-1),     Address(reg, ProfileEntry::offsetOfPCIdx()));

Can you make the -1 some INVALID_INDEX constant in ProfileEntry?
Attachment #652180 - Flags: review?(bhackett1024) → review+
(Assignee)

Comment 4

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/a0cf81efe4aa
https://hg.mozilla.org/mozilla-central/rev/a0cf81efe4aa
Status: NEW → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
You need to log in before you can comment on or make changes to this bug.