Change format of syscall event trace output to ftrace

雨燕双飞 提交于 2020-01-04 13:46:19

问题


I enabled ftrace event tracing for sys_enter_openat syscall. The respective output format given at events/syscalls/sys_enter_openat/format is

print fmt: "dfd: 0x%08lx, filename: 0x%08lx, flags: 0x%08lx, mode: 0x%08lx", ((unsigned long)(REC->dfd)), ((unsigned long)(REC->filename)), ((unsigned long)(REC->flags)), ((unsigned long)(REC->mode))

As expected a sample output line to ftrace is something like

msm_irqbalance-1338  [000] ...1 211710.033931: sys_openat(dfd: ffffff9c, filename: 5af693f224, flags: 2, mode: 0)

Is there a way to change output format such that filename: 5af693f224 can be shown as filename: <string> instead of address? I guess this would have been possible using systemtap or krpobe but my setup does not allow its use as of now.

来源:https://stackoverflow.com/questions/55443204/change-format-of-syscall-event-trace-output-to-ftrace

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!