New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fiber support? #88
Comments
Hi Brody. Optick indeed provides support for fibers.
Sorry, I haven't had a chance yet to wrap up everything fiber-related into a nice API and document it. |
Hi, I tried to follow your instructions but am finding that the ConsoleApp does not build on latest master. TestEngine.h(7): "MAKE_CATEGORY" should be "OPTICK_MAKE_CATEGORY" I believe. After fixing that:
But it's not essential that this works for my case - I will take a look at the example you linked and attempt the integration regardless :) |
These errors have been fixed in 786c5af. |
OPTICK_FRAME macro is not compatible with Fibers at the moment. Try to do the following:
If all works ok - that's good news, I am currently working on a change which allows to split OPTICK_FRAME into two calls: update and flip frame. As a side-effect it will allow running OPTICK_FRAME on multiple threads through the fibers. If it doesn't work - well, we'll need to dig deeper :) |
Hey! I've been away from this issue for a long time but will likely return soon. I wanted to ask; is the above still a reflection of the current state of Optick? E.g. the status of
and so on. No pressure, just want to make sure :) Thanks for all your hard work! |
Hey @bombomby! I've had another go with this, hoping that pinning my 'main' fiber to a single thread would help the use of OPTICK_FRAME in a fiber situation. You can see in this image that it's always appearing on the same row, so that's something, but Optick is definitely getting confused. In this case, UpdateClient is the function controlled the main loop, and it kicks off a bunch of fiber work (such as the "busywork" fake sleep tasks I threw together). Those busywork tasks should all fall under a frame, which blocks on them and thus in reality can't continue without their completion. Did you end up splitting up OPTICK_FRAME? :) |
I'm using https://github.com/RichieSams/FiberTaskingLib throughout my code, and am trying to integrate Optick into the application.
Previously, I was using the OPTICK_THREAD macro when the worker threads started, but Optick seems to get confused when you resume a function on another thread after a switch where there is an OPTICK_EVENT at the beginning of that function (e.g. the scoped event starts and stops on two different threads).
This prompted me to go looking, and I found Optick::RegisterFiber, but there is no documentation on this function. How should one use this? Should it be used in addition to OPTICK_THREAD on the workers? What about combined with OPTICK_EVENT, OPTICK_CATEGORY, and OPTICK_TAG?
The text was updated successfully, but these errors were encountered: