Open jan-rosendahl opened 6 years ago
This will be probably hard to implement inside the bpf program since involves recursively visiting the parents. Maybe you could come up with a reasonable interface for a helper?
are there some solutions for the problem now? @yonghong-song Maybe https://github.com/iovisor/bpftrace/issues/29 is a good idea. And the open issues #365 and #366 are another choices.
Is it possible to add an option to tools/zfsslower that allows for absolute/full paths to be displayed?
In our setup we have a lot of automatically generated files which have similar or identical files names so we need the full path to distinguish them. I assume this can be handy in a variety of different situations.
I tried to extract the information from
valp->fp->f_path.dentry
but gave up after some time. Trying to usedentry_path_raw(valp->fp->f_path.dentry, CHAR_ARRAY, ARRAY_LENGTH)
as suggested by https://stackoverflow.com/questions/17216856/how-to-get-full-pathname-from-struct-dentry-in-linux-kernel yielded:LLVM ERROR: Program used external function 'dentry_path' which could not be resolved!
Do the open issues https://github.com/iovisor/bcc/issues/366 and https://github.com/iovisor/bcc/issues/365 indicate that this is currently not supported?