Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/turkeymcmac/jitprofiler
LuaJIT profiler for Minetest
https://github.com/turkeymcmac/jitprofiler
minetest minetest-mod
Last synced: about 1 month ago
JSON representation
LuaJIT profiler for Minetest
- Host: GitHub
- URL: https://github.com/turkeymcmac/jitprofiler
- Owner: TurkeyMcMac
- License: mit
- Created: 2022-10-04T14:58:17.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-12-06T20:12:04.000Z (almost 2 years ago)
- Last Synced: 2024-09-26T08:43:58.198Z (about 2 months ago)
- Topics: minetest, minetest-mod
- Language: Lua
- Homepage:
- Size: 3.91 KB
- Stars: 7
- Watchers: 4
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LuaJIT Profiler
This Minetest mod lets you use LuaJIT's builtin profiler. This profiler is good
for pinpointing expensive parts of mod code.## How to Use
- Add the mod to the `secure.trusted_mods` list.
- Enable the mod.
- In-game start the profiler with `/jitprofiler_start 1 `. The
profiling data will be written to `/jitprofiles/`.
- Collect data for a while.
- Stop profiling with `/jitprofiler_stop` or by exiting the world.
- Download FlameGraph if you haven't done so.
- Create a flame graph SVG with
`./flamegraph.pl /jitprofiles/ > graph.svg`.
- Open the SVG with your browser or another viewing program.
- The top level of each stack snapshot will be "C", "G", "I", "J", or "N",
representing C code, garbage collection, interpreter, JIT compilation, or
compiled code, respectively.## Issues
- This mod can cause the game to hang somehow. Most of the profiling data
collected before the hang is saved.
- Sometimes a lot of C code execution is reported in suspicious places. I think
this represents time taken by the Minetest engine, but I don't know why the
profiler thinks the code is executed inside a Lua function.
- Using this mod with Mesecons luacontrollers can cause crashes for some reason.