Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
From: glmeocci@gmail.com (Gian Lorenzo Meocci)
Subject: [ltt-dev] sys time
Date: Fri, 17 Oct 2008 15:06:31 +0200	[thread overview]
Message-ID: <8d94e9280810170606o729767f3p839c1c3a59c9565d@mail.gmail.com> (raw)
In-Reply-To: <8d94e9280810170558j5b9ed8d1q7da37da677c7bf7d@mail.gmail.com>

Hi,

I want to retrieve from a lttng trace a total time that a thread has
spent in the kernel.
For example this stupid program uses only sys call functions:

int main()
{
       int i=0;
       char buf[1024];
       FILE *fd=fopen("/dev/urandom","r");
       while(i<10000)
       {
               fread(&buf[0],1,1024,fd);
               i++;
       }

       fclose(fd);
       return 0;
}

if I run it with the linux command "time" I give:

real    0m1.714s
user    0m0.004s
sys     0m1.708s

I want to know if it is possible to obtain this results using lttng trace.
Actually I made a sum of all differences from a
kernel_arch_trap_entry/kernel_arch_trap_exit,
kernel_arch_syscall_entry/exit, kernel_softirq_entry/exit,
mm_handle_fault_entry/exit, kernel_irq_entry/exit.
But for now, my results isn't very good.

Best regards,

-- 
Ing. Gian Lorenzo Meocci
http://www.meocci.it



       reply	other threads:[~2008-10-17 13:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <8d94e9280810170558j5b9ed8d1q7da37da677c7bf7d@mail.gmail.com>
2008-10-17 13:06 ` Gian Lorenzo Meocci [this message]
2008-10-17 15:26   ` Pierre-Marc Fournier
2008-10-17 16:28     ` Mathieu Desnoyers
2008-10-17 16:40       ` Gian Lorenzo Meocci
2008-10-17 17:33         ` Michel Dagenais

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=8d94e9280810170606o729767f3p839c1c3a59c9565d@mail.gmail.com \
    --to=glmeocci@gmail.com \
    /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