Earlier quoted context omitted.
Kudos! Was it difficult to get it accepted? I've seen ports rejected.
To be honest, I forgot because it was quite some time ago. But I don't think we had any difficulties in that regard. I do remember being quite worried that it will not be good enough. In the time I started working on it, Mike sent a brutal email to a person trying to do PPC64 port ( https://www.freelists.org/post/luajit/PPC64le-port-status,1 ).
A Walk with LuaJIT
21–28 of 28 posts
Re: A Walk with LuaJIT
#22Earlier quoted context omitted.
The workaround for LuaJIT moving to Github was to... clone a fork of it? If they could do that, why can't they just pull from the LuaJIT repo?
LuaJIT didn't move to GitHub, they just have a mirror there. The thing is they stopped numbering and publishing releases, it's all a rolling release without any name or number, so you cannot snapshot I'm certain version. But OpenResty fork does create tag versions with date, so they can build or test against certain concrete snapshot frozen in time.
A git commit SHA is a number that identifies a version of the code.
Re: A Walk with LuaJIT
#23I wrote the code and the blog, happy to answer any questions/comments. Very eager to have folks try it out and give feedback! Like is my meme game strong or very strong? J/K There's some missing bits around FFI and callbacks (i.e. C calling function pointer that is a luajit generated stub back into the interpreter) and curious if anyone actually uses these things in OpenResty workloads. Deploy and enjoy!
Is there a single-shot mode that I can use from the command-line? Something like:
$ parca-perf record nvim ...
Or: a$ nvim ...
b$ parca-perf top -p $(pidof nvim)Re: A Walk with LuaJIT
#24I wrote the code and the blog, happy to answer any questions/comments. Very eager to have folks try it out and give feedback! Like is my meme game strong or very strong? J/K There's some missing bits around FFI and callbacks (i.e. C calling function pointer that is a luajit generated stub back into the interpreter) and curious if anyone actually uses these things in OpenResty workloads. Deploy and enjoy!
I'd love to use this to profile Neovim, where (nowadays) user scripts are often written in Lua 5.1. Neovim by default embeds LuaJIT (close to HEAD). Being able to see Lua functions and C functions in the stack would be amazing. Is there a single-shot mode that I can use from the command-line? Something like: $ parca-perf record nvim ... Or: a$ nvim ... b$ parca-perf top -p $(pidof nvim)
However, we wouldn’t be against adding a mode like this!
FWIW both the server and the agent are single statically linked binaries so while it’s a bit more set up it’s not terribly difficult either[1].
Re: A Walk with LuaJIT
#25I wrote the code and the blog, happy to answer any questions/comments. Very eager to have folks try it out and give feedback! Like is my meme game strong or very strong? J/K There's some missing bits around FFI and callbacks (i.e. C calling function pointer that is a luajit generated stub back into the interpreter) and curious if anyone actually uses these things in OpenResty workloads. Deploy and enjoy!
I'd love to use this to profile Neovim, where (nowadays) user scripts are often written in Lua 5.1. Neovim by default embeds LuaJIT (close to HEAD). Being able to see Lua functions and C functions in the stack would be amazing. Is there a single-shot mode that I can use from the command-line? Something like: $ parca-perf record nvim ... Or: a$ nvim ... b$ parca-perf top -p $(pidof nvim)
Re: A Walk with LuaJIT
#26Earlier quoted context omitted.
LuaJIT didn't move to GitHub, they just have a mirror there. The thing is they stopped numbering and publishing releases, it's all a rolling release without any name or number, so you cannot snapshot I'm certain version. But OpenResty fork does create tag versions with date, so they can build or test against certain concrete snapshot frozen in time.
> it's all a rolling release without any name or number, so you cannot snapshot I'm certain version A git commit SHA is a number that identifies a version of the code.
Even without SemVer, using a simple date versioning system (let's say 2024.10.2-patch4) gives you a lot of context.
Re: A Walk with LuaJIT
#27This way you get a stack trace which contains all Lua and native frames. You can use it when profiling and you can use it to print hybrid stack traces when your binary crashes.
I was considering open-sourcing it, but it requires a bunch of patches in LJ internals so I gave up on that idea.
(There is also some amount of over-engineering involved, e.g. to compute unwinding information for interpreter code I run an abstract interpretation on its implementation and annotate interpreter code range with information on whether it is safe or unsafe to try unwinding at a specific pc inside the interpreter. I could have just done this by hand - but did not want to maintain it between LJ versions)
Re: A Walk with LuaJIT
#28Earlier quoted context omitted.
I'd love to use this to profile Neovim, where (nowadays) user scripts are often written in Lua 5.1. Neovim by default embeds LuaJIT (close to HEAD). Being able to see Lua functions and C functions in the stack would be amazing. Is there a single-shot mode that I can use from the command-line? Something like: $ parca-perf record nvim ... Or: a$ nvim ... b$ parca-perf top -p $(pidof nvim)
It should work to profile neovim, does it use the luajit shared library or is it statically linked? You could run parca-agent and set up a filter to discard all non-neovim samples and leave a parca instance running locally and just restart it periodically.