Bug 1368266 Comment 20 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

It saves the PC and uses it later (when dumping profiles) to generate frame display-name info (e.g. filename:lineno info for the script):

https://searchfox.org/mozilla-central/source/js/src/jit/JSJitFrameIter.cpp#635

The relevant stack trace (from jesup):

#0  0x00007fe860f84538 in js::jit::BaselineScript::nativeCodeForPC(JSScript*, unsigned char*, js::jit::PCMappingSlotInfo*)
    (this=0x7fe7be334ee0, script=0x25d31274e5b0, pc=0x7fe7c158b765 "\231\230\200", slotInfo=0x7fe834cee010)
    at ../../../../js/src/jit/BaselineJIT.h:446
        native = 0x0
#1  0x00007fe8613360fe in js::jit::JSJitProfilingFrameIterator::fixBaselineReturnAddress() (this=0x7fe834cee2b0)
    at /home/jesup/src/mozilla/inbound/js/src/jit/JSJitFrameIter.cpp:639
        slotInfo = {
          slotInfo_ = 0 '\000'
        }
        script = 0x25d31274e5b0
        override = 0x7fe7c158b765 "\231\230\200"
        bl = 0x7fff4e59f3b0
#2  0x00007fe861335d89 in js::jit::JSJitProfilingFrameIterator::moveToNextFrame(js::jit::CommonFrameLayout*)
    (this=0x7fe834cee2b0, frame=0x7fff4e59f350) at /home/jesup/src/mozilla/inbound/js/src/jit/JSJitFrameIter.cpp:731
        stubFrame = 0x7fff4e59f390
        prevType = js::jit::FrameType::BaselineStub
#3  0x00007fe86133615d in js::jit::JSJitProfilingFrameIterator::operator++() (this=0x7fe834cee2b0)
    at /home/jesup/src/mozilla/inbound/js/src/jit/JSJitFrameIter.cpp:649
        frame = 0x7fff4e59f350
#4  0x00007fe8609827ac in JS::ProfilingFrameIterator::operator++() (this=0x7fe834cee288)
    at /home/jesup/src/mozilla/inbound/js/src/vm/Stack.cpp:1807
It saves the PC and uses it later (when dumping profiles) to generate frame display-name info (e.g. filename:lineno info for the script):

https://searchfox.org/mozilla-central/source/js/src/jit/JSJitFrameIter.cpp#635

The relevant stack trace (from jesup):

```
#0  0x00007fe860f84538 in js::jit::BaselineScript::nativeCodeForPC(JSScript*, unsigned char*, js::jit::PCMappingSlotInfo*)
    (this=0x7fe7be334ee0, script=0x25d31274e5b0, pc=0x7fe7c158b765 "\231\230\200", slotInfo=0x7fe834cee010)
    at ../../../../js/src/jit/BaselineJIT.h:446
        native = 0x0
#1  0x00007fe8613360fe in js::jit::JSJitProfilingFrameIterator::fixBaselineReturnAddress() (this=0x7fe834cee2b0)
    at /home/jesup/src/mozilla/inbound/js/src/jit/JSJitFrameIter.cpp:639
        slotInfo = {
          slotInfo_ = 0 '\000'
        }
        script = 0x25d31274e5b0
        override = 0x7fe7c158b765 "\231\230\200"
        bl = 0x7fff4e59f3b0
#2  0x00007fe861335d89 in js::jit::JSJitProfilingFrameIterator::moveToNextFrame(js::jit::CommonFrameLayout*)
    (this=0x7fe834cee2b0, frame=0x7fff4e59f350) at /home/jesup/src/mozilla/inbound/js/src/jit/JSJitFrameIter.cpp:731
        stubFrame = 0x7fff4e59f390
        prevType = js::jit::FrameType::BaselineStub
#3  0x00007fe86133615d in js::jit::JSJitProfilingFrameIterator::operator++() (this=0x7fe834cee2b0)
    at /home/jesup/src/mozilla/inbound/js/src/jit/JSJitFrameIter.cpp:649
        frame = 0x7fff4e59f350
#4  0x00007fe8609827ac in JS::ProfilingFrameIterator::operator++() (this=0x7fe834cee288)
    at /home/jesup/src/mozilla/inbound/js/src/vm/Stack.cpp:1807
```

Back to Bug 1368266 Comment 20