Hometoolswspy – followup: support for ptrace as well as ftrace


wspy – followup: support for ptrace as well as ftrace — 2 Comments

  1. Followup:
    I have added support to use both tracers together with –processtree-engine all alternative. It took a little bit to get the locking correct, but believe this one works without issue.

    I also have a hypothesis on the “user time is too high” situation, but not yet a fix. I think it comes when multiple threads are used. The system is reporting an “exit()” event, but this is of the thread and not the entire process. As a result, the process has a much higher user time because it includes threads other than this one. I printed out the “num_threads” value in /proc/[pid]/stat if it is larger than 1 and notice that this seems to particularly happen for c-ray where many threads are created.

    Next steps to test this hypothesis is to (1) separately keep track of clone(2) calls and (2) if it is a clone look in /proc/[pid]/task/[tid] first to see if information is found there.

    • Followup:

      I am now able to see a more reasonable user and system time for threads.

      I did the test described in preceding command to look in /proc/[pid]/task/[tid] and the numbers are what I expected.

      wspy has been fixed for this issue.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

HTML tags allowed in your comment: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>