Thank you Elazar. BTW i found a way to achieve this other way. By enabling kprobe event on function 'getname' which returns file name, this function is called by do_sys_open, so i enabled sampling on sys_enter_open, getname, sys_exit_open therefore getname between them gives file name.
On 6 April 2015 at 22:51, Elazar Leibovich <[email protected]> wrote: > I don't think you really can do that in the general case. I guess that > you can check the CWD of the running process, and calculate the > absolute path from it. Though, of course, you don't know the exact > state of the filesystem when the event occured. > > On Mon, Apr 6, 2015 at 1:08 PM, sahil aggarwal <[email protected]> wrote: >> Hi >> >> I enabled sampling on tracepoint sys_enter_open but filename field >> returned is address to filename as being passed to the system call, >> how i can translate this to actual file name while reading ring >> buffer.? How perf is doing it.? >> >> Thanks >> Regards >> Sahil >> -- >> To unsubscribe from this list: send the line "unsubscribe linux-perf-users" >> in >> the body of a message to [email protected] >> More majordomo info at http://vger.kernel.org/majordomo-info.html -- To unsubscribe from this list: send the line "unsubscribe linux-perf-users" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
