kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: Pedro Terra Delboni <terra0009@gmail.com>
To: kernelnewbies@kernelnewbies.org
Subject: how to collect information regarding function calls in run time?
Date: Wed, 3 Apr 2019 16:25:02 -0300	[thread overview]
Message-ID: <CAHKDPP9rTJC3oaMOUkEEfa=-=OETMxfR1VpUHyUGh13zzH_3PQ@mail.gmail.com> (raw)

Hello!

I have a question about profiling, please, let me know if this is not
the right mailing list to post these kind of questions.

Is there a way for me to record how many times each specific direct
call to a function happened?
I've seen ways of profiling the kernel that calculate how much time
the system spent in each function, but having a bit more information
related to calls would be really good.

I would like to know, for every function call that happens in run
time, who called it (it's for a project in my University).

I've also seen (I may be mistaken here) that by compiling the kernel
with perf, each function will start with a stub call which can be used
for profiling purposes.
I was thinking in using this stub to plug a function to dump
(somewhere) the return address before it's own (so I can collect the
info about where the call came from).
I wonder if changing every stub calls in all functions to dump its
return address wouldn't create too much of a latency impact to the
point of skewing the control flow of the execution,
or even making it nonviable.

Thanks in advance, any help would be great!
If this is not the right place to post this question, I would
appreciate if anyone could point me to the right place.

Thanks
Pedro

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

             reply	other threads:[~2019-04-03 19:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-03 19:25 Pedro Terra Delboni [this message]
2019-04-03 20:15 ` how to collect information regarding function calls in run time? Bharath Vedartham
     [not found] ` <CADFy_4FJODA9gT7Enb+eLt-bdJBkkgTmqhhb3AhJhjibgbzD2A@mail.gmail.com>
2019-05-14 13:55   ` Pedro Terra Delboni
2019-05-14 14:05     ` Greg KH
2019-05-14 14:14       ` Pedro Terra Delboni
2019-05-14 17:45     ` Valdis Klētnieks
2019-05-14 19:11       ` Pedro Terra Delboni
2019-05-17 14:09         ` Valdis Klētnieks
2019-05-17 16:19           ` Pedro Terra Delboni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHKDPP9rTJC3oaMOUkEEfa=-=OETMxfR1VpUHyUGh13zzH_3PQ@mail.gmail.com' \
    --to=terra0009@gmail.com \
    --cc=kernelnewbies@kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).