Actually I was analyzing Oprofile.
oprofile implements using pid which will be pointing to task_struct in turn we get mm_sruct intuen we get vma, which in turn gives vma_file and finally we access corresponding dentry using fast_get_dcookie call.
but you are suggesting a straightforward way, I am not sure why oprofile has implemented in such a way !
this sounds like it wants to find mapped shared libraries, too. like what you see in /proc/<pid>/maps . and repeatedly and minimizing deadlocks and overhead.
Use the proc interface
/proc/<pid>/exe links to the binary executable. Maybe this is what you want.
Actually I was analyzing
Actually I was analyzing Oprofile.
oprofile implements using pid which will be pointing to task_struct in turn we get mm_sruct intuen we get vma, which in turn gives vma_file and finally we access corresponding dentry using fast_get_dcookie call.
but you are suggesting a straightforward way, I am not sure why oprofile has implemented in such a way !
libraries
this sounds like it wants to find mapped shared libraries, too. like what you see in /proc/<pid>/maps . and repeatedly and minimizing deadlocks and overhead.