Docstoc

perf-stat

Document Sample
perf-stat Powered By Docstoc
					<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Linux/tools/perf/Documentation/perf-stat.txt - Linux Cross
Reference - Free Electrons</title>
<link rel="stylesheet" href="/style.css" type="text/css" media="screen"
/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta description="Linux Cross-Reference (LXR) service by Free Electrons.
The easiest way to study Linux kernel sources. Available for all recent
releases." />
<base href="http://lxr.free-electrons.com/"/>
</head>

<body>

<div id="wrapper">
<div id="wrapper2">
<div id="header">

      <div id="logo">
            <h1>Linux Cross Reference</h1>
            <h2><a href="http://free-electrons.com">Free
Electrons</a></h2>
            <h2>Embedded Linux Experts</h2>
            <p>
             &nbsp;&bull;&nbsp;<b><i>source navigation</i></b>
&nbsp;&bull;&nbsp;<a href="diff/tools/perf/Documentation/perf-
stat.txt">diff markup</a> &nbsp;&bull;&nbsp;<a href="ident">identifier
search</a> &nbsp;&bull;&nbsp;<a href="search">freetext search</a>
&nbsp;&bull;&nbsp;
            </p>
      </div>
</div>

<div id="topbar">

  <p>Version: &nbsp;<a href="source/tools/perf/Documentation/perf-
stat.txt?v=2.6.26">2.6.26</a>&nbsp;<a
href="source/tools/perf/Documentation/perf-
stat.txt?v=2.6.27">2.6.27</a>&nbsp;<a
href="source/tools/perf/Documentation/perf-
stat.txt?v=2.6.28">2.6.28</a>&nbsp;<a
href="source/tools/perf/Documentation/perf-
stat.txt?v=2.6.29">2.6.29</a>&nbsp;<a
href="source/tools/perf/Documentation/perf-
stat.txt?v=2.6.30">2.6.30</a>&nbsp;<a
href="source/tools/perf/Documentation/perf-
stat.txt?v=2.6.31">2.6.31</a>&nbsp;<a
href="source/tools/perf/Documentation/perf-
stat.txt?v=2.6.32">2.6.32</a>&nbsp;<a
href="source/tools/perf/Documentation/perf-
stat.txt?v=2.6.33">2.6.33</a>&nbsp;<a
href="source/tools/perf/Documentation/perf-
stat.txt?v=2.6.34">2.6.34</a>&nbsp;<a
href="source/tools/perf/Documentation/perf-
stat.txt?v=2.6.35">2.6.35</a>&nbsp;<a
href="source/tools/perf/Documentation/perf-
stat.txt?v=2.6.36">2.6.36</a>&nbsp;<a
href="source/tools/perf/Documentation/perf-
stat.txt?v=2.6.37">2.6.37</a>&nbsp;<a
href="source/tools/perf/Documentation/perf-
stat.txt?v=2.6.38">2.6.38</a>&nbsp;<a
href="source/tools/perf/Documentation/perf-
stat.txt?v=2.6.39">2.6.39</a>&nbsp;<a
href="source/tools/perf/Documentation/perf-
stat.txt?v=3.0">3.0</a>&nbsp;<b><i>3.1</i></b></p>

  <p>Architecture: &nbsp;<b><i>x86</i></b>&nbsp;<a
href="source/tools/perf/Documentation/perf-
stat.txt?a=arm">arm</a>&nbsp;<a
href="source/tools/perf/Documentation/perf-
stat.txt?a=avr32">avr32</a>&nbsp;<a
href="source/tools/perf/Documentation/perf-
stat.txt?a=blackfin">blackfin</a>&nbsp;<a
href="source/tools/perf/Documentation/perf-
stat.txt?a=m68k">m68k</a>&nbsp;<a
href="source/tools/perf/Documentation/perf-
stat.txt?a=m68knommu">m68knommu</a>&nbsp;<a
href="source/tools/perf/Documentation/perf-
stat.txt?a=microblaze">microblaze</a>&nbsp;<a
href="source/tools/perf/Documentation/perf-
stat.txt?a=mips">mips</a>&nbsp;<a
href="source/tools/perf/Documentation/perf-
stat.txt?a=powerpc">powerpc</a>&nbsp;<a
href="source/tools/perf/Documentation/perf-stat.txt?a=sh">sh</a></p>

</div>

<h1><a href="source/">Linux</a>/<a href="source/tools/">tools</a>/<a
href="source/tools/perf/">perf</a>/<a
href="source/tools/perf/Documentation/">Documentation</a>/<a
href="source/tools/perf/Documentation/perf-stat.txt">perf-
stat.txt</a></h1>
<div id="lxrcode"><pre> <a name="L1"
href="source/tools/perf/Documentation/perf-stat.txt#L1">1</a> perf-
stat(1)
  <a name="L2" href="source/tools/perf/Documentation/perf-
stat.txt#L2">2</a> ============
  <a name="L3" href="source/tools/perf/Documentation/perf-
stat.txt#L3">3</a>
  <a name="L4" href="source/tools/perf/Documentation/perf-
stat.txt#L4">4</a> NAME
  <a name="L5" href="source/tools/perf/Documentation/perf-
stat.txt#L5">5</a> ----
  <a name="L6" href="source/tools/perf/Documentation/perf-
stat.txt#L6">6</a> perf-stat - Run a command and gather performance
counter statistics
  <a name="L7" href="source/tools/perf/Documentation/perf-
stat.txt#L7">7</a>
  <a name="L8" href="source/tools/perf/Documentation/perf-
stat.txt#L8">8</a> SYNOPSIS
  <a name="L9" href="source/tools/perf/Documentation/perf-
stat.txt#L9">9</a> --------
 <a name="L10" href="source/tools/perf/Documentation/perf-
stat.txt#L10">10</a> [verse]
 <a name="L11" href="source/tools/perf/Documentation/perf-
stat.txt#L11">11</a> 'perf stat' [-e &lt;EVENT&gt; | --event=EVENT] [-a]
&lt;command&gt;
 <a name="L12" href="source/tools/perf/Documentation/perf-
stat.txt#L12">12</a> 'perf stat' [-e &lt;EVENT&gt; | --event=EVENT] [-a]
-- &lt;command&gt; [&lt;options&gt;]
 <a name="L13" href="source/tools/perf/Documentation/perf-
stat.txt#L13">13</a>
 <a name="L14" href="source/tools/perf/Documentation/perf-
stat.txt#L14">14</a> DESCRIPTION
 <a name="L15" href="source/tools/perf/Documentation/perf-
stat.txt#L15">15</a> -----------
 <a name="L16" href="source/tools/perf/Documentation/perf-
stat.txt#L16">16</a> This command runs a command and gathers performance
counter statistics
 <a name="L17" href="source/tools/perf/Documentation/perf-
stat.txt#L17">17</a> from it.
 <a name="L18" href="source/tools/perf/Documentation/perf-
stat.txt#L18">18</a>
 <a name="L19" href="source/tools/perf/Documentation/perf-
stat.txt#L19">19</a>
 <a name="L20" href="source/tools/perf/Documentation/perf-
stat.txt#L20">20</a> OPTIONS
 <a name="L21" href="source/tools/perf/Documentation/perf-
stat.txt#L21">21</a> -------
 <a name="L22" href="source/tools/perf/Documentation/perf-
stat.txt#L22">22</a> &lt;command&gt;...::
 <a name="L23" href="source/tools/perf/Documentation/perf-
stat.txt#L23">23</a>          Any command you can specify in a shell.
 <a name="L24" href="source/tools/perf/Documentation/perf-
stat.txt#L24">24</a>
 <a name="L25" href="source/tools/perf/Documentation/perf-
stat.txt#L25">25</a>
 <a name="L26" href="source/tools/perf/Documentation/perf-
stat.txt#L26">26</a> -e::
 <a name="L27" href="source/tools/perf/Documentation/perf-
stat.txt#L27">27</a> --event=::
 <a name="L28" href="source/tools/perf/Documentation/perf-
stat.txt#L28">28</a>          Select the PMU event. Selection can be a
symbolic event name
 <a name="L29" href="source/tools/perf/Documentation/perf-
stat.txt#L29">29</a>          (use 'perf list' to list all events) or a
raw PMU
 <a name="L30" href="source/tools/perf/Documentation/perf-
stat.txt#L30">30</a>         event (eventsel+umask) in the form of rNNN
where NNN is a
 <a name="L31" href="source/tools/perf/Documentation/perf-
stat.txt#L31">31</a>          hexadecimal event descriptor.
 <a name="L32" href="source/tools/perf/Documentation/perf-
stat.txt#L32">32</a>
 <a name="L33" href="source/tools/perf/Documentation/perf-
stat.txt#L33">33</a> -i::
 <a name="L34" href="source/tools/perf/Documentation/perf-
stat.txt#L34">34</a> --no-inherit::
 <a name="L35" href="source/tools/perf/Documentation/perf-
stat.txt#L35">35</a>         child tasks do not inherit counters
 <a name="L36" href="source/tools/perf/Documentation/perf-
stat.txt#L36">36</a> -p::
 <a name="L37" href="source/tools/perf/Documentation/perf-
stat.txt#L37">37</a> --pid=&lt;pid&gt;::
 <a name="L38" href="source/tools/perf/Documentation/perf-
stat.txt#L38">38</a>         stat events on existing process id
 <a name="L39" href="source/tools/perf/Documentation/perf-
stat.txt#L39">39</a>
 <a name="L40" href="source/tools/perf/Documentation/perf-
stat.txt#L40">40</a> -t::
 <a name="L41" href="source/tools/perf/Documentation/perf-
stat.txt#L41">41</a> --tid=&lt;tid&gt;::
 <a name="L42" href="source/tools/perf/Documentation/perf-
stat.txt#L42">42</a>         stat events on existing thread id
 <a name="L43" href="source/tools/perf/Documentation/perf-
stat.txt#L43">43</a>
 <a name="L44" href="source/tools/perf/Documentation/perf-
stat.txt#L44">44</a>
 <a name="L45" href="source/tools/perf/Documentation/perf-
stat.txt#L45">45</a> -a::
 <a name="L46" href="source/tools/perf/Documentation/perf-
stat.txt#L46">46</a> --all-cpus::
 <a name="L47" href="source/tools/perf/Documentation/perf-
stat.txt#L47">47</a>         system-wide collection from all CPUs
 <a name="L48" href="source/tools/perf/Documentation/perf-
stat.txt#L48">48</a>
 <a name="L49" href="source/tools/perf/Documentation/perf-
stat.txt#L49">49</a> -c::
 <a name="L50" href="source/tools/perf/Documentation/perf-
stat.txt#L50">50</a> --scale::
 <a name="L51" href="source/tools/perf/Documentation/perf-
stat.txt#L51">51</a>         scale/normalize counter values
 <a name="L52" href="source/tools/perf/Documentation/perf-
stat.txt#L52">52</a>
 <a name="L53" href="source/tools/perf/Documentation/perf-
stat.txt#L53">53</a> -r::
 <a name="L54" href="source/tools/perf/Documentation/perf-
stat.txt#L54">54</a> --repeat=&lt;n&gt;::
 <a name="L55" href="source/tools/perf/Documentation/perf-
stat.txt#L55">55</a>         repeat command and print average + stddev
(max: 100)
 <a name="L56" href="source/tools/perf/Documentation/perf-
stat.txt#L56">56</a>
 <a name="L57" href="source/tools/perf/Documentation/perf-
stat.txt#L57">57</a> -B::
 <a name="L58" href="source/tools/perf/Documentation/perf-
stat.txt#L58">58</a> --big-num::
 <a name="L59" href="source/tools/perf/Documentation/perf-
stat.txt#L59">59</a>         print large numbers with thousands'
separators according to locale
 <a name="L60" href="source/tools/perf/Documentation/perf-
stat.txt#L60">60</a>
 <a name="L61" href="source/tools/perf/Documentation/perf-
stat.txt#L61">61</a> -C::
 <a name="L62" href="source/tools/perf/Documentation/perf-
stat.txt#L62">62</a> --cpu=::
 <a name="L63" href="source/tools/perf/Documentation/perf-
stat.txt#L63">63</a> Count only on the list of CPUs provided. Multiple
CPUs can be provided as a
 <a name="L64" href="source/tools/perf/Documentation/perf-
stat.txt#L64">64</a> comma-separated list with no space: 0,1. Ranges of
CPUs are specified with -: 0-2.
 <a name="L65" href="source/tools/perf/Documentation/perf-
stat.txt#L65">65</a> In per-thread mode, this option is ignored. The -a
option is still necessary
 <a name="L66" href="source/tools/perf/Documentation/perf-
stat.txt#L66">66</a> to activate system-wide monitoring. Default is to
count on all CPUs.
 <a name="L67" href="source/tools/perf/Documentation/perf-
stat.txt#L67">67</a>
 <a name="L68" href="source/tools/perf/Documentation/perf-
stat.txt#L68">68</a> -A::
 <a name="L69" href="source/tools/perf/Documentation/perf-
stat.txt#L69">69</a> --no-aggr::
 <a name="L70" href="source/tools/perf/Documentation/perf-
stat.txt#L70">70</a> Do not aggregate counts across all monitored CPUs in
system-wide mode (-a).
 <a name="L71" href="source/tools/perf/Documentation/perf-
stat.txt#L71">71</a> This option is only valid in system-wide mode.
 <a name="L72" href="source/tools/perf/Documentation/perf-
stat.txt#L72">72</a>
 <a name="L73" href="source/tools/perf/Documentation/perf-
stat.txt#L73">73</a> -n::
 <a name="L74" href="source/tools/perf/Documentation/perf-
stat.txt#L74">74</a> --null::
 <a name="L75" href="source/tools/perf/Documentation/perf-
stat.txt#L75">75</a>         null run - don't start any counters
 <a name="L76" href="source/tools/perf/Documentation/perf-
stat.txt#L76">76</a>
 <a name="L77" href="source/tools/perf/Documentation/perf-
stat.txt#L77">77</a> -v::
 <a name="L78" href="source/tools/perf/Documentation/perf-
stat.txt#L78">78</a> --verbose::
 <a name="L79" href="source/tools/perf/Documentation/perf-
stat.txt#L79">79</a>          be more verbose (show counter open errors,
etc)
 <a name="L80" href="source/tools/perf/Documentation/perf-
stat.txt#L80">80</a>
 <a name="L81" href="source/tools/perf/Documentation/perf-
stat.txt#L81">81</a> -x SEP::
 <a name="L82" href="source/tools/perf/Documentation/perf-
stat.txt#L82">82</a> --field-separator SEP::
 <a name="L83" href="source/tools/perf/Documentation/perf-
stat.txt#L83">83</a> print counts using a CSV-style output to make it
easy to import directly into
 <a name="L84" href="source/tools/perf/Documentation/perf-
stat.txt#L84">84</a> spreadsheets. Columns are separated by the string
specified in SEP.
 <a name="L85" href="source/tools/perf/Documentation/perf-
stat.txt#L85">85</a>
 <a name="L86" href="source/tools/perf/Documentation/perf-
stat.txt#L86">86</a> -G name::
 <a name="L87" href="source/tools/perf/Documentation/perf-
stat.txt#L87">87</a> --cgroup name::
 <a name="L88" href="source/tools/perf/Documentation/perf-
stat.txt#L88">88</a> monitor only in the container (cgroup) called
"name". This option is available only
 <a name="L89" href="source/tools/perf/Documentation/perf-
stat.txt#L89">89</a> in per-cpu mode. The cgroup filesystem must be
mounted. All threads belonging to
 <a name="L90" href="source/tools/perf/Documentation/perf-
stat.txt#L90">90</a> container "name" are monitored when they run on the
monitored CPUs. Multiple cgroups
 <a name="L91" href="source/tools/perf/Documentation/perf-
stat.txt#L91">91</a> can be provided. Each cgroup is applied to the
corresponding event, i.e., first cgroup
 <a name="L92" href="source/tools/perf/Documentation/perf-
stat.txt#L92">92</a> to first event, second cgroup to second event and so
on. It is possible to provide
 <a name="L93" href="source/tools/perf/Documentation/perf-
stat.txt#L93">93</a> an empty cgroup (monitor all the time) using, e.g.,
-G foo,,bar. Cgroups must have
 <a name="L94" href="source/tools/perf/Documentation/perf-
stat.txt#L94">94</a> corresponding events, i.e., they always refer to
events defined earlier on the command
 <a name="L95" href="source/tools/perf/Documentation/perf-
stat.txt#L95">95</a> line.
 <a name="L96" href="source/tools/perf/Documentation/perf-
stat.txt#L96">96</a>
 <a name="L97" href="source/tools/perf/Documentation/perf-
stat.txt#L97">97</a> EXAMPLES
 <a name="L98" href="source/tools/perf/Documentation/perf-
stat.txt#L98">98</a> --------
 <a name="L99" href="source/tools/perf/Documentation/perf-
stat.txt#L99">99</a>
<a name="L100" href="source/tools/perf/Documentation/perf-
stat.txt#L100">100</a> $ perf stat -- make -j
<a name="L101" href="source/tools/perf/Documentation/perf-
stat.txt#L101">101</a>
<a name="L102" href="source/tools/perf/Documentation/perf-
stat.txt#L102">102</a> Performance counter stats for 'make -j':
<a name="L103" href="source/tools/perf/Documentation/perf-
stat.txt#L103">103</a>
<a name="L104" href="source/tools/perf/Documentation/perf-
stat.txt#L104">104</a>     8117.370256 task clock ticks      #
11.281 CPU utilization factor
<a name="L105" href="source/tools/perf/Documentation/perf-
stat.txt#L105">105</a>              678 context switches     #
0.000 M/sec
<a name="L106" href="source/tools/perf/Documentation/perf-
stat.txt#L106">106</a>              133 CPU migrations       #
0.000 M/sec
<a name="L107" href="source/tools/perf/Documentation/perf-
stat.txt#L107">107</a>           235724 pagefaults           #
0.029 M/sec
<a name="L108" href="source/tools/perf/Documentation/perf-
stat.txt#L108">108</a>     24821162526 CPU cycles            #
3057.784 M/sec
<a name="L109" href="source/tools/perf/Documentation/perf-
stat.txt#L109">109</a>     18687303457 instructions          #
2302.138 M/sec
<a name="L110" href="source/tools/perf/Documentation/perf-
stat.txt#L110">110</a>        172158895 cache references     #
21.209 M/sec
<a name="L111" href="source/tools/perf/Documentation/perf-
stat.txt#L111">111</a>         27075259 cache misses         #
3.335 M/sec
<a name="L112" href="source/tools/perf/Documentation/perf-
stat.txt#L112">112</a>
<a name="L113" href="source/tools/perf/Documentation/perf-
stat.txt#L113">113</a> Wall-clock time elapsed:    719.554352 msecs
<a name="L114" href="source/tools/perf/Documentation/perf-
stat.txt#L114">114</a>
<a name="L115" href="source/tools/perf/Documentation/perf-
stat.txt#L115">115</a> SEE ALSO
<a name="L116" href="source/tools/perf/Documentation/perf-
stat.txt#L116">116</a> --------
<a name="L117" href="source/tools/perf/Documentation/perf-
stat.txt#L117">117</a> linkperf:perf-top[1], linkperf:perf-list[1]
</pre></div><p>
This page was automatically generated by <a
href="http://lxr.linux.no">LXR</a> 0.3.1.
&nbsp;&bull;&nbsp;
Linux is a registered trademark of Linus Torvalds
</p>

<div id="menu">
<ul>
   <li><a href="http://free-electrons.com/">Home</a></li>
   <li><a href="http://free-electrons.com/development/"
title="Development">Development</a></li>
   <li><a href="http://free-electrons.com/services/"
title="Services">Services</a></li>
   <li><a href="http://free-electrons.com/training/"
title="Training">Training</a></li>
   <li><a href="http://free-electrons.com/docs/"
title="Docs">Docs</a></li>
   <li><a href="http://free-electrons.com/community/"
title="Community">Community</a></li>
   <li><a href="http://free-electrons.com/company/"
title="Company">Company</a></li>
   <li><a href="http://free-electrons.com/blog/"
title="Blog">Blog</a></li>
</ul>
</div>

</div>
</div>
</body>
</html>

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:9
posted:12/2/2011
language:Irish
pages:8