10.5 Thread support library(threadutil)
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
      • Multithreaded applications
        • Thread support library(threadutil)
          • threads/0
          • join_threads/0
          • interactor/0
          • Debugging threads
          • Profiling threads
            • tprofile/1
    • Packages

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.42 for details on the execution profiler.