kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: mulyadi.santosa@gmail.com (Mulyadi Santosa)
To: kernelnewbies@lists.kernelnewbies.org
Subject: System call trace
Date: Wed, 15 Feb 2012 21:56:40 +0700	[thread overview]
Message-ID: <CAGdaadb9byZzFHR4bgDdcUdM7Zyak1Lya1CQH=FF4GFB68fqvQ@mail.gmail.com> (raw)
In-Reply-To: <CAJokiOepwLdLM1EKuLMsyL+nshEhph9rNmQ9NDuXa-y=U8-PmQ@mail.gmail.com>

Hi :)

On Wed, Feb 15, 2012 at 21:38, Swapnil Gaikwad <swapnilgaik72@gmail.com> wrote:
> Can we see trace of how the system call works?
> What are the functions are called in kernel space?
> For example we want to trace cp command. Then what are the functions
> is get called by that in kernel space? like how the inode allocation
> take place for new destination file etc.
> Is any tool for that?

Besides using strace, you might find User Mode Linux useful in this
case. Just attach gdb to the UML kernel, put breakpoint into system
call entry, and then do "step" to follow how it goes.

Note that UML might not precisely mimic real kernel, but at least it
will give you idea.

Other than that, cscope and/or websites like lxr.linux.no are your
best friend for such code exploration :)

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

      parent reply	other threads:[~2012-02-15 14:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-15 14:38 System call trace Swapnil Gaikwad
2012-02-15 14:47 ` Alexandru Juncu
2012-02-15 15:34   ` Ravishankar
2012-02-15 14:56 ` Mulyadi Santosa [this message]

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='CAGdaadb9byZzFHR4bgDdcUdM7Zyak1Lya1CQH=FF4GFB68fqvQ@mail.gmail.com' \
    --to=mulyadi.santosa@gmail.com \
    --cc=kernelnewbies@lists.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).