%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/share/doc/trace-cmd/trace-cmd/
Upload File :
Create Path :
Current File : //usr/share/doc/trace-cmd/trace-cmd/trace-cmd-report.1.html

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
<meta name="generator" content="AsciiDoc 10.2.0" />
<title>TRACE-CMD-REPORT(1)</title>
<style type="text/css">
/* Shared CSS for AsciiDoc xhtml11 and html5 backends */

/* Default font. */
body {
  font-family: Georgia,serif;
}

/* Title font. */
h1, h2, h3, h4, h5, h6,
div.title, caption.title,
thead, p.table.header,
#toctitle,
#author, #revnumber, #revdate, #revremark,
#footer {
  font-family: Arial,Helvetica,sans-serif;
}

body {
  margin: 1em 5% 1em 5%;
}

a {
  color: blue;
  text-decoration: underline;
}
a:visited {
  color: fuchsia;
}

em {
  font-style: italic;
  color: navy;
}

strong {
  font-weight: bold;
  color: #083194;
}

h1, h2, h3, h4, h5, h6 {
  color: #527bbd;
  margin-top: 1.2em;
  margin-bottom: 0.5em;
  line-height: 1.3;
}

h1, h2, h3 {
  border-bottom: 2px solid silver;
}
h2 {
  padding-top: 0.5em;
}
h3 {
  float: left;
}
h3 + * {
  clear: left;
}
h5 {
  font-size: 1.0em;
}

div.sectionbody {
  margin-left: 0;
}

hr {
  border: 1px solid silver;
}

p {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

ul, ol, li > p {
  margin-top: 0;
}
ul > li     { color: #aaa; }
ul > li > * { color: black; }

.monospaced, code, pre {
  font-family: "Courier New", Courier, monospace;
  font-size: inherit;
  color: navy;
  padding: 0;
  margin: 0;
}
pre {
  white-space: pre-wrap;
}

#author {
  color: #527bbd;
  font-weight: bold;
  font-size: 1.1em;
}
#email {
}
#revnumber, #revdate, #revremark {
}

#footer {
  font-size: small;
  border-top: 2px solid silver;
  padding-top: 0.5em;
  margin-top: 4.0em;
}
#footer-text {
  float: left;
  padding-bottom: 0.5em;
}
#footer-badges {
  float: right;
  padding-bottom: 0.5em;
}

#preamble {
  margin-top: 1.5em;
  margin-bottom: 1.5em;
}
div.imageblock, div.exampleblock, div.verseblock,
div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
div.admonitionblock {
  margin-top: 1.0em;
  margin-bottom: 1.5em;
}
div.admonitionblock {
  margin-top: 2.0em;
  margin-bottom: 2.0em;
  margin-right: 10%;
  color: #606060;
}

div.content { /* Block element content. */
  padding: 0;
}

/* Block element titles. */
div.title, caption.title {
  color: #527bbd;
  font-weight: bold;
  text-align: left;
  margin-top: 1.0em;
  margin-bottom: 0.5em;
}
div.title + * {
  margin-top: 0;
}

td div.title:first-child {
  margin-top: 0.0em;
}
div.content div.title:first-child {
  margin-top: 0.0em;
}
div.content + div.title {
  margin-top: 0.0em;
}

div.sidebarblock > div.content {
  background: #ffffee;
  border: 1px solid #dddddd;
  border-left: 4px solid #f0f0f0;
  padding: 0.5em;
}

div.listingblock > div.content {
  border: 1px solid #dddddd;
  border-left: 5px solid #f0f0f0;
  background: #f8f8f8;
  padding: 0.5em;
}

div.quoteblock, div.verseblock {
  padding-left: 1.0em;
  margin-left: 1.0em;
  margin-right: 10%;
  border-left: 5px solid #f0f0f0;
  color: #888;
}

div.quoteblock > div.attribution {
  padding-top: 0.5em;
  text-align: right;
}

div.verseblock > pre.content {
  font-family: inherit;
  font-size: inherit;
}
div.verseblock > div.attribution {
  padding-top: 0.75em;
  text-align: left;
}
/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
div.verseblock + div.attribution {
  text-align: left;
}

div.admonitionblock .icon {
  vertical-align: top;
  font-size: 1.1em;
  font-weight: bold;
  text-decoration: underline;
  color: #527bbd;
  padding-right: 0.5em;
}
div.admonitionblock td.content {
  padding-left: 0.5em;
  border-left: 3px solid #dddddd;
}

div.exampleblock > div.content {
  border-left: 3px solid #dddddd;
  padding-left: 0.5em;
}

div.imageblock div.content { padding-left: 0; }
span.image img { border-style: none; vertical-align: text-bottom; }
a.image:visited { color: white; }

dl {
  margin-top: 0.8em;
  margin-bottom: 0.8em;
}
dt {
  margin-top: 0.5em;
  margin-bottom: 0;
  font-style: normal;
  color: navy;
}
dd > *:first-child {
  margin-top: 0.1em;
}

ul, ol {
    list-style-position: outside;
}
ol.arabic {
  list-style-type: decimal;
}
ol.loweralpha {
  list-style-type: lower-alpha;
}
ol.upperalpha {
  list-style-type: upper-alpha;
}
ol.lowerroman {
  list-style-type: lower-roman;
}
ol.upperroman {
  list-style-type: upper-roman;
}

div.compact ul, div.compact ol,
div.compact p, div.compact p,
div.compact div, div.compact div {
  margin-top: 0.1em;
  margin-bottom: 0.1em;
}

tfoot {
  font-weight: bold;
}
td > div.verse {
  white-space: pre;
}

div.hdlist {
  margin-top: 0.8em;
  margin-bottom: 0.8em;
}
div.hdlist tr {
  padding-bottom: 15px;
}
dt.hdlist1.strong, td.hdlist1.strong {
  font-weight: bold;
}
td.hdlist1 {
  vertical-align: top;
  font-style: normal;
  padding-right: 0.8em;
  color: navy;
}
td.hdlist2 {
  vertical-align: top;
}
div.hdlist.compact tr {
  margin: 0;
  padding-bottom: 0;
}

.comment {
  background: yellow;
}

.footnote, .footnoteref {
  font-size: 0.8em;
}

span.footnote, span.footnoteref {
  vertical-align: super;
}

#footnotes {
  margin: 20px 0 20px 0;
  padding: 7px 0 0 0;
}

#footnotes div.footnote {
  margin: 0 0 5px 0;
}

#footnotes hr {
  border: none;
  border-top: 1px solid silver;
  height: 1px;
  text-align: left;
  margin-left: 0;
  width: 20%;
  min-width: 100px;
}

div.colist td {
  padding-right: 0.5em;
  padding-bottom: 0.3em;
  vertical-align: top;
}
div.colist td img {
  margin-top: 0.3em;
}

@media print {
  #footer-badges { display: none; }
}

#toc {
  margin-bottom: 2.5em;
}

#toctitle {
  color: #527bbd;
  font-size: 1.1em;
  font-weight: bold;
  margin-top: 1.0em;
  margin-bottom: 0.1em;
}

div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
  margin-top: 0;
  margin-bottom: 0;
}
div.toclevel2 {
  margin-left: 2em;
  font-size: 0.9em;
}
div.toclevel3 {
  margin-left: 4em;
  font-size: 0.9em;
}
div.toclevel4 {
  margin-left: 6em;
  font-size: 0.9em;
}

span.aqua { color: aqua; }
span.black { color: black; }
span.blue { color: blue; }
span.fuchsia { color: fuchsia; }
span.gray { color: gray; }
span.green { color: green; }
span.lime { color: lime; }
span.maroon { color: maroon; }
span.navy { color: navy; }
span.olive { color: olive; }
span.purple { color: purple; }
span.red { color: red; }
span.silver { color: silver; }
span.teal { color: teal; }
span.white { color: white; }
span.yellow { color: yellow; }

span.aqua-background { background: aqua; }
span.black-background { background: black; }
span.blue-background { background: blue; }
span.fuchsia-background { background: fuchsia; }
span.gray-background { background: gray; }
span.green-background { background: green; }
span.lime-background { background: lime; }
span.maroon-background { background: maroon; }
span.navy-background { background: navy; }
span.olive-background { background: olive; }
span.purple-background { background: purple; }
span.red-background { background: red; }
span.silver-background { background: silver; }
span.teal-background { background: teal; }
span.white-background { background: white; }
span.yellow-background { background: yellow; }

span.big { font-size: 2em; }
span.small { font-size: 0.6em; }

span.underline { text-decoration: underline; }
span.overline { text-decoration: overline; }
span.line-through { text-decoration: line-through; }

div.unbreakable { page-break-inside: avoid; }


/*
 * xhtml11 specific
 *
 * */

div.tableblock {
  margin-top: 1.0em;
  margin-bottom: 1.5em;
}
div.tableblock > table {
  border: 3px solid #527bbd;
}
thead, p.table.header {
  font-weight: bold;
  color: #527bbd;
}
p.table {
  margin-top: 0;
}
/* Because the table frame attribute is overridden by CSS in most browsers. */
div.tableblock > table[frame="void"] {
  border-style: none;
}
div.tableblock > table[frame="hsides"] {
  border-left-style: none;
  border-right-style: none;
}
div.tableblock > table[frame="vsides"] {
  border-top-style: none;
  border-bottom-style: none;
}


/*
 * html5 specific
 *
 * */

table.tableblock {
  margin-top: 1.0em;
  margin-bottom: 1.5em;
}
thead, p.tableblock.header {
  font-weight: bold;
  color: #527bbd;
}
p.tableblock {
  margin-top: 0;
}
table.tableblock {
  border-width: 3px;
  border-spacing: 0px;
  border-style: solid;
  border-color: #527bbd;
  border-collapse: collapse;
}
th.tableblock, td.tableblock {
  border-width: 1px;
  padding: 4px;
  border-style: solid;
  border-color: #527bbd;
}

table.tableblock.frame-topbot {
  border-left-style: hidden;
  border-right-style: hidden;
}
table.tableblock.frame-sides {
  border-top-style: hidden;
  border-bottom-style: hidden;
}
table.tableblock.frame-none {
  border-style: hidden;
}

th.tableblock.halign-left, td.tableblock.halign-left {
  text-align: left;
}
th.tableblock.halign-center, td.tableblock.halign-center {
  text-align: center;
}
th.tableblock.halign-right, td.tableblock.halign-right {
  text-align: right;
}

th.tableblock.valign-top, td.tableblock.valign-top {
  vertical-align: top;
}
th.tableblock.valign-middle, td.tableblock.valign-middle {
  vertical-align: middle;
}
th.tableblock.valign-bottom, td.tableblock.valign-bottom {
  vertical-align: bottom;
}


/*
 * manpage specific
 *
 * */

body.manpage h1 {
  padding-top: 0.5em;
  padding-bottom: 0.5em;
  border-top: 2px solid silver;
  border-bottom: 2px solid silver;
}
body.manpage h2 {
  border-style: none;
}
body.manpage div.sectionbody {
  margin-left: 3em;
}

@media print {
  body.manpage div#toc { display: none; }
}


</style>
<script type="text/javascript">
/*<![CDATA[*/
var asciidoc = {  // Namespace.

/////////////////////////////////////////////////////////////////////
// Table Of Contents generator
/////////////////////////////////////////////////////////////////////

/* Author: Mihai Bazon, September 2002
 * http://students.infoiasi.ro/~mishoo
 *
 * Table Of Content generator
 * Version: 0.4
 *
 * Feel free to use this script under the terms of the GNU General Public
 * License, as long as you do not remove or alter this notice.
 */

 /* modified by Troy D. Hanson, September 2006. License: GPL */
 /* modified by Stuart Rackham, 2006, 2009. License: GPL */

// toclevels = 1..4.
toc: function (toclevels) {

  function getText(el) {
    var text = "";
    for (var i = el.firstChild; i != null; i = i.nextSibling) {
      if (i.nodeType == 3 /* Node.TEXT_NODE */) // IE doesn't speak constants.
        text += i.data;
      else if (i.firstChild != null)
        text += getText(i);
    }
    return text;
  }

  function TocEntry(el, text, toclevel) {
    this.element = el;
    this.text = text;
    this.toclevel = toclevel;
  }

  function tocEntries(el, toclevels) {
    var result = new Array;
    var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
    // Function that scans the DOM tree for header elements (the DOM2
    // nodeIterator API would be a better technique but not supported by all
    // browsers).
    var iterate = function (el) {
      for (var i = el.firstChild; i != null; i = i.nextSibling) {
        if (i.nodeType == 1 /* Node.ELEMENT_NODE */) {
          var mo = re.exec(i.tagName);
          if (mo && (i.getAttribute("class") || i.getAttribute("className")) != "float") {
            result[result.length] = new TocEntry(i, getText(i), mo[1]-1);
          }
          iterate(i);
        }
      }
    }
    iterate(el);
    return result;
  }

  var toc = document.getElementById("toc");
  if (!toc) {
    return;
  }

  // Delete existing TOC entries in case we're reloading the TOC.
  var tocEntriesToRemove = [];
  var i;
  for (i = 0; i < toc.childNodes.length; i++) {
    var entry = toc.childNodes[i];
    if (entry.nodeName.toLowerCase() == 'div'
     && entry.getAttribute("class")
     && entry.getAttribute("class").match(/^toclevel/))
      tocEntriesToRemove.push(entry);
  }
  for (i = 0; i < tocEntriesToRemove.length; i++) {
    toc.removeChild(tocEntriesToRemove[i]);
  }

  // Rebuild TOC entries.
  var entries = tocEntries(document.getElementById("content"), toclevels);
  for (var i = 0; i < entries.length; ++i) {
    var entry = entries[i];
    if (entry.element.id == "")
      entry.element.id = "_toc_" + i;
    var a = document.createElement("a");
    a.href = "#" + entry.element.id;
    a.appendChild(document.createTextNode(entry.text));
    var div = document.createElement("div");
    div.appendChild(a);
    div.className = "toclevel" + entry.toclevel;
    toc.appendChild(div);
  }
  if (entries.length == 0)
    toc.parentNode.removeChild(toc);
},


/////////////////////////////////////////////////////////////////////
// Footnotes generator
/////////////////////////////////////////////////////////////////////

/* Based on footnote generation code from:
 * http://www.brandspankingnew.net/archive/2005/07/format_footnote.html
 */

footnotes: function () {
  // Delete existing footnote entries in case we're reloading the footnodes.
  var i;
  var noteholder = document.getElementById("footnotes");
  if (!noteholder) {
    return;
  }
  var entriesToRemove = [];
  for (i = 0; i < noteholder.childNodes.length; i++) {
    var entry = noteholder.childNodes[i];
    if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
      entriesToRemove.push(entry);
  }
  for (i = 0; i < entriesToRemove.length; i++) {
    noteholder.removeChild(entriesToRemove[i]);
  }

  // Rebuild footnote entries.
  var cont = document.getElementById("content");
  var spans = cont.getElementsByTagName("span");
  var refs = {};
  var n = 0;
  for (i=0; i<spans.length; i++) {
    if (spans[i].className == "footnote") {
      n++;
      var note = spans[i].getAttribute("data-note");
      if (!note) {
        // Use [\s\S] in place of . so multi-line matches work.
        // Because JavaScript has no s (dotall) regex flag.
        note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
        spans[i].innerHTML =
          "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
          "' title='View footnote' class='footnote'>" + n + "</a>]";
        spans[i].setAttribute("data-note", note);
      }
      noteholder.innerHTML +=
        "<div class='footnote' id='_footnote_" + n + "'>" +
        "<a href='#_footnoteref_" + n + "' title='Return to text'>" +
        n + "</a>. " + note + "</div>";
      var id =spans[i].getAttribute("id");
      if (id != null) refs["#"+id] = n;
    }
  }
  if (n == 0)
    noteholder.parentNode.removeChild(noteholder);
  else {
    // Process footnoterefs.
    for (i=0; i<spans.length; i++) {
      if (spans[i].className == "footnoteref") {
        var href = spans[i].getElementsByTagName("a")[0].getAttribute("href");
        href = href.match(/#.*/)[0];  // Because IE return full URL.
        n = refs[href];
        spans[i].innerHTML =
          "[<a href='#_footnote_" + n +
          "' title='View footnote' class='footnote'>" + n + "</a>]";
      }
    }
  }
},

install: function(toclevels) {
  var timerId;

  function reinstall() {
    asciidoc.footnotes();
    if (toclevels) {
      asciidoc.toc(toclevels);
    }
  }

  function reinstallAndRemoveTimer() {
    clearInterval(timerId);
    reinstall();
  }

  timerId = setInterval(reinstall, 500);
  if (document.addEventListener)
    document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false);
  else
    window.onload = reinstallAndRemoveTimer;
}

}
asciidoc.install();
/*]]>*/
</script>
</head>
<body class="manpage">
<div id="header">
<h1>
TRACE-CMD-REPORT(1) Manual Page
</h1>
<h2>NAME</h2>
<div class="sectionbody">
<p>trace-cmd-report -
   show in ASCII a trace created by trace-cmd record
</p>
</div>
</div>
<div id="content">
<div class="sect1">
<h2 id="_synopsis">SYNOPSIS</h2>
<div class="sectionbody">
<div class="paragraph"><p><strong>trace-cmd report</strong> [<em>OPTIONS</em>] [<em>input-file</em>]</p></div>
</div>
</div>
<div class="sect1">
<h2 id="_description">DESCRIPTION</h2>
<div class="sectionbody">
<div class="paragraph"><p>The trace-cmd(1) report command will output a human readable report of a trace
created by trace-cmd record.</p></div>
</div>
</div>
<div class="sect1">
<h2 id="_options">OPTIONS</h2>
<div class="sectionbody">
<div class="dlist"><dl>
<dt class="hdlist1">
<strong>-i</strong> <em>input-file</em>
</dt>
<dd>
<p>
    By default, trace-cmd report will read the file <em>trace.dat</em>. But the <strong>-i</strong>
    option open up the given <em>input-file</em> instead. Note, the input file may
    also be specified as the last item on the command line.
</p>
</dd>
<dt class="hdlist1">
<strong>-e</strong>
</dt>
<dd>
<p>
    This outputs the endianess of the file. trace-cmd report is smart enough
    to be able to read big endian files on little endian machines, and vise
    versa.
</p>
</dd>
<dt class="hdlist1">
<strong>-f</strong>
</dt>
<dd>
<p>
    This outputs the list of all functions that have been mapped in the trace.dat file.
    Note, this list may contain functions that may not appear in the trace, as
    it is the list of mappings to translate function addresses into function names.
</p>
</dd>
<dt class="hdlist1">
<strong>-P</strong>
</dt>
<dd>
<p>
    This outputs the list of "trace_printk()" data. The raw trace data points
    to static pointers in the kernel. This must be stored in the trace.dat
    file.
</p>
</dd>
<dt class="hdlist1">
<strong>-E</strong>
</dt>
<dd>
<p>
    This lists the possible events in the file (but this list is not
    necessarily the list of events in the file).
</p>
</dd>
<dt class="hdlist1">
<strong>--events</strong>
</dt>
<dd>
<p>
    This will list the event formats that are stored in the trace.dat file.
</p>
</dd>
<dt class="hdlist1">
<strong>--event</strong> regex
</dt>
<dd>
<p>
    This will print events that match the given regex. If a colon is specified,
    then the characters before the colon will be used to match the system and
    the characters after the colon will match the event.
</p>
<div class="literalblock">
<div class="content">
<pre><code>trace-cmd report --event sys:read</code></pre>
</div></div>
<div class="literalblock">
<div class="content">
<pre><code>The above will only match events where the system name contains "sys"
and the event name contains "read".</code></pre>
</div></div>
<div class="literalblock">
<div class="content">
<pre><code>trace-cmd report --event read</code></pre>
</div></div>
<div class="literalblock">
<div class="content">
<pre><code>The above will match all events that contain "read" in its name. Also it
may list all events of a system that contains "read" as well.</code></pre>
</div></div>
</dd>
<dt class="hdlist1">
<strong>--check-events</strong>
</dt>
<dd>
<p>
    This will parse the event format strings that are stored in the trace.dat
    file and return whether the formats can be parsed correctly. It will load
    plugins unless <strong>-N</strong> is specified.
</p>
</dd>
<dt class="hdlist1">
<strong>-t</strong>
</dt>
<dd>
<p>
    Print the full timestamp. The timestamps in the data file are usually
    recorded to the nanosecond. But the default display of the timestamp
    is only to the microsecond. To see the full timestamp, add the <strong>-t</strong> option.
</p>
</dd>
<dt class="hdlist1">
<strong>-F</strong> <em>filter</em>
</dt>
<dd>
<p>
    Add a filter to limit what events are displayed.  Filters defined
    after an input file (specified with <strong>-i</strong>) only apply to that
    input file. Filters provided before any input file is given are
    considered global and apply to all input files.
</p>
<div class="literalblock">
<div class="content">
<pre><code>The format of the filter is:</code></pre>
</div></div>
</dd>
</dl></div>
<div class="listingblock">
<div class="content"><!-- Generator: GNU source-highlight
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt>    &lt;<span style="font-weight: bold"><span style="color: #000080">events</span></span><span style="color: #990000">&gt;</span> '<span style="color: #990000">:</span>' <span style="color: #990000">&lt;</span>filter<span style="color: #990000">&gt;</span>
    &lt;<span style="font-weight: bold"><span style="color: #000080">events</span></span><span style="color: #990000">&gt;</span> <span style="color: #990000">=</span> SYSTEM'<span style="color: #990000">/</span>'EVENT  <span style="color: #990000">|</span> SYSTEM <span style="color: #990000">|</span> EVENT <span style="color: #990000">|</span> <span style="color: #990000">&lt;</span>events<span style="color: #990000">&gt;</span> '<span style="color: #990000">,</span>' <span style="color: #990000">&lt;</span>events<span style="color: #990000">&gt;</span>
    &lt;<span style="font-weight: bold"><span style="color: #000080">filter</span></span><span style="color: #990000">&gt;</span> <span style="color: #990000">=</span> EVENT_FIELD <span style="color: #990000">&lt;</span>op<span style="color: #990000">&gt;</span> <span style="color: #990000">&lt;</span>value<span style="color: #990000">&gt;</span> <span style="color: #990000">|</span> <span style="color: #990000">&lt;</span>filter<span style="color: #990000">&gt;</span> '<span style="color: #990000">&amp;&amp;</span>' <span style="color: #990000">&lt;</span>filter<span style="color: #990000">&gt;</span> <span style="color: #990000">|</span>
               &lt;<span style="font-weight: bold"><span style="color: #000080">filter</span></span><span style="color: #990000">&gt;</span> '<span style="color: #990000">||</span>' <span style="color: #990000">&lt;</span>filter<span style="color: #990000">&gt;</span> <span style="color: #990000">|</span> '<span style="color: #990000">(</span>' <span style="color: #990000">&lt;</span>filter<span style="color: #990000">&gt;</span> '<span style="color: #990000">)</span>' <span style="color: #990000">|</span> '<span style="color: #990000">!</span>' <span style="color: #990000">&lt;</span>filter<span style="color: #990000">&gt;</span>
    &lt;<span style="font-weight: bold"><span style="color: #000080">op</span></span><span style="color: #990000">&gt;</span> <span style="color: #990000">=</span> '<span style="color: #990000">==</span>' <span style="color: #990000">|</span> '<span style="color: #990000">!=</span>' <span style="color: #990000">|</span> '<span style="color: #990000">&gt;=</span>' <span style="color: #990000">|</span> '<span style="color: #990000">&lt;=</span>' <span style="color: #990000">|</span> '<span style="color: #990000">&gt;</span>' <span style="color: #990000">|</span> '<span style="color: #990000">&lt;</span>' <span style="color: #990000">|</span> '<span style="color: #990000">&amp;</span>' <span style="color: #990000">|</span> '<span style="color: #990000">|</span>' <span style="color: #990000">|</span> '<span style="color: #990000">^</span>' <span style="color: #990000">|</span>
           '+' | '-' | '*' | '/' | '%'
    &lt;<span style="font-weight: bold"><span style="color: #000080">value</span></span><span style="color: #990000">&gt;</span> <span style="color: #990000">=</span> NUM <span style="color: #990000">|</span> STRING <span style="color: #990000">|</span> EVENT_FIELD</tt></pre></div></div>
<div class="literalblock">
<div class="content">
<pre><code>SYSTEM is the name of the system to filter on. If the EVENT is left out,
then it applies to all events under the SYSTEM. If only one string is used
without the '/' to deliminate between SYSTEM and EVENT, then the filter
will be applied to all systems and events that match the given string.</code></pre>
</div></div>
<div class="literalblock">
<div class="content">
<pre><code>Whitespace is ignored, such that "sched:next_pid==123" is equivalent to
"sched : next_pid == 123".</code></pre>
</div></div>
<div class="literalblock">
<div class="content">
<pre><code>STRING is defined with single or double quotes (single quote must end with
single quote, and double with double). Whitespace within quotes are not
ignored.</code></pre>
</div></div>
<div class="literalblock">
<div class="content">
<pre><code>The representation of a SYSTEM or EVENT may also be a regular expression
as defined by 'regcomp(3)'.</code></pre>
</div></div>
<div class="literalblock">
<div class="content">
<pre><code>The EVENT_FIELD is the name of the field of an event that is being
filtered. If the event does not contain the EVENT_FIELD, that part of the
equation will be considered false.</code></pre>
</div></div>
<div class="listingblock">
<div class="content"><!-- Generator: GNU source-highlight
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt>    -F <span style="color: #FF0000">'sched : bogus == 1 || common_pid == 2'</span></tt></pre></div></div>
<div class="literalblock">
<div class="content">
<pre><code>The "bogus == 1" will always evaluate to FALSE because no event has a
field called "bogus", but the "common_pid == 2" will still be evaluated
since all events have the field "common_pid". Any "sched" event that was
traced by the process with the PID of 2 will be shown.</code></pre>
</div></div>
<div class="literalblock">
<div class="content">
<pre><code>Note, the EVENT_FIELD is the field name as shown by an events format
(as displayed with *--events*), and not what is found in the output.
If the output shows "ID:foo" but the field that "foo" belongs to was
called "name" in the event format, then "name" must be used in the filter.
The same is true about values. If the value that is displayed is converted
by to a string symbol, the filter checks the original value and not the
value displayed. For example, to filter on all tasks that were in the
running state at a context switch:</code></pre>
</div></div>
<div class="listingblock">
<div class="content"><!-- Generator: GNU source-highlight
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt>    -F <span style="color: #FF0000">'sched/sched_switch : prev_state==0'</span></tt></pre></div></div>
<div class="literalblock">
<div class="content">
<pre><code>Although the output displays 'R', having 'prev_stat=="R"' will not work.</code></pre>
</div></div>
<div class="literalblock">
<div class="content">
<pre><code>Note: You can also specify 'COMM' as an EVENT_FIELD. This will use the
task name (or comm) of the record to compare. For example, to filter out
all of the "trace-cmd" tasks:</code></pre>
</div></div>
<div class="listingblock">
<div class="content"><!-- Generator: GNU source-highlight
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt>    -F <span style="color: #FF0000">'.*:COMM != "trace-cmd"'</span></tt></pre></div></div>
<div class="dlist"><dl>
<dt class="hdlist1">
<strong>-I</strong>
</dt>
<dd>
<p>
    Do not print events where the HARDIRQ latency flag is set.
    This will filter out most events that are from interrupt context.
    Note, it may not filter out function traced functions that are
    in interrupt context but were called before the kernel "in interrupt"
    flag was set.
</p>
</dd>
<dt class="hdlist1">
<strong>-S</strong>
</dt>
<dd>
<p>
    Do not print events where the SOFTIRQ latency flag is set.
    This will filter out most events that are from soft interrupt context.
</p>
</dd>
<dt class="hdlist1">
<strong>-v</strong>
</dt>
<dd>
<p>
    This causes the following filters of <strong>-F</strong> to filter out the matching
    events.
</p>
</dd>
</dl></div>
<div class="listingblock">
<div class="content"><!-- Generator: GNU source-highlight
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt>    -v -F <span style="color: #FF0000">'sched/sched_switch : prev_state == 0'</span></tt></pre></div></div>
<div class="literalblock">
<div class="content">
<pre><code>Will not display any sched_switch events that have a prev_state of 0.
Removing the *-v* will only print out those events.</code></pre>
</div></div>
<div class="dlist"><dl>
<dt class="hdlist1">
<strong>-T</strong>
</dt>
<dd>
<p>
    Test the filters of -F. After processing a filter string, the
    resulting filter will be displayed for each event. This is useful
    for using a filter for more than one event where a field may not
    exist in all events. Also it can be used to make sure there are no
    misspelled event field names, as they will simply be ignored.
    <strong>-T</strong> is ignored if <strong>-F</strong> is not specified.
</p>
</dd>
<dt class="hdlist1">
<strong>-V</strong>
</dt>
<dd>
<p>
    Show verbose messages (see <strong>--verbose</strong> but only for the numbers)
</p>
</dd>
<dt class="hdlist1">
<strong>-L</strong>
</dt>
<dd>
<p>
    This will not load system wide plugins. It loads "local only". That is
    what it finds in the ~/.trace-cmd/plugins directory.
</p>
</dd>
<dt class="hdlist1">
<strong>-N</strong>
</dt>
<dd>
<p>
    This will not load any plugins.
</p>
</dd>
<dt class="hdlist1">
<strong>-n</strong> <em>event-re</em>
</dt>
<dd>
<p>
    This will cause all events that match the option to ignore any registered
    handler (by the plugins) to print the event. The normal event will be printed
    instead.  The <em>event-re</em> is a regular expression as defined by <em>regcomp(3)</em>.
</p>
</dd>
<dt class="hdlist1">
<strong>--profile</strong>
</dt>
<dd>
<p>
    With the <strong>--profile</strong> option, "trace-cmd report" will process all the events
    first, and then output a format showing where tasks have spent their time
    in the kernel, as well as where they are blocked the most, and where wake up
    latencies are.
</p>
<div class="literalblock">
<div class="content">
<pre><code>See trace-cmd-profile(1) for more details and examples.</code></pre>
</div></div>
</dd>
<dt class="hdlist1">
<strong>-G</strong>
</dt>
<dd>
<p>
    Set interrupt (soft and hard) events as global (associated to CPU
    instead of tasks). Only works for --profile.
</p>
</dd>
<dt class="hdlist1">
<strong>-H</strong> <em>event-hooks</em>
</dt>
<dd>
<p>
    Add custom event matching to connect any two events together.
</p>
<div class="literalblock">
<div class="content">
<pre><code>See trace-cmd-profile(1) for format.</code></pre>
</div></div>
</dd>
<dt class="hdlist1">
<strong>-R</strong>
</dt>
<dd>
<p>
    This will show the events in "raw" format. That is, it will ignore the event&#8217;s
    print formatting and just print the contents of each field.
</p>
</dd>
<dt class="hdlist1">
<strong>-r</strong> <em>event-re</em>
</dt>
<dd>
<p>
    This will cause all events that match the option to print its raw fields.
    The <em>event-re</em> is a regular expression as defined by <em>regcomp(3)</em>.
</p>
</dd>
<dt class="hdlist1">
<strong>-l</strong>
</dt>
<dd>
<p>
    This adds a "latency output" format. Information about interrupts being
    disabled, soft irq being disabled, the "need_resched" flag being set,
    preempt count, and big kernel lock are all being recorded with every
    event. But the default display does not show this information. This option
    will set display this information with 6 characters. When one of the
    fields is zero or N/A a '.\' is shown.
</p>
</dd>
</dl></div>
<div class="listingblock">
<div class="content"><!-- Generator: GNU source-highlight
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt>      <span style="color: #990000">&lt;</span>idle<span style="color: #990000">&gt;</span>-<span style="color: #993399">0</span>       0d<span style="color: #990000">.</span>h1<span style="color: #990000">.</span> <span style="color: #993399">106467.859747</span><span style="color: #990000">:</span> function<span style="color: #990000">:</span>             ktime_get <span style="color: #990000">&lt;</span>-- tick_check_idle</tt></pre></div></div>
<div class="literalblock">
<div class="content">
<pre><code>The 0d.h1. denotes this information.</code></pre>
</div></div>
<div class="literalblock">
<div class="content">
<pre><code>It starts with a number. This represents the CPU number that the event occurred
on.</code></pre>
</div></div>
<div class="literalblock">
<div class="content">
<pre><code>The second character is one of the following:</code></pre>
</div></div>
<div class="literalblock">
<div class="content">
<pre><code>'d' - Interrupts are disabled
'.' - Interrupts are enabled
'X' - Has flags that are not yet known by trace-cmd</code></pre>
</div></div>
<div class="literalblock">
<div class="content">
<pre><code>The third character is the "need rescheduling" flag.</code></pre>
</div></div>
<div class="literalblock">
<div class="content">
<pre><code>'N' - A schedule is set to take place
'.' - No scheduling is set</code></pre>
</div></div>
<div class="literalblock">
<div class="content">
<pre><code>The fourth character represents the context the event was in when it triggered</code></pre>
</div></div>
<div class="literalblock">
<div class="content">
<pre><code>'h' - Hard interrupt context
's' - Soft interrupt context
'H' - Hard interrupt context that interrupted a soft interrupt
'.' - Normal context</code></pre>
</div></div>
<div class="literalblock">
<div class="content">
<pre><code>The next is a number (should be less than 10), that represents the preemption
depth (the number of times preempt_disable() is called without preempt_enable()).
'.' means preemption is enabled.</code></pre>
</div></div>
<div class="literalblock">
<div class="content">
<pre><code>On some systems, "migrate disable" may exist, in which case a number will be
shown for that, or '.' meaning migration is enabled.</code></pre>
</div></div>
<div class="literalblock">
<div class="content">
<pre><code>If lockdep in enabled on the system, then the number represents the depth of
locks that are held when the event triggered. '.' means no locks are held.</code></pre>
</div></div>
<div class="dlist"><dl>
<dt class="hdlist1">
<strong>-w</strong>
</dt>
<dd>
<p>
    If both the <em>sched_switch</em> and <em>sched_wakeup</em> events are enabled, then
    this option will report the latency between the time the task was first
    woken, and the time it was scheduled in.
</p>
</dd>
<dt class="hdlist1">
<strong>-q</strong>
</dt>
<dd>
<p>
    Quiet non critical warnings.
</p>
</dd>
<dt class="hdlist1">
<strong>-O</strong>
</dt>
<dd>
<p>
    Pass options to the trace-cmd plugins that are loaded.
</p>
<div class="literalblock">
<div class="content">
<pre><code>-O plugin:var=value</code></pre>
</div></div>
<div class="literalblock">
<div class="content">
<pre><code>The 'plugin:' and '=value' are optional. Value may be left off for options
that are boolean. If the 'plugin:' is left off, then any variable that matches
in all plugins will be set.</code></pre>
</div></div>
<div class="literalblock">
<div class="content">
<pre><code>Example:  -O fgraph:tailprint</code></pre>
</div></div>
</dd>
<dt class="hdlist1">
<strong>--cpu</strong> &lt;cpu list&gt;
</dt>
<dd>
<p>
    List of CPUs, separated by "," or ":", used for filtering the events.
    A range of CPUs can be specified using "cpuX-cpuY" notation, where all CPUs
    in the range between cpuX and cpuY will be included in the list. The order
    of CPUs in the list must be from lower to greater.
</p>
<div class="literalblock">
<div class="content">
<pre><code>Example:  "--cpu 0,3" - show events from CPUs 0 and 3
          "--cpu 2-4" - show events from CPUs 2, 3 and 4</code></pre>
</div></div>
</dd>
<dt class="hdlist1">
<strong>--cpus</strong>
</dt>
<dd>
<p>
    List the CPUs that have data in the trace file then exit.
</p>
</dd>
<dt class="hdlist1">
<strong>--first-event</strong>
</dt>
<dd>
<p>
    Show the timestamp of the first event of all CPUs that have data.
</p>
</dd>
<dt class="hdlist1">
<strong>--last-event</strong>
</dt>
<dd>
<p>
    Show the timestamp of the last event of all CPUs that have data.
</p>
</dd>
<dt class="hdlist1">
<strong>--stat</strong>
</dt>
<dd>
<p>
    If the trace.dat file recorded the final stats (outputed at the end of record)
    the <strong>--stat</strong> option can be used to retrieve them.
</p>
</dd>
<dt class="hdlist1">
<strong>--uname</strong>
</dt>
<dd>
<p>
    If the trace.dat file recorded uname during the run, this will retrieve that
    information.
</p>
</dd>
<dt class="hdlist1">
<strong>--version</strong>
</dt>
<dd>
<p>
    If the trace.dat file recorded the version of the executable used to create
    it, report that version.
</p>
</dd>
<dt class="hdlist1">
<strong>--ts-offset</strong> offset
</dt>
<dd>
<p>
    Add (or subtract if negative) an offset for all timestamps of the previous
    data file specified with <strong>-i</strong>. This is useful to merge sort multiple trace.dat
    files where the difference in the timestamp is known. For example if a trace
    is done on a virtual guest, and another trace is done on the host. If the
    host timestamp is 1000 units ahead of the guest, the following can be done:
</p>
<div class="literalblock">
<div class="content">
<pre><code>trace-cmd report -i host.dat --ts-offset -1000 -i guest.dat</code></pre>
</div></div>
<div class="literalblock">
<div class="content">
<pre><code>This will subtract 1000 timestamp units from all the host events as it merges
with the guest.dat events. Note, the units is for the raw units recorded in
the trace. If the units are nanoseconds, the addition (or subtraction) from
the offset will be nanoseconds even if the displayed units are microseconds.</code></pre>
</div></div>
</dd>
<dt class="hdlist1">
<strong>--ts2secs</strong> HZ
</dt>
<dd>
<p>
    Convert the current clock source into a second (nanosecond resolution)
    output. When using clocks like x86-tsc, if the frequency is known,
    by passing in the clock frequency, this will convert the time to seconds.
</p>
<div class="literalblock">
<div class="content">
<pre><code>This option affects any trace.dat file given with *-i* proceeding it.
If this option comes before any *-i* option, then that value becomes
the default conversion for all other trace.dat files. If another
--ts2secs option appears after a *-i* trace.dat file, than that option
will override the default value.</code></pre>
</div></div>
<div class="literalblock">
<div class="content">
<pre><code>Example: On a 3.4 GHz machine</code></pre>
</div></div>
<div class="literalblock">
<div class="content">
<pre><code>trace-cmd record -p function -C x86-tsc</code></pre>
</div></div>
<div class="literalblock">
<div class="content">
<pre><code>trace-cmd report --ts2ns 3400000000</code></pre>
</div></div>
<div class="literalblock">
<div class="content">
<pre><code>The report will convert the cycles timestamps into a readable second
display. The default display resolution is microseconds, unless *-t*
is used.</code></pre>
</div></div>
<div class="literalblock">
<div class="content">
<pre><code>The value of --ts-offset must still be in the raw timestamp units, even
with this option. The offset will be converted as well.</code></pre>
</div></div>
</dd>
<dt class="hdlist1">
<strong>--ts-diff</strong>
</dt>
<dd>
<p>
     Show the time differences between events. The difference will appear in
     parenthesis just after the timestamp.
</p>
</dd>
<dt class="hdlist1">
<strong>--ts-check</strong>
</dt>
<dd>
<p>
     Make sure no timestamp goes backwards, and if it does, print out a warning
     message of the fact.
</p>
</dd>
<dt class="hdlist1">
<strong>--nodate</strong>
</dt>
<dd>
<p>
     Ignore converting the timestamps to the date set by <strong>trace-cmd record</strong>(3) --date option.
</p>
</dd>
<dt class="hdlist1">
<strong>--raw-ts</strong>
</dt>
<dd>
<p>
     Display raw timestamps, without any corrections.
</p>
</dd>
<dt class="hdlist1">
<strong>--align-ts</strong>
</dt>
<dd>
<p>
     Display timestamps aligned to the first event.
</p>
</dd>
<dt class="hdlist1">
<strong>--verbose</strong>[=<em>level</em>]
</dt>
<dd>
<p>
     Set the log level. Supported log levels are "none", "crit", "err", "warn",
     "info", "debug", "all" or their identifiers "0", "1", "2", "3", "4", "5", "6". Setting the log
     level to specific value enables all logs from that and all previous levels.
     The level will default to "info" if one is not specified.
</p>
<div class="literalblock">
<div class="content">
<pre><code>Example: enable all critical, error and warning logs</code></pre>
</div></div>
<div class="literalblock">
<div class="content">
<pre><code>trace-cmd report --verbose=warning</code></pre>
</div></div>
</dd>
</dl></div>
</div>
</div>
<div class="sect1">
<h2 id="_examples">EXAMPLES</h2>
<div class="sectionbody">
<div class="paragraph"><p>Using a trace.dat file that was created with:</p></div>
<div class="listingblock">
<div class="content"><!-- Generator: GNU source-highlight
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt>    <span style="font-style: italic"><span style="color: #9A1900"># trace-cmd record -p function -e all sleep 5</span></span></tt></pre></div></div>
<div class="paragraph"><p>The default report shows:</p></div>
<div class="listingblock">
<div class="content"><!-- Generator: GNU source-highlight
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt> <span style="font-style: italic"><span style="color: #9A1900"># trace-cmd report</span></span>
       trace-cmd-<span style="color: #993399">16129</span> <span style="color: #990000">[</span><span style="color: #993399">002</span><span style="color: #990000">]</span> <span style="color: #993399">158126.498411</span><span style="color: #990000">:</span> function<span style="color: #990000">:</span> __mutex_unlock_slowpath <span style="color: #990000">&lt;</span>-- mutex_unlock
       trace-cmd-<span style="color: #993399">16131</span> <span style="color: #990000">[</span><span style="color: #993399">000</span><span style="color: #990000">]</span> <span style="color: #993399">158126.498411</span><span style="color: #990000">:</span> kmem_cache_alloc<span style="color: #990000">:</span> <span style="color: #009900">call_site</span><span style="color: #990000">=</span>811223c5 <span style="color: #009900">ptr</span><span style="color: #990000">=</span><span style="color: #993399">0xffff88003ecf2b40</span> <span style="color: #009900">bytes_req</span><span style="color: #990000">=</span><span style="color: #993399">272</span> <span style="color: #009900">bytes_alloc</span><span style="color: #990000">=</span><span style="color: #993399">320</span> <span style="color: #009900">gfp_flags</span><span style="color: #990000">=</span>GFP_KERNEL<span style="color: #990000">|</span>GFP_ZERO
       trace-cmd-<span style="color: #993399">16130</span> <span style="color: #990000">[</span><span style="color: #993399">003</span><span style="color: #990000">]</span> <span style="color: #993399">158126.498411</span><span style="color: #990000">:</span> function<span style="color: #990000">:</span>             do_splice_to <span style="color: #990000">&lt;</span>-- sys_splice
           sleep-<span style="color: #993399">16133</span> <span style="color: #990000">[</span><span style="color: #993399">001</span><span style="color: #990000">]</span> <span style="color: #993399">158126.498412</span><span style="color: #990000">:</span> function<span style="color: #990000">:</span> inotify_inode_queue_event <span style="color: #990000">&lt;</span>-- vfs_write
       trace-cmd-<span style="color: #993399">16129</span> <span style="color: #990000">[</span><span style="color: #993399">002</span><span style="color: #990000">]</span> <span style="color: #993399">158126.498420</span><span style="color: #990000">:</span> lock_release<span style="color: #990000">:</span> <span style="color: #993399">0xffff88003f1fa4f8</span> <span style="color: #990000">&amp;</span>sb-<span style="color: #990000">&gt;</span>s_type-<span style="color: #990000">&gt;</span>i_mutex_key
       trace-cmd-<span style="color: #993399">16131</span> <span style="color: #990000">[</span><span style="color: #993399">000</span><span style="color: #990000">]</span> <span style="color: #993399">158126.498421</span><span style="color: #990000">:</span> function<span style="color: #990000">:</span> security_file_alloc <span style="color: #990000">&lt;</span>-- get_empty_filp
           sleep-<span style="color: #993399">16133</span> <span style="color: #990000">[</span><span style="color: #993399">001</span><span style="color: #990000">]</span> <span style="color: #993399">158126.498422</span><span style="color: #990000">:</span> function<span style="color: #990000">:</span> __fsnotify_parent <span style="color: #990000">&lt;</span>-- vfs_write
       trace-cmd-<span style="color: #993399">16130</span> <span style="color: #990000">[</span><span style="color: #993399">003</span><span style="color: #990000">]</span> <span style="color: #993399">158126.498422</span><span style="color: #990000">:</span> function<span style="color: #990000">:</span> rw_verify_area <span style="color: #990000">&lt;</span>-- do_splice_to
       trace-cmd-<span style="color: #993399">16131</span> <span style="color: #990000">[</span><span style="color: #993399">000</span><span style="color: #990000">]</span> <span style="color: #993399">158126.498424</span><span style="color: #990000">:</span> function<span style="color: #990000">:</span> cap_file_alloc_security <span style="color: #990000">&lt;</span>-- security_file_alloc
       trace-cmd-<span style="color: #993399">16129</span> <span style="color: #990000">[</span><span style="color: #993399">002</span><span style="color: #990000">]</span> <span style="color: #993399">158126.498425</span><span style="color: #990000">:</span> function<span style="color: #990000">:</span> syscall_trace_leave <span style="color: #990000">&lt;</span>-- int_check_syscall_exit_work
           sleep-<span style="color: #993399">16133</span> <span style="color: #990000">[</span><span style="color: #993399">001</span><span style="color: #990000">]</span> <span style="color: #993399">158126.498426</span><span style="color: #990000">:</span> function<span style="color: #990000">:</span> inotify_dentry_parent_queue_event <span style="color: #990000">&lt;</span>-- vfs_write
       trace-cmd-<span style="color: #993399">16130</span> <span style="color: #990000">[</span><span style="color: #993399">003</span><span style="color: #990000">]</span> <span style="color: #993399">158126.498426</span><span style="color: #990000">:</span> function<span style="color: #990000">:</span> security_file_permission <span style="color: #990000">&lt;</span>-- rw_verify_area
       trace-cmd-<span style="color: #993399">16129</span> <span style="color: #990000">[</span><span style="color: #993399">002</span><span style="color: #990000">]</span> <span style="color: #993399">158126.498428</span><span style="color: #990000">:</span> function<span style="color: #990000">:</span> audit_syscall_exit <span style="color: #990000">&lt;</span>-- syscall_trace_leave
<span style="color: #990000">[...]</span></tt></pre></div></div>
<div class="paragraph"><p>To see everything but the function traces:</p></div>
<div class="listingblock">
<div class="content"><!-- Generator: GNU source-highlight
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt> <span style="font-style: italic"><span style="color: #9A1900"># trace-cmd report -v -F 'function'</span></span>
       trace-cmd-<span style="color: #993399">16131</span> <span style="color: #990000">[</span><span style="color: #993399">000</span><span style="color: #990000">]</span> <span style="color: #993399">158126.498411</span><span style="color: #990000">:</span> kmem_cache_alloc<span style="color: #990000">:</span> <span style="color: #009900">call_site</span><span style="color: #990000">=</span>811223c5 <span style="color: #009900">ptr</span><span style="color: #990000">=</span><span style="color: #993399">0xffff88003ecf2b40</span> <span style="color: #009900">bytes_req</span><span style="color: #990000">=</span><span style="color: #993399">272</span> <span style="color: #009900">bytes_alloc</span><span style="color: #990000">=</span><span style="color: #993399">320</span> <span style="color: #009900">gfp_flags</span><span style="color: #990000">=</span>GFP_KERNEL<span style="color: #990000">|</span>GFP_ZERO
       trace-cmd-<span style="color: #993399">16129</span> <span style="color: #990000">[</span><span style="color: #993399">002</span><span style="color: #990000">]</span> <span style="color: #993399">158126.498420</span><span style="color: #990000">:</span> lock_release<span style="color: #990000">:</span> <span style="color: #993399">0xffff88003f1fa4f8</span> <span style="color: #990000">&amp;</span>sb-<span style="color: #990000">&gt;</span>s_type-<span style="color: #990000">&gt;</span>i_mutex_key
       trace-cmd-<span style="color: #993399">16130</span> <span style="color: #990000">[</span><span style="color: #993399">003</span><span style="color: #990000">]</span> <span style="color: #993399">158126.498436</span><span style="color: #990000">:</span> lock_acquire<span style="color: #990000">:</span> <span style="color: #993399">0xffffffff8166bf78</span> <span style="font-weight: bold"><span style="color: #0000FF">read</span></span> all_cpu_access_lock
       trace-cmd-<span style="color: #993399">16131</span> <span style="color: #990000">[</span><span style="color: #993399">000</span><span style="color: #990000">]</span> <span style="color: #993399">158126.498438</span><span style="color: #990000">:</span> lock_acquire<span style="color: #990000">:</span> <span style="color: #993399">0xffff88003df5b520</span> <span style="font-weight: bold"><span style="color: #0000FF">read</span></span> <span style="color: #990000">&amp;</span>fs-<span style="color: #990000">&gt;</span>lock
       trace-cmd-<span style="color: #993399">16129</span> <span style="color: #990000">[</span><span style="color: #993399">002</span><span style="color: #990000">]</span> <span style="color: #993399">158126.498446</span><span style="color: #990000">:</span> kfree<span style="color: #990000">:</span> <span style="color: #009900">call_site</span><span style="color: #990000">=</span>810a7abb <span style="color: #009900">ptr</span><span style="color: #990000">=</span><span style="color: #993399">0x0</span>
       trace-cmd-<span style="color: #993399">16130</span> <span style="color: #990000">[</span><span style="color: #993399">003</span><span style="color: #990000">]</span> <span style="color: #993399">158126.498448</span><span style="color: #990000">:</span> lock_acquire<span style="color: #990000">:</span> <span style="color: #993399">0xffff880002250a80</span> <span style="color: #990000">&amp;</span>per_cpu<span style="color: #990000">(</span>cpu_access_lock<span style="color: #990000">,</span> cpu<span style="color: #990000">)</span>
       trace-cmd-<span style="color: #993399">16129</span> <span style="color: #990000">[</span><span style="color: #993399">002</span><span style="color: #990000">]</span> <span style="color: #993399">158126.498450</span><span style="color: #990000">:</span> sys_exit_splice<span style="color: #990000">:</span>      <span style="color: #993399">0xfffffff5</span>
       trace-cmd-<span style="color: #993399">16131</span> <span style="color: #990000">[</span><span style="color: #993399">000</span><span style="color: #990000">]</span> <span style="color: #993399">158126.498454</span><span style="color: #990000">:</span> lock_release<span style="color: #990000">:</span> <span style="color: #993399">0xffff88003df5b520</span> <span style="color: #990000">&amp;</span>fs-<span style="color: #990000">&gt;</span>lock
           sleep-<span style="color: #993399">16133</span> <span style="color: #990000">[</span><span style="color: #993399">001</span><span style="color: #990000">]</span> <span style="color: #993399">158126.498456</span><span style="color: #990000">:</span> kfree<span style="color: #990000">:</span> <span style="color: #009900">call_site</span><span style="color: #990000">=</span>810a7abb <span style="color: #009900">ptr</span><span style="color: #990000">=</span><span style="color: #993399">0x0</span>
           sleep-<span style="color: #993399">16133</span> <span style="color: #990000">[</span><span style="color: #993399">001</span><span style="color: #990000">]</span> <span style="color: #993399">158126.498460</span><span style="color: #990000">:</span> sys_exit_write<span style="color: #990000">:</span>       <span style="color: #993399">0x1</span>
       trace-cmd-<span style="color: #993399">16130</span> <span style="color: #990000">[</span><span style="color: #993399">003</span><span style="color: #990000">]</span> <span style="color: #993399">158126.498462</span><span style="color: #990000">:</span> kmalloc<span style="color: #990000">:</span> <span style="color: #009900">call_site</span><span style="color: #990000">=</span>810bf95b <span style="color: #009900">ptr</span><span style="color: #990000">=</span><span style="color: #993399">0xffff88003dedc040</span> <span style="color: #009900">bytes_req</span><span style="color: #990000">=</span><span style="color: #993399">24</span> <span style="color: #009900">bytes_alloc</span><span style="color: #990000">=</span><span style="color: #993399">32</span> <span style="color: #009900">gfp_flags</span><span style="color: #990000">=</span>GFP_KERNEL<span style="color: #990000">|</span>GFP_ZERO

</tt></pre></div></div>
<div class="paragraph"><p>To see only the kmalloc calls that were greater than 1000 bytes:</p></div>
<div class="listingblock">
<div class="content"><!-- Generator: GNU source-highlight
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt> <span style="font-style: italic"><span style="color: #9A1900">#trace-cmd report -F 'kmalloc: bytes_req &gt; 1000'</span></span>
          <span style="color: #990000">&lt;</span>idle<span style="color: #990000">&gt;</span>-<span style="color: #993399">0</span>     <span style="color: #990000">[</span><span style="color: #993399">000</span><span style="color: #990000">]</span> <span style="color: #993399">158128.126641</span><span style="color: #990000">:</span> kmalloc<span style="color: #990000">:</span> <span style="color: #009900">call_site</span><span style="color: #990000">=</span><span style="color: #993399">81330635</span> <span style="color: #009900">ptr</span><span style="color: #990000">=</span><span style="color: #993399">0xffff88003c2fd000</span> <span style="color: #009900">bytes_req</span><span style="color: #990000">=</span><span style="color: #993399">2096</span> <span style="color: #009900">bytes_alloc</span><span style="color: #990000">=</span><span style="color: #993399">4096</span> <span style="color: #009900">gfp_flags</span><span style="color: #990000">=</span>GFP_ATOMIC

</tt></pre></div></div>
<div class="paragraph"><p>To see wakeups and sched switches that left the previous task in the running
state:</p></div>
<div class="listingblock">
<div class="content"><!-- Generator: GNU source-highlight
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt> <span style="font-style: italic"><span style="color: #9A1900"># trace-cmd report -F 'sched: prev_state == 0 || (success == 1)'</span></span>
       trace-cmd-<span style="color: #993399">16132</span> <span style="color: #990000">[</span><span style="color: #993399">002</span><span style="color: #990000">]</span> <span style="color: #993399">158126.499951</span><span style="color: #990000">:</span> sched_wakeup<span style="color: #990000">:</span> <span style="color: #009900">comm</span><span style="color: #990000">=</span>trace-cmd <span style="color: #009900">pid</span><span style="color: #990000">=</span><span style="color: #993399">16129</span> <span style="color: #009900">prio</span><span style="color: #990000">=</span><span style="color: #993399">120</span> <span style="color: #009900">success</span><span style="color: #990000">=</span><span style="color: #993399">1</span> <span style="color: #009900">target_cpu</span><span style="color: #990000">=</span><span style="color: #993399">002</span>
       trace-cmd-<span style="color: #993399">16132</span> <span style="color: #990000">[</span><span style="color: #993399">002</span><span style="color: #990000">]</span> <span style="color: #993399">158126.500401</span><span style="color: #990000">:</span> sched_switch<span style="color: #990000">:</span> <span style="color: #009900">prev_comm</span><span style="color: #990000">=</span>trace-cmd <span style="color: #009900">prev_pid</span><span style="color: #990000">=</span><span style="color: #993399">16132</span> <span style="color: #009900">prev_prio</span><span style="color: #990000">=</span><span style="color: #993399">120</span> <span style="color: #009900">prev_state</span><span style="color: #990000">=</span>R <span style="color: #990000">==&gt;</span> <span style="color: #009900">next_comm</span><span style="color: #990000">=</span>trace-cmd <span style="color: #009900">next_pid</span><span style="color: #990000">=</span><span style="color: #993399">16129</span> <span style="color: #009900">next_prio</span><span style="color: #990000">=</span><span style="color: #993399">120</span>
          <span style="color: #990000">&lt;</span>idle<span style="color: #990000">&gt;</span>-<span style="color: #993399">0</span>     <span style="color: #990000">[</span><span style="color: #993399">003</span><span style="color: #990000">]</span> <span style="color: #993399">158126.500585</span><span style="color: #990000">:</span> sched_wakeup<span style="color: #990000">:</span> <span style="color: #009900">comm</span><span style="color: #990000">=</span>trace-cmd <span style="color: #009900">pid</span><span style="color: #990000">=</span><span style="color: #993399">16130</span> <span style="color: #009900">prio</span><span style="color: #990000">=</span><span style="color: #993399">120</span> <span style="color: #009900">success</span><span style="color: #990000">=</span><span style="color: #993399">1</span> <span style="color: #009900">target_cpu</span><span style="color: #990000">=</span><span style="color: #993399">003</span>
          <span style="color: #990000">&lt;</span>idle<span style="color: #990000">&gt;</span>-<span style="color: #993399">0</span>     <span style="color: #990000">[</span><span style="color: #993399">003</span><span style="color: #990000">]</span> <span style="color: #993399">158126.501241</span><span style="color: #990000">:</span> sched_switch<span style="color: #990000">:</span> <span style="color: #009900">prev_comm</span><span style="color: #990000">=</span>swapper <span style="color: #009900">prev_pid</span><span style="color: #990000">=</span><span style="color: #993399">0</span> <span style="color: #009900">prev_prio</span><span style="color: #990000">=</span><span style="color: #993399">120</span> <span style="color: #009900">prev_state</span><span style="color: #990000">=</span>R <span style="color: #990000">==&gt;</span> <span style="color: #009900">next_comm</span><span style="color: #990000">=</span>trace-cmd <span style="color: #009900">next_pid</span><span style="color: #990000">=</span><span style="color: #993399">16130</span> <span style="color: #009900">next_prio</span><span style="color: #990000">=</span><span style="color: #993399">120</span>
       trace-cmd-<span style="color: #993399">16132</span> <span style="color: #990000">[</span><span style="color: #993399">000</span><span style="color: #990000">]</span> <span style="color: #993399">158126.502475</span><span style="color: #990000">:</span> sched_wakeup<span style="color: #990000">:</span> <span style="color: #009900">comm</span><span style="color: #990000">=</span>trace-cmd <span style="color: #009900">pid</span><span style="color: #990000">=</span><span style="color: #993399">16131</span> <span style="color: #009900">prio</span><span style="color: #990000">=</span><span style="color: #993399">120</span> <span style="color: #009900">success</span><span style="color: #990000">=</span><span style="color: #993399">1</span> <span style="color: #009900">target_cpu</span><span style="color: #990000">=</span><span style="color: #993399">000</span>
       trace-cmd-<span style="color: #993399">16131</span> <span style="color: #990000">[</span><span style="color: #993399">002</span><span style="color: #990000">]</span> <span style="color: #993399">158126.506516</span><span style="color: #990000">:</span> sched_wakeup<span style="color: #990000">:</span> <span style="color: #009900">comm</span><span style="color: #990000">=</span>trace-cmd <span style="color: #009900">pid</span><span style="color: #990000">=</span><span style="color: #993399">16129</span> <span style="color: #009900">prio</span><span style="color: #990000">=</span><span style="color: #993399">120</span> <span style="color: #009900">success</span><span style="color: #990000">=</span><span style="color: #993399">1</span> <span style="color: #009900">target_cpu</span><span style="color: #990000">=</span><span style="color: #993399">002</span>
          <span style="color: #990000">&lt;</span>idle<span style="color: #990000">&gt;</span>-<span style="color: #993399">0</span>     <span style="color: #990000">[</span><span style="color: #993399">003</span><span style="color: #990000">]</span> <span style="color: #993399">158126.550110</span><span style="color: #990000">:</span> sched_switch<span style="color: #990000">:</span> <span style="color: #009900">prev_comm</span><span style="color: #990000">=</span>swapper <span style="color: #009900">prev_pid</span><span style="color: #990000">=</span><span style="color: #993399">0</span> <span style="color: #009900">prev_prio</span><span style="color: #990000">=</span><span style="color: #993399">120</span> <span style="color: #009900">prev_state</span><span style="color: #990000">=</span>R <span style="color: #990000">==&gt;</span> <span style="color: #009900">next_comm</span><span style="color: #990000">=</span>trace-cmd <span style="color: #009900">next_pid</span><span style="color: #990000">=</span><span style="color: #993399">16130</span> <span style="color: #009900">next_prio</span><span style="color: #990000">=</span><span style="color: #993399">120</span>
       trace-cmd-<span style="color: #993399">16131</span> <span style="color: #990000">[</span><span style="color: #993399">003</span><span style="color: #990000">]</span> <span style="color: #993399">158126.570243</span><span style="color: #990000">:</span> sched_wakeup<span style="color: #990000">:</span> <span style="color: #009900">comm</span><span style="color: #990000">=</span>trace-cmd <span style="color: #009900">pid</span><span style="color: #990000">=</span><span style="color: #993399">16129</span> <span style="color: #009900">prio</span><span style="color: #990000">=</span><span style="color: #993399">120</span> <span style="color: #009900">success</span><span style="color: #990000">=</span><span style="color: #993399">1</span> <span style="color: #009900">target_cpu</span><span style="color: #990000">=</span><span style="color: #993399">003</span>
       trace-cmd-<span style="color: #993399">16130</span> <span style="color: #990000">[</span><span style="color: #993399">002</span><span style="color: #990000">]</span> <span style="color: #993399">158126.618202</span><span style="color: #990000">:</span> sched_switch<span style="color: #990000">:</span> <span style="color: #009900">prev_comm</span><span style="color: #990000">=</span>trace-cmd <span style="color: #009900">prev_pid</span><span style="color: #990000">=</span><span style="color: #993399">16130</span> <span style="color: #009900">prev_prio</span><span style="color: #990000">=</span><span style="color: #993399">120</span> <span style="color: #009900">prev_state</span><span style="color: #990000">=</span>R <span style="color: #990000">==&gt;</span> <span style="color: #009900">next_comm</span><span style="color: #990000">=</span>yum-updatesd <span style="color: #009900">next_pid</span><span style="color: #990000">=</span><span style="color: #993399">3088</span> <span style="color: #009900">next_prio</span><span style="color: #990000">=</span><span style="color: #993399">1</span> <span style="color: #993399">20</span>
       trace-cmd-<span style="color: #993399">16129</span> <span style="color: #990000">[</span><span style="color: #993399">003</span><span style="color: #990000">]</span> <span style="color: #993399">158126.622379</span><span style="color: #990000">:</span> sched_wakeup<span style="color: #990000">:</span> <span style="color: #009900">comm</span><span style="color: #990000">=</span>trace-cmd <span style="color: #009900">pid</span><span style="color: #990000">=</span><span style="color: #993399">16131</span> <span style="color: #009900">prio</span><span style="color: #990000">=</span><span style="color: #993399">120</span> <span style="color: #009900">success</span><span style="color: #990000">=</span><span style="color: #993399">1</span> <span style="color: #009900">target_cpu</span><span style="color: #990000">=</span><span style="color: #993399">003</span>
       trace-cmd-<span style="color: #993399">16129</span> <span style="color: #990000">[</span><span style="color: #993399">000</span><span style="color: #990000">]</span> <span style="color: #993399">158126.649287</span><span style="color: #990000">:</span> sched_wakeup<span style="color: #990000">:</span> <span style="color: #009900">comm</span><span style="color: #990000">=</span>trace-cmd <span style="color: #009900">pid</span><span style="color: #990000">=</span><span style="color: #993399">16131</span> <span style="color: #009900">prio</span><span style="color: #990000">=</span><span style="color: #993399">120</span> <span style="color: #009900">success</span><span style="color: #990000">=</span><span style="color: #993399">1</span> <span style="color: #009900">target_cpu</span><span style="color: #990000">=</span><span style="color: #993399">000</span></tt></pre></div></div>
<div class="paragraph"><p>The above needs a little explanation. The filter specifies the "sched"
subsystem, which includes both sched_switch and sched_wakeup events. Any event
that does not have the format field "prev_state" or "success", will evaluate
those expressions as FALSE, and will not produce a match. Using "||" will have
the "prev_state" test happen for the "sched_switch" event and the "success"
test happen for the "sched_wakeup" event.</p></div>
<div class="listingblock">
<div class="content"><!-- Generator: GNU source-highlight
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt>  <span style="font-style: italic"><span style="color: #9A1900"># trace-cmd report -w -F 'sched_switch, sched_wakeup.*'</span></span>
<span style="color: #990000">[...]</span>
       trace-cmd-<span style="color: #993399">16130</span> <span style="color: #990000">[</span><span style="color: #993399">003</span><span style="color: #990000">]</span> <span style="color: #993399">158131.580616</span><span style="color: #990000">:</span> sched_wakeup<span style="color: #990000">:</span> <span style="color: #009900">comm</span><span style="color: #990000">=</span>trace-cmd <span style="color: #009900">pid</span><span style="color: #990000">=</span><span style="color: #993399">16131</span> <span style="color: #009900">prio</span><span style="color: #990000">=</span><span style="color: #993399">120</span> <span style="color: #009900">success</span><span style="color: #990000">=</span><span style="color: #993399">1</span> <span style="color: #009900">target_cpu</span><span style="color: #990000">=</span><span style="color: #993399">003</span>
       trace-cmd-<span style="color: #993399">16129</span> <span style="color: #990000">[</span><span style="color: #993399">000</span><span style="color: #990000">]</span> <span style="color: #993399">158131.581502</span><span style="color: #990000">:</span> sched_switch<span style="color: #990000">:</span> <span style="color: #009900">prev_comm</span><span style="color: #990000">=</span>trace-cmd <span style="color: #009900">prev_pid</span><span style="color: #990000">=</span><span style="color: #993399">16129</span> <span style="color: #009900">prev_prio</span><span style="color: #990000">=</span><span style="color: #993399">120</span> <span style="color: #009900">prev_state</span><span style="color: #990000">=</span>S <span style="color: #990000">==&gt;</span> <span style="color: #009900">next_comm</span><span style="color: #990000">=</span>trace-cmd <span style="color: #009900">next_pid</span><span style="color: #990000">=</span><span style="color: #993399">16131</span> <span style="color: #009900">next_prio</span><span style="color: #990000">=</span><span style="color: #993399">120</span> Latency<span style="color: #990000">:</span> <span style="color: #993399">885.901</span> usecs
       trace-cmd-<span style="color: #993399">16131</span> <span style="color: #990000">[</span><span style="color: #993399">000</span><span style="color: #990000">]</span> <span style="color: #993399">158131.582414</span><span style="color: #990000">:</span> sched_wakeup<span style="color: #990000">:</span> <span style="color: #009900">comm</span><span style="color: #990000">=</span>trace-cmd <span style="color: #009900">pid</span><span style="color: #990000">=</span><span style="color: #993399">16129</span> <span style="color: #009900">prio</span><span style="color: #990000">=</span><span style="color: #993399">120</span> <span style="color: #009900">success</span><span style="color: #990000">=</span><span style="color: #993399">1</span> <span style="color: #009900">target_cpu</span><span style="color: #990000">=</span><span style="color: #993399">000</span>
       trace-cmd-<span style="color: #993399">16132</span> <span style="color: #990000">[</span><span style="color: #993399">001</span><span style="color: #990000">]</span> <span style="color: #993399">158131.583219</span><span style="color: #990000">:</span> sched_switch<span style="color: #990000">:</span> <span style="color: #009900">prev_comm</span><span style="color: #990000">=</span>trace-cmd <span style="color: #009900">prev_pid</span><span style="color: #990000">=</span><span style="color: #993399">16132</span> <span style="color: #009900">prev_prio</span><span style="color: #990000">=</span><span style="color: #993399">120</span> <span style="color: #009900">prev_state</span><span style="color: #990000">=</span>S <span style="color: #990000">==&gt;</span> <span style="color: #009900">next_comm</span><span style="color: #990000">=</span>trace-cmd <span style="color: #009900">next_pid</span><span style="color: #990000">=</span><span style="color: #993399">16129</span> <span style="color: #009900">next_prio</span><span style="color: #990000">=</span><span style="color: #993399">120</span> Latency<span style="color: #990000">:</span> <span style="color: #993399">804.809</span> usecs
           sleep-<span style="color: #993399">16133</span> <span style="color: #990000">[</span><span style="color: #993399">002</span><span style="color: #990000">]</span> <span style="color: #993399">158131.584121</span><span style="color: #990000">:</span> sched_wakeup<span style="color: #990000">:</span> <span style="color: #009900">comm</span><span style="color: #990000">=</span>trace-cmd <span style="color: #009900">pid</span><span style="color: #990000">=</span><span style="color: #993399">16120</span> <span style="color: #009900">prio</span><span style="color: #990000">=</span><span style="color: #993399">120</span> <span style="color: #009900">success</span><span style="color: #990000">=</span><span style="color: #993399">1</span> <span style="color: #009900">target_cpu</span><span style="color: #990000">=</span><span style="color: #993399">002</span>
       trace-cmd-<span style="color: #993399">16129</span> <span style="color: #990000">[</span><span style="color: #993399">001</span><span style="color: #990000">]</span> <span style="color: #993399">158131.584128</span><span style="color: #990000">:</span> sched_wakeup<span style="color: #990000">:</span> <span style="color: #009900">comm</span><span style="color: #990000">=</span>trace-cmd <span style="color: #009900">pid</span><span style="color: #990000">=</span><span style="color: #993399">16132</span> <span style="color: #009900">prio</span><span style="color: #990000">=</span><span style="color: #993399">120</span> <span style="color: #009900">success</span><span style="color: #990000">=</span><span style="color: #993399">1</span> <span style="color: #009900">target_cpu</span><span style="color: #990000">=</span><span style="color: #993399">001</span>
           sleep-<span style="color: #993399">16133</span> <span style="color: #990000">[</span><span style="color: #993399">002</span><span style="color: #990000">]</span> <span style="color: #993399">158131.584275</span><span style="color: #990000">:</span> sched_switch<span style="color: #990000">:</span> <span style="color: #009900">prev_comm</span><span style="color: #990000">=</span>sleep <span style="color: #009900">prev_pid</span><span style="color: #990000">=</span><span style="color: #993399">16133</span> <span style="color: #009900">prev_prio</span><span style="color: #990000">=</span><span style="color: #993399">120</span> <span style="color: #009900">prev_state</span><span style="color: #990000">=</span>R <span style="color: #990000">==&gt;</span> <span style="color: #009900">next_comm</span><span style="color: #990000">=</span>trace-cmd <span style="color: #009900">next_pid</span><span style="color: #990000">=</span><span style="color: #993399">16120</span> <span style="color: #009900">next_prio</span><span style="color: #990000">=</span><span style="color: #993399">120</span> Latency<span style="color: #990000">:</span> <span style="color: #993399">153.915</span> usecs
       trace-cmd-<span style="color: #993399">16130</span> <span style="color: #990000">[</span><span style="color: #993399">003</span><span style="color: #990000">]</span> <span style="color: #993399">158131.585284</span><span style="color: #990000">:</span> sched_switch<span style="color: #990000">:</span> <span style="color: #009900">prev_comm</span><span style="color: #990000">=</span>trace-cmd <span style="color: #009900">prev_pid</span><span style="color: #990000">=</span><span style="color: #993399">16130</span> <span style="color: #009900">prev_prio</span><span style="color: #990000">=</span><span style="color: #993399">120</span> <span style="color: #009900">prev_state</span><span style="color: #990000">=</span>S <span style="color: #990000">==&gt;</span> <span style="color: #009900">next_comm</span><span style="color: #990000">=</span>trace-cmd <span style="color: #009900">next_pid</span><span style="color: #990000">=</span><span style="color: #993399">16132</span> <span style="color: #009900">next_prio</span><span style="color: #990000">=</span><span style="color: #993399">120</span> Latency<span style="color: #990000">:</span> <span style="color: #993399">1155.677</span> usecs

Average wakeup latency<span style="color: #990000">:</span> <span style="color: #993399">26626.656</span> usecs</tt></pre></div></div>
<div class="paragraph"><p>The above trace produces the wakeup latencies of the tasks. The "sched_switch"
event reports each individual latency after writing the event information.
At the end of the report, the average wakeup latency is reported.</p></div>
<div class="listingblock">
<div class="content"><!-- Generator: GNU source-highlight
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt>  <span style="font-style: italic"><span style="color: #9A1900"># trace-cmd report -w -F 'sched_switch, sched_wakeup.*: prio &lt; 100 || next_prio &lt; 100'</span></span>
          <span style="color: #990000">&lt;</span>idle<span style="color: #990000">&gt;</span>-<span style="color: #993399">0</span>     <span style="color: #990000">[</span><span style="color: #993399">003</span><span style="color: #990000">]</span> <span style="color: #993399">158131.516753</span><span style="color: #990000">:</span> sched_wakeup<span style="color: #990000">:</span> <span style="color: #009900">comm</span><span style="color: #990000">=</span>ksoftirqd<span style="color: #990000">/</span><span style="color: #993399">3</span> <span style="color: #009900">pid</span><span style="color: #990000">=</span><span style="color: #993399">13</span> <span style="color: #009900">prio</span><span style="color: #990000">=</span><span style="color: #993399">49</span> <span style="color: #009900">success</span><span style="color: #990000">=</span><span style="color: #993399">1</span> <span style="color: #009900">target_cpu</span><span style="color: #990000">=</span><span style="color: #993399">003</span>
          <span style="color: #990000">&lt;</span>idle<span style="color: #990000">&gt;</span>-<span style="color: #993399">0</span>     <span style="color: #990000">[</span><span style="color: #993399">003</span><span style="color: #990000">]</span> <span style="color: #993399">158131.516855</span><span style="color: #990000">:</span> sched_switch<span style="color: #990000">:</span> <span style="color: #009900">prev_comm</span><span style="color: #990000">=</span>swapper <span style="color: #009900">prev_pid</span><span style="color: #990000">=</span><span style="color: #993399">0</span> <span style="color: #009900">prev_prio</span><span style="color: #990000">=</span><span style="color: #993399">120</span> <span style="color: #009900">prev_state</span><span style="color: #990000">=</span>R <span style="color: #990000">==&gt;</span> <span style="color: #009900">next_comm</span><span style="color: #990000">=</span>ksoftirqd<span style="color: #990000">/</span><span style="color: #993399">3</span> <span style="color: #009900">next_pid</span><span style="color: #990000">=</span><span style="color: #993399">13</span> <span style="color: #009900">next_prio</span><span style="color: #990000">=</span><span style="color: #993399">49</span> Latency<span style="color: #990000">:</span> <span style="color: #993399">101.244</span> usecs
          <span style="color: #990000">&lt;</span>idle<span style="color: #990000">&gt;</span>-<span style="color: #993399">0</span>     <span style="color: #990000">[</span><span style="color: #993399">003</span><span style="color: #990000">]</span> <span style="color: #993399">158131.533781</span><span style="color: #990000">:</span> sched_wakeup<span style="color: #990000">:</span> <span style="color: #009900">comm</span><span style="color: #990000">=</span>ksoftirqd<span style="color: #990000">/</span><span style="color: #993399">3</span> <span style="color: #009900">pid</span><span style="color: #990000">=</span><span style="color: #993399">13</span> <span style="color: #009900">prio</span><span style="color: #990000">=</span><span style="color: #993399">49</span> <span style="color: #009900">success</span><span style="color: #990000">=</span><span style="color: #993399">1</span> <span style="color: #009900">target_cpu</span><span style="color: #990000">=</span><span style="color: #993399">003</span>
          <span style="color: #990000">&lt;</span>idle<span style="color: #990000">&gt;</span>-<span style="color: #993399">0</span>     <span style="color: #990000">[</span><span style="color: #993399">003</span><span style="color: #990000">]</span> <span style="color: #993399">158131.533897</span><span style="color: #990000">:</span> sched_switch<span style="color: #990000">:</span> <span style="color: #009900">prev_comm</span><span style="color: #990000">=</span>swapper <span style="color: #009900">prev_pid</span><span style="color: #990000">=</span><span style="color: #993399">0</span> <span style="color: #009900">prev_prio</span><span style="color: #990000">=</span><span style="color: #993399">120</span> <span style="color: #009900">prev_state</span><span style="color: #990000">=</span>R <span style="color: #990000">==&gt;</span> <span style="color: #009900">next_comm</span><span style="color: #990000">=</span>ksoftirqd<span style="color: #990000">/</span><span style="color: #993399">3</span> <span style="color: #009900">next_pid</span><span style="color: #990000">=</span><span style="color: #993399">13</span> <span style="color: #009900">next_prio</span><span style="color: #990000">=</span><span style="color: #993399">49</span> Latency<span style="color: #990000">:</span> <span style="color: #993399">115.608</span> usecs
          <span style="color: #990000">&lt;</span>idle<span style="color: #990000">&gt;</span>-<span style="color: #993399">0</span>     <span style="color: #990000">[</span><span style="color: #993399">003</span><span style="color: #990000">]</span> <span style="color: #993399">158131.569730</span><span style="color: #990000">:</span> sched_wakeup<span style="color: #990000">:</span> <span style="color: #009900">comm</span><span style="color: #990000">=</span>ksoftirqd<span style="color: #990000">/</span><span style="color: #993399">3</span> <span style="color: #009900">pid</span><span style="color: #990000">=</span><span style="color: #993399">13</span> <span style="color: #009900">prio</span><span style="color: #990000">=</span><span style="color: #993399">49</span> <span style="color: #009900">success</span><span style="color: #990000">=</span><span style="color: #993399">1</span> <span style="color: #009900">target_cpu</span><span style="color: #990000">=</span><span style="color: #993399">003</span>
          <span style="color: #990000">&lt;</span>idle<span style="color: #990000">&gt;</span>-<span style="color: #993399">0</span>     <span style="color: #990000">[</span><span style="color: #993399">003</span><span style="color: #990000">]</span> <span style="color: #993399">158131.569851</span><span style="color: #990000">:</span> sched_switch<span style="color: #990000">:</span> <span style="color: #009900">prev_comm</span><span style="color: #990000">=</span>swapper <span style="color: #009900">prev_pid</span><span style="color: #990000">=</span><span style="color: #993399">0</span> <span style="color: #009900">prev_prio</span><span style="color: #990000">=</span><span style="color: #993399">120</span> <span style="color: #009900">prev_state</span><span style="color: #990000">=</span>R <span style="color: #990000">==&gt;</span> <span style="color: #009900">next_comm</span><span style="color: #990000">=</span>ksoftirqd<span style="color: #990000">/</span><span style="color: #993399">3</span> <span style="color: #009900">next_pid</span><span style="color: #990000">=</span><span style="color: #993399">13</span> <span style="color: #009900">next_prio</span><span style="color: #990000">=</span><span style="color: #993399">49</span> Latency<span style="color: #990000">:</span> <span style="color: #993399">121.024</span> usecs

Average wakeup latency<span style="color: #990000">:</span> <span style="color: #993399">110.021</span> usecs</tt></pre></div></div>
<div class="paragraph"><p>The above version will only show the wakeups and context switches of Real Time
tasks. The <em>prio</em> used inside the kernel starts at 0 for highest priority.
That is <em>prio</em> 0 is equivalent to user space real time priority 99, and
priority 98 is equivalent to user space real time priority 1.
Prios less than 100 represent Real Time tasks.</p></div>
<div class="paragraph"><p>An example of the profile:</p></div>
<div class="listingblock">
<div class="content"><!-- Generator: GNU source-highlight
by Lorenzo Bettini
http://www.lorenzobettini.it
http://www.gnu.org/software/src-highlite -->
<pre><tt> <span style="font-style: italic"><span style="color: #9A1900"># trace-cmd record --profile sleep 1</span></span>
 <span style="font-style: italic"><span style="color: #9A1900"># trace-cmd report --profile --comm sleep</span></span>
task<span style="color: #990000">:</span> sleep-<span style="color: #993399">21611</span>
  Event<span style="color: #990000">:</span> sched_switch<span style="color: #990000">:</span>R <span style="color: #990000">(</span><span style="color: #993399">1</span><span style="color: #990000">)</span> Total<span style="color: #990000">:</span> <span style="color: #993399">99442</span> Avg<span style="color: #990000">:</span> <span style="color: #993399">99442</span> Max<span style="color: #990000">:</span> <span style="color: #993399">99442</span> Min<span style="color: #990000">:</span><span style="color: #993399">99442</span>
     <span style="color: #990000">&lt;</span>stack<span style="color: #990000">&gt;</span> <span style="color: #993399">1</span> total<span style="color: #990000">:</span><span style="color: #993399">99442</span> min<span style="color: #990000">:</span><span style="color: #993399">99442</span> max<span style="color: #990000">:</span><span style="color: #993399">99442</span> <span style="color: #009900">avg</span><span style="color: #990000">=</span><span style="color: #993399">99442</span>
       <span style="color: #990000">=&gt;</span> ftrace_raw_event_sched_switch <span style="color: #990000">(</span><span style="color: #993399">0xffffffff8105f812</span><span style="color: #990000">)</span>
       <span style="color: #990000">=&gt;</span> __schedule <span style="color: #990000">(</span><span style="color: #993399">0xffffffff8150810a</span><span style="color: #990000">)</span>
       <span style="color: #990000">=&gt;</span> preempt_schedule <span style="color: #990000">(</span><span style="color: #993399">0xffffffff8150842e</span><span style="color: #990000">)</span>
       <span style="color: #990000">=&gt;</span> ___preempt_schedule <span style="color: #990000">(</span><span style="color: #993399">0xffffffff81273354</span><span style="color: #990000">)</span>
       <span style="color: #990000">=&gt;</span> cpu_stop_queue_work <span style="color: #990000">(</span><span style="color: #993399">0xffffffff810b03c5</span><span style="color: #990000">)</span>
       <span style="color: #990000">=&gt;</span> stop_one_cpu <span style="color: #990000">(</span><span style="color: #993399">0xffffffff810b063b</span><span style="color: #990000">)</span>
       <span style="color: #990000">=&gt;</span> sched_exec <span style="color: #990000">(</span><span style="color: #993399">0xffffffff8106136d</span><span style="color: #990000">)</span>
       <span style="color: #990000">=&gt;</span> do_execve_common<span style="color: #990000">.</span>isra<span style="color: #990000">.</span><span style="color: #993399">27</span> <span style="color: #990000">(</span><span style="color: #993399">0xffffffff81148c89</span><span style="color: #990000">)</span>
       <span style="color: #990000">=&gt;</span> do_execve <span style="color: #990000">(</span><span style="color: #993399">0xffffffff811490b0</span><span style="color: #990000">)</span>
       <span style="color: #990000">=&gt;</span> SyS_execve <span style="color: #990000">(</span><span style="color: #993399">0xffffffff811492c4</span><span style="color: #990000">)</span>
       <span style="color: #990000">=&gt;</span> return_to_handler <span style="color: #990000">(</span><span style="color: #993399">0xffffffff8150e3c8</span><span style="color: #990000">)</span>
       <span style="color: #990000">=&gt;</span> stub_execve <span style="color: #990000">(</span><span style="color: #993399">0xffffffff8150c699</span><span style="color: #990000">)</span>
  Event<span style="color: #990000">:</span> sched_switch<span style="color: #990000">:</span>S <span style="color: #990000">(</span><span style="color: #993399">1</span><span style="color: #990000">)</span> Total<span style="color: #990000">:</span> <span style="color: #993399">1000506680</span> Avg<span style="color: #990000">:</span> <span style="color: #993399">1000506680</span> Max<span style="color: #990000">:</span> <span style="color: #993399">1000506680</span> Min<span style="color: #990000">:</span><span style="color: #993399">1000506680</span>
     <span style="color: #990000">&lt;</span>stack<span style="color: #990000">&gt;</span> <span style="color: #993399">1</span> total<span style="color: #990000">:</span><span style="color: #993399">1000506680</span> min<span style="color: #990000">:</span><span style="color: #993399">1000506680</span> max<span style="color: #990000">:</span><span style="color: #993399">1000506680</span> <span style="color: #009900">avg</span><span style="color: #990000">=</span><span style="color: #993399">1000506680</span>
       <span style="color: #990000">=&gt;</span> ftrace_raw_event_sched_switch <span style="color: #990000">(</span><span style="color: #993399">0xffffffff8105f812</span><span style="color: #990000">)</span>
       <span style="color: #990000">=&gt;</span> __schedule <span style="color: #990000">(</span><span style="color: #993399">0xffffffff8150810a</span><span style="color: #990000">)</span>
       <span style="color: #990000">=&gt;</span> schedule <span style="color: #990000">(</span><span style="color: #993399">0xffffffff815084b8</span><span style="color: #990000">)</span>
       <span style="color: #990000">=&gt;</span> do_nanosleep <span style="color: #990000">(</span><span style="color: #993399">0xffffffff8150b22c</span><span style="color: #990000">)</span>
       <span style="color: #990000">=&gt;</span> hrtimer_nanosleep <span style="color: #990000">(</span><span style="color: #993399">0xffffffff8108d647</span><span style="color: #990000">)</span>
       <span style="color: #990000">=&gt;</span> SyS_nanosleep <span style="color: #990000">(</span><span style="color: #993399">0xffffffff8108d72c</span><span style="color: #990000">)</span>
       <span style="color: #990000">=&gt;</span> return_to_handler <span style="color: #990000">(</span><span style="color: #993399">0xffffffff8150e3c8</span><span style="color: #990000">)</span>
       <span style="color: #990000">=&gt;</span> tracesys_phase2 <span style="color: #990000">(</span><span style="color: #993399">0xffffffff8150c304</span><span style="color: #990000">)</span>
  Event<span style="color: #990000">:</span> sched_wakeup<span style="color: #990000">:</span><span style="color: #993399">21611</span> <span style="color: #990000">(</span><span style="color: #993399">1</span><span style="color: #990000">)</span> Total<span style="color: #990000">:</span> <span style="color: #993399">30326</span> Avg<span style="color: #990000">:</span> <span style="color: #993399">30326</span> Max<span style="color: #990000">:</span> <span style="color: #993399">30326</span> Min<span style="color: #990000">:</span><span style="color: #993399">30326</span>
     <span style="color: #990000">&lt;</span>stack<span style="color: #990000">&gt;</span> <span style="color: #993399">1</span> total<span style="color: #990000">:</span><span style="color: #993399">30326</span> min<span style="color: #990000">:</span><span style="color: #993399">30326</span> max<span style="color: #990000">:</span><span style="color: #993399">30326</span> <span style="color: #009900">avg</span><span style="color: #990000">=</span><span style="color: #993399">30326</span>
       <span style="color: #990000">=&gt;</span> ftrace_raw_event_sched_wakeup_template <span style="color: #990000">(</span><span style="color: #993399">0xffffffff8105f653</span><span style="color: #990000">)</span>
       <span style="color: #990000">=&gt;</span> ttwu_do_wakeup <span style="color: #990000">(</span><span style="color: #993399">0xffffffff810606eb</span><span style="color: #990000">)</span>
       <span style="color: #990000">=&gt;</span> ttwu_do_activate<span style="color: #990000">.</span>constprop<span style="color: #990000">.</span><span style="color: #993399">124</span> <span style="color: #990000">(</span><span style="color: #993399">0xffffffff810607c8</span><span style="color: #990000">)</span>
       <span style="color: #990000">=&gt;</span> try_to_wake_up <span style="color: #990000">(</span><span style="color: #993399">0xffffffff8106340a</span><span style="color: #990000">)</span></tt></pre></div></div>
</div>
</div>
<div class="sect1">
<h2 id="_see_also">SEE ALSO</h2>
<div class="sectionbody">
<div class="paragraph"><p>trace-cmd(1), trace-cmd-record(1), trace-cmd-start(1), trace-cmd-stop(1),
trace-cmd-extract(1), trace-cmd-reset(1), trace-cmd-split(1),
trace-cmd-list(1), trace-cmd-listen(1), trace-cmd-profile(1)</p></div>
</div>
</div>
<div class="sect1">
<h2 id="_author">AUTHOR</h2>
<div class="sectionbody">
<div class="paragraph"><p>Written by Steven Rostedt, &lt;<a href="mailto:rostedt@goodmis.org">rostedt@goodmis.org</a>&gt;</p></div>
</div>
</div>
<div class="sect1">
<h2 id="_resources">RESOURCES</h2>
<div class="sectionbody">
<div class="paragraph"><p><a href="https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/">https://git.kernel.org/pub/scm/utils/trace-cmd/trace-cmd.git/</a></p></div>
</div>
</div>
<div class="sect1">
<h2 id="_copying">COPYING</h2>
<div class="sectionbody">
<div class="paragraph"><p>Copyright (C) 2010 Red Hat, Inc. Free use of this software is granted under
the terms of the GNU Public License (GPL).</p></div>
</div>
</div>
</div>
<div id="footnotes"><hr /></div>
<div id="footer">
<div id="footer-text">
Last updated
 2023-06-07 20:21:00 UTC
</div>
</div>
</body>
</html>

Zerion Mini Shell 1.0