Rokas Kupstys

Results 247 comments of Rokas Kupstys

Any idea how that is done in general? Is it like getting opengl API calls wrapped in `EASY_BLOCK` or is there more magic behind it?

I found [apitrace](https://github.com/apitrace/apitrace). Looks like they do profiling by hooking each API call.

@looki did you happen to start any work regarding this?

Something like ```cpp void foobar() { EASY_BLOCK("block a"); doWorkA(); EASY_END_BLOCK; EASY_BLOCK("block b"); doWorkB(); } int main() { EASY_MAIN_THREAD; // Give a name to main thread, same as EASY_THREAD("Main") EASY_PROFILER_ENABLE; //...

you dont have to have a loop, that was just an example. to see profiling info start UI application and connect to listening port. if it is reachable over network...

Ensure that your application is listening on port 28077 on localhost. Also if `profiler::dumpBlocksToFile` produces a prof file you can open it in UI without connecting.

I haven't tried yet. Maybe it could be optimized somewhat? Maybe caching names in a hashmap?

This is on my TODO list so yeah, eventually :)

@cas4ey i need your advice. In order to use this function obvious candidate is `::profiler::beginNonScopedBlock()`. However the way it is designed now mentioned function expects `BaseBlockDescriptor*`. Problem here is that...

> can __cyg_profile_func_... functions be declared inside profiler_manager.cpp? Yes they can, and they probably should be anyway. I will investigate that direction. > P.S. isn't it better just to use...