• Yonghong Song's avatar
    add a probe alias $task in trace.py · f92fef26
    Yonghong Song authored
    The $task refers to the current task. In my particular case, I need
    to trace the number of users for file system associated with the current
    task. With the probe alias $task, trace.py can easily trace this event
    
      ......
      trace.py -I 'linux/fs_struct.h' 'mntns_install "users = %d", $task->fs->users'
      PID     TID     COMM            FUNC             -
      176566  176566  python2.7       mntns_install    users = 2
      176566  176566  python2.7       mntns_install    users = 2
      ......
    
    With $task probe alias, kernel tast_struct fields can be used in trace.py
    filter or output easily even if they cannot be accessed through input
    parameters.
    Signed-off-by: default avatarYonghong Song <yhs@fb.com>
    f92fef26
trace_example.txt 13.5 KB