Bug 1820281 Comment 0 Edit History

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

When profiling with native profilers, we are missing the callers of VM Wrapper frames. This causes misleading profiles where time is attributed to the wrong function, and it makes it hard to compare time spent in JS functions between JS engines.

For example, here's a profile recorded with `perf` on Linux: https://share.firefox.dev/3JcCzQP

The bad stack is this one:

```
[...]
_reconcilerUpdateChildren
flattenChildren
traverseAllChildren
traverseAllChildrenImpl
traverseAllChildrenImpl
Arguments Rectifier
!!! missing frame for "flattenSingleChildIntoContext"
VM Wrapper
js::jit::SetElementMegamorphic
[...]
```

It looks like VM Wrapper JIT code is not emitting `mov rbp, rsp` and `pop rsp` instructions. This causes frame pointer stackwalking to always miss the immediate caller frame, and skip over it to the caller's caller.
When profiling with native profilers, we are missing the callers of VM Wrapper frames. This causes misleading profiles where time is attributed to the wrong function, and it makes it hard to compare time spent in JS functions between JS engines.

For example, here's a profile recorded with `perf` on Linux: https://share.firefox.dev/3JcCzQP

The bad stack is this one:

```
[...]
_reconcilerUpdateChildren
flattenChildren
traverseAllChildren
traverseAllChildrenImpl
traverseAllChildrenImpl
Arguments Rectifier
!!! missing frame for "flattenSingleChildIntoContext"
VM Wrapper
js::jit::SetElementMegamorphic
[...]
```

It looks like VM Wrapper JIT code is not emitting `mov rbp, rsp` and `pop rbp` instructions. This causes frame pointer stackwalking to always miss the immediate caller frame, and skip over it to the caller's caller.
When profiling with native profilers, we are missing the callers of VM Wrapper frames. This causes misleading profiles where time is attributed to the wrong function, and it makes it hard to compare time spent in JS functions between JS engines.

For example, here's a profile recorded with `perf` on Linux: https://share.firefox.dev/3JcCzQP

The bad stack is this one:

```
[...]
_reconcilerUpdateChildren
flattenChildren
traverseAllChildren
traverseAllChildrenImpl
traverseAllChildrenImpl
Arguments Rectifier
!!! missing frame for "flattenSingleChildIntoContext"
VM Wrapper
js::jit::SetElementMegamorphic
[...]
```

It looks like VM Wrapper JIT code does not contain `mov rbp, rsp` and `pop rbp` instructions. This causes frame pointer stackwalking to always miss the immediate caller frame, and skip over it to the caller's caller.

Back to Bug 1820281 Comment 0