#!/usr/bin/env ktap #Only can run it in x86_64 # #Register follow x86_64 call conversion: # #x86_64: # %rcx 4 argument # %rdx 3 argument # %rsi 2 argument # %rdi 1 argument trace probe:do_sys_open dfd=%di filename=%si flags=%dx mode=%cx { printf("[do_sys_open entry]: (%s) open file (%s)\n", execname(), user_string(arg3)) } trace probe:do_sys_open%return fd=$retval { printf("[do_sys_open exit]: return fd (%d)\n", arg3) }