From mboxrd@z Thu Jan 1 00:00:00 1970 From: mulyadi.santosa@gmail.com (Mulyadi Santosa) Date: Wed, 15 Feb 2012 21:56:40 +0700 Subject: System call trace In-Reply-To: References: Message-ID: To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org Hi :) On Wed, Feb 15, 2012 at 21:38, Swapnil Gaikwad 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