Closed Bug 783030 Opened 8 years ago Closed 8 years ago

Profiled line number is the head of a function too frequently

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla17

People

(Reporter: u443197, Assigned: u443197)

Details

Attachments

(1 file)

5.35 KB, patch
bhackett1024
: review+
Details | Diff | Splinter Review
No description provided.
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.
Attached patch patchSplinter Review
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+
https://hg.mozilla.org/mozilla-central/rev/a0cf81efe4aa
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla17
You need to log in before you can comment on or make changes to this bug.