10.5.2 Profiling threads
In the current implementation, at most one thread can be profiled at any moment. Any thread can call profile/1 to profile the execution of some part of its code. The predicate tprofile/1 allows for profiling the execution of another thread until the user stops collecting profile data.
- tprofile(+ThreadId)
- Start collecting profile data in ThreadId and ask the user to hit <return> to stop the profiler. See section 4.41 for details on the execution profiler.