5

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 hex(5af693f224)?

So basically is there a way to change output format while tracing a particular event(eg. sys_enter_openat above) to ftrace.

I guess this would have been possible using systemtap or krpobe but my setup does not allow its use as of now.

0

2 Answers 2

16

Unfortunately, there is currently not a way to do this. But perhaps in the future I may add it, if I can figure out a sane interface and implementation to do such a thing. Maybe I will add a trigger that will make the output show differently.

Although I may be new to StackExchange, I am the author of ftrace (real name Steven Rostedt - look up the git history). The "real answer" will happen when I write the code!

1
0

seems you can only use BPF to overwrite the ftrace trace event print. ftrace cannot fulfill this. the ftrace trace event print should be configurable from the userspace. that will be awesome.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .