lkml.org 
[lkml]   [2021]   [Oct]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: Any tracing mechanism can track the executed instructions of a user process in the kernel?
From
On 10/18/21 05:45, Dongliang Mu wrote:
> Hi all,
>
> I am writing to kindly ask one question: is there any tracing
> mechanism in Linux kernel that can trace all the executed instructions
> of a user process? If this user process is run on different
> processors, traces of this process on different processors should be
> also recorded.
>
>

I think, kernel is not supposed to do that kind of things. I mean, there
is no such wrapper in the kernel to do this task, AFAIK.

You have an access to all system calls, so you can implement your own
gdb in the kernel via ptrace() :)


If you need only report about instructions, you can call `perf record` +
`perf report` via call_usermodehelper() and somehow parse the output of
these helpers.


> Any comment is welcome.
>


With regards,
Pavel Skripkin

\
 
 \ /
  Last update: 2021-10-18 09:09    [W:0.075 / U:0.484 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site