Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(profile): add wrapper around LuaJIT profiler #174

Merged
merged 1 commit into from
Jun 30, 2021
Merged

feat(profile): add wrapper around LuaJIT profiler #174

merged 1 commit into from
Jun 30, 2021

Conversation

clason
Copy link
Contributor

@clason clason commented Jun 28, 2021

This is a thin wrapper around LuaJIT's jit.p with the right "magic" options set. Only configuration right now is flame=true to output flamegraph-compatible logs; see https://github.com/jonhoo/inferno
to be used with

inferno-flamegraph profile.log > flame.svg

The SVG file can then be viewed in the browser.

This commit includes a vendored version of the latest upstream jit.p that fixes a bug with flushing the output file; once LuaJIT/LuaJIT@95140c5 is pulled in, this file can be removed.

More configuration options are left for a future PR.

Thanks to @leiserfg for showing me how to actually get this working!

README.md Outdated Show resolved Hide resolved
This is a thin wrapper around LuaJIT's `jit.p` with the right "magic"
options set. Only configuration right now is `flame=true` to output
flamegraph-compatible logs; see https://github.com/jonhoo/inferno
to be used with
```
inferno-flamegraph profile.log > flame.svg
```
The SVG file can then be viewed in the browser.

This commit includes a vendored version of the latest upstream `jit.p`
that fixes a bug with flushing the output file; once
LuaJIT/LuaJIT@95140c5
is pulled in, this file can be removed.
@tjdevries tjdevries merged commit 18da662 into nvim-lua:master Jun 30, 2021
@clason clason deleted the jit-profiler branch June 30, 2021 13:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants