The desired LuaJIT internal sampling profiler works in the following way:
vm-states
and which function is performedTask: the student has to get familiar with LuaJIT guest stack layout (frame types, Lua-Lua calls, TCO), provide the design for implementing LuaJIT sampling profiler (one can look onto the profiler in LuaVela) and implement this feature.
There are several external tools for sampling profiler: perf, gprof. These tools respects only C (host) stack, but Lua (guest) stack is also need to be used in profiler recordings.
Task: the student has to get familiar with the various profiler tools and LuaJIT guest stack layout (frame types, Lua-Lua calls, TCO), provide the design for implementing LuaJIT stack traces in terms of the chosen toolchain and implement this feature.