RaphaelIT7 / gmod-holylib

A library that contains some functions and optimizations for gmod.
42 stars 4 forks source link

A modern, C++ profiler. #5

Open NathanX-S opened 2 months ago

NathanX-S commented 2 months ago

This is likely not the easiest thing in the world, but most profilers have some kind of impact, especially running in the LUA realm. vprof seems to be held together with sticks and stones, but if you have any better advice how to use vprof, please let me know.

RaphaelIT7 commented 2 months ago

sooo, do you want a vprof alternative or a new Lua profiler that's in C++?

NathanX-S commented 2 months ago

sooo, do you want a vprof alternative or a new Lua profiler that's in C++?

One that's capable of doing both would be nice, just a comprehensive tool for profiling sake.

RaphaelIT7 commented 2 months ago

I would say that vprof wouldn't really need an alternative (It may be old, but It works really good), but it would need something to allow one to view the results easier. If one wants to have a deep loop into what's going on, they can just throw Linuxes perf tool at it which can be really useful, and it already allows one to have a deep view into it what's going on.

For Lua, I think I could add one, but I don't know how it will affect performance, but I'll try it and see how big the impact is.

RaphaelIT7 commented 2 weeks ago

So, there is now the vprof library which can allow you to profile lua code, but that itself won't really do it. I looked a while back into it but it seems a lot harder than I first thought. I could probably profile ever Lua->C call but I don't think I can profile any Lua->Lua calls without messing around with luajit itself