I just checked in a new interface which can be used to add stop-watch like profiling to the code.
Comes with a gui-element (which could still use some improvement, but works basically) and an example how to use it (new example 30).
Note - I haven't created VS project files yet for the example (will do) and MacOSX build will break at the moment (just needs the new files, have to wait until someone with Mac does this).
When you rebuild Irrlicht with _IRR_COMPILE_WITH_PROFILING_ enabled in IrrCompileConfig.h you can also get some profiling data about engine internals. Proposals about where to add some more of them are welcome.
A short description about the design:
The idea is that you add start/stop blocks in the code you want to profile. Preferably with a define-wrapper around it so it can be disabled easily. The whole design is about making this start/stop stuff really fast. There's some comfort functions like scope-profiling which can be done with a single line.
It got added in 4791 to svn trunk: https://sourceforge.net/p/irrlicht/code/4791/
Any feedback about the interface is welcome.
New profiler interface
New profiler interface
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: New profiler interface
Omg, I should probably have developed on Windows as that's always the harder one when it comes to export troubles. Sorry - current Interface won't work on Windows. Either I have to inline everything in my CProfiler and SProfileData classes (don't like that), or have to work with IRRLICHT_API which then means I can't use the template classes like core::stringw and core::array easy (probably would have to use pointers to them - don't like that...) or I have to give up on avoiding an IProfiler interface and just life with the overhead of virtual functions (don't like that...).
Thinking...
Thinking...
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: New profiler interface
And another version checked in. Windows works now as well.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Re: New profiler interface
new version of BuildAWorld irrlicht will have OpenGL timers included as a separate utility class
we measure (although by introducing stalls , will do round robin circular buffer timers in the future) the times it takes the actual GPU to do the work, so i.e we know that my HDR takes 1.2ms on a mobile AMD Radeon
we measure (although by introducing stalls , will do round robin circular buffer timers in the future) the times it takes the actual GPU to do the work, so i.e we know that my HDR takes 1.2ms on a mobile AMD Radeon
Re: New profiler interface
OK, this interface is about CPU profiling (it's what I needed ^_^).
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm