mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: duzhiping <duzhiping.du@huawei.com>
Cc: <mingo@redhat.com>, <linux-kernel@vger.kernel.org>,
	<wangnan0@huawei.com>
Subject: Re: itrace: An interrupts tracing tool
Date: Mon, 22 Sep 2014 08:18:14 -0400	[thread overview]
Message-ID: <20140922081814.71cf11ea@gandalf.local.home> (raw)
In-Reply-To: <541F990F.7030806@huawei.com>

On Mon, 22 Sep 2014 11:35:43 +0800
duzhiping <duzhiping.du@huawei.com> wrote:

>   Many functions depends on interrupts in Linux system, when the interrupts occur an error, it may cause fatal problem.
> 
>   Then, we should record their trace when interrupts in and out. The recorded information could help us analyze interrupts errors.
> 
>   Itrace is such an interrupts trace tool we have developed, it provides config interface and trace information through "procfs".
> 
>   Do you think it has the value to upstream?
> 

You mean like:

# trace-cmd record -p function_graph -l do_IRQ -e irq_handler_entry sleep 10
# trace-cmd report
       trace-cmd-3165  [002]    53.201912: funcgraph_entry:                   |  do_IRQ() {
       trace-cmd-3165  [002]    53.201920: irq_handler_entry:    irq=21 name=uhci_hcd:usb4
       trace-cmd-3165  [002]    53.201924: irq_handler_entry:    irq=21 name=eth0
       trace-cmd-3165  [002]    53.201927: funcgraph_exit:       + 12.738 us  |  }
          <idle>-0     [003]    53.202140: funcgraph_entry:                   |  do_IRQ() {
          <idle>-0     [003]    53.202146: irq_handler_entry:    irq=21 name=uhci_hcd:usb4
          <idle>-0     [003]    53.202148: irq_handler_entry:    irq=21 name=eth0
          <idle>-0     [003]    53.202151: funcgraph_exit:       + 10.172 us  |  }
          <idle>-0     [000]    58.679619: funcgraph_entry:                   |  do_IRQ() {
          <idle>-0     [000]    58.679625: irq_handler_entry:    irq=14 name=ata_piix
          <idle>-0     [000]    58.679630: funcgraph_exit:         8.040 us   |  }
          <idle>-0     [001]    58.680176: funcgraph_entry:                   |  do_IRQ() {
          <idle>-0     [001]    58.680178: irq_handler_entry:    irq=14 name=ata_piix
          <idle>-0     [001]    58.680181: funcgraph_exit:         4.160 us   |  }
          <idle>-0     [002]    58.680633: funcgraph_entry:                   |  do_IRQ() {
          <idle>-0     [002]    58.680635: irq_handler_entry:    irq=14 name=ata_piix
          <idle>-0     [002]    58.680637: funcgraph_exit:         3.489 us   |  }
          <idle>-0     [003]    58.680913: funcgraph_entry:                   |  do_IRQ() {
          <idle>-0     [003]    58.680915: irq_handler_entry:    irq=14 name=ata_piix
          <idle>-0     [003]    58.680917: funcgraph_exit:         3.368 us   |  }
    kworker/u8:1-40    [000]    58.681191: funcgraph_entry:                   |  do_IRQ() {
    kworker/u8:1-40    [000]    58.681192: irq_handler_entry:    irq=14 name=ata_piix
    kworker/u8:1-40    [000]    58.681196: funcgraph_exit:         4.551 us   |  }
          <idle>-0     [001]    58.681415: funcgraph_entry:                   |  do_IRQ() {
          <idle>-0     [001]    58.681417: irq_handler_entry:    irq=14 name=ata_piix
          <idle>-0     [001]    58.681420: funcgraph_exit:         3.991 us   |  }
          <idle>-0     [002]    58.681632: funcgraph_entry:                   |  do_IRQ() {
          <idle>-0     [002]    58.681633: irq_handler_entry:    irq=14 name=ata_piix
          <idle>-0     [002]    58.681635: funcgraph_exit:         2.183 us   |  }


Or just use the irq events only?

# trace-cmd record -e irq_handler_entry -e irq_handler_exit sleep 10
# trace-cmd report
          <idle>-0     [003]   198.853342: irq_handler_entry:    irq=14 name=ata_piix
          <idle>-0     [003]   198.853344: irq_handler_exit:     irq=14 ret=handled
          <idle>-0     [000]   198.862038: irq_handler_entry:    irq=14 name=ata_piix
          <idle>-0     [000]   198.862040: irq_handler_exit:     irq=14 ret=handled
          <idle>-0     [001]   198.862227: irq_handler_entry:    irq=14 name=ata_piix
          <idle>-0     [001]   198.862228: irq_handler_exit:     irq=14 ret=handled
          <idle>-0     [002]   198.870423: irq_handler_entry:    irq=14 name=ata_piix
          <idle>-0     [002]   198.870424: irq_handler_exit:     irq=14 ret=handled


It's a bit cleaner, but the function_graph gives the times nicely. But
I do plan on updating trace-cmd to give times between different events.

-- Steve

      parent reply	other threads:[~2014-09-22 12:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-22  3:35 duzhiping
2014-09-22  8:04 ` Mats Liljegren
2014-09-22 12:18 ` Steven Rostedt [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=20140922081814.71cf11ea@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=duzhiping.du@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=wangnan0@huawei.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

all inboxes | Powered by JetHome®