add a probe alias $task in trace.py
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: Yonghong Song <yhs@fb.com>
Showing
Please register or sign in to comment