Forum Discussion

dani's avatar
New Contributor
13 years ago

profiling coroutines or microthreads

Hello. Although I have already sent this question to AQTime support and I have received the answer I need to expose the problem here because I think it  is very important.

The engine my company is developing is a fairly complex system for video games, virtual reality,..In this system, I have developed my own multiplaform microthread (very similar to coroutine)  library. In brief, the engine involve a process scheduler which is continusly scheduling tasks. Every task can do a switch context anytime, returning to the "switched" point when the task is againg scheduled by the scheduler. This allow for very fast task switch, task sleep, task wait,... No threads, no complex synchronization mechanism,...all tasks (from now, microthreads) are executed in the same thread.

Well, then, when I try to profile the app, AQTime crashes. This is a know problem, because the microthread technique fit in the "unsupported code" explained in, because I modify the stack and the CPU internals to be able to do this magic.

Ok, although I understand I'm violating those conditions I think AQTime should try to solve this kind of problem (I supppose it's very complex). Maybe not a lot of people do this kind of complex things but we should think that C++ is just a language to allow user to do things other languages doesn't support. C/C++ + assembler is the language chosen for programming more in depth so it's necessary to support it.

It makes me sad to see AQTime, which I think is very powerful, easy to use and very, very useful for systems programming, now is fully unusable for my company...

To exclude code from the profile via "exclude areas" or whatever is not a solution because microthread behaviour is found anywhere, any time. To allow AQTime to profile my app I need to exclude...the whole application!

Sorry for my english, maybe I didn't explain very good.


Best regards,


2 Replies

  • aqAnt's avatar
    SmartBear Alumni (Retired)

    Hello Dani,

    We would appreciate it if you sent us a simple application demonstrating the problem or some specifications of your library. Perhaps, we can find a way to avoid the crashes, so you can profile your application with AQtime.

  • dani's avatar
    New Contributor
    Hello Jay, thanks for the reply. I will try to do a simple app demostrating the issue and I'll send to you as soon as possible.

    Thank you very much,