Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 223863
b: refs/heads/master
c: 1968ad9
h: refs/heads/master
i:
  223861: 66385de
  223859: 1817c0c
  223855: 2d844e9
v: v3
  • Loading branch information
Shawn Bohrer authored and Arnaldo Carvalho de Melo committed Dec 1, 2010
1 parent a34cdf9 commit 952e8ce
Show file tree
Hide file tree
Showing 15 changed files with 158 additions and 123 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b3d006c0e745bfd2dab4984ffe3279d5cf4e926a
refs/heads/master: 1968ad911d0769e58a484bb721d275814baf9f2f
37 changes: 36 additions & 1 deletion trunk/tools/perf/Documentation/perf-annotate.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,47 @@ OPTIONS
--input=::
Input file name. (default: perf.data)

-d::
--dsos=<dso[,dso...]>::
Only consider symbols in these dsos.
-s::
--symbol=<symbol>::
Symbol to annotate.

-f::
--force::
Don't complain, do it.

-v::
--verbose::
Be more verbose. (Show symbol address, etc)

-D::
--dump-raw-trace::
Dump raw trace in ASCII.

-k::
--vmlinux=<file>::
vmlinux pathname.

-m::
--modules::
Load module symbols. WARNING: use only with -k and LIVE kernel.

-l::
--print-line::
Print matching source lines (may be slow).

-P::
--full-paths::
Don't shorten the displayed pathnames.

--stdio:: Use the stdio interface.

--tui:: Use the TUI interface Use of --tui requires a tty, if one is not
present, as when piping to other commands, the stdio interface is
used. This interfaces starts by centering on the line with more
samples, TAB/UNTAB cycles thru the lines with more samples.
samples, TAB/UNTAB cycles through the lines with more samples.

SEE ALSO
--------
Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
perf-script-perl(1)
perf-trace-perl(1)
==================

NAME
----
perf-script-perl - Process trace data with a Perl script
perf-trace-perl - Process trace data with a Perl script

SYNOPSIS
--------
[verse]
'perf script' [-s [Perl]:script[.pl] ]
'perf trace' [-s [Perl]:script[.pl] ]

DESCRIPTION
-----------

This perf script option is used to process perf script data using perf's
This perf trace option is used to process perf trace data using perf's
built-in Perl interpreter. It reads and processes the input file and
displays the results of the trace analysis implemented in the given
Perl script, if any.

STARTER SCRIPTS
---------------

You can avoid reading the rest of this document by running 'perf script
You can avoid reading the rest of this document by running 'perf trace
-g perl' in the same directory as an existing perf.data trace file.
That will generate a starter script containing a handler for each of
the event types in the trace file; it simply prints every available
Expand All @@ -30,13 +30,13 @@ field for each event in the trace file.
You can also look at the existing scripts in
~/libexec/perf-core/scripts/perl for typical examples showing how to
do basic things like aggregate event data, print results, etc. Also,
the check-perf-script.pl script, while not interesting for its results,
the check-perf-trace.pl script, while not interesting for its results,
attempts to exercise all of the main scripting features.

EVENT HANDLERS
--------------

When perf script is invoked using a trace script, a user-defined
When perf trace is invoked using a trace script, a user-defined
'handler function' is called for each event in the trace. If there's
no handler function defined for a given event type, the event is
ignored (or passed to a 'trace_handled' function, see below) and the
Expand Down Expand Up @@ -112,13 +112,13 @@ write a useful trace script. The sections below cover the rest.
SCRIPT LAYOUT
-------------

Every perf script Perl script should start by setting up a Perl module
Every perf trace Perl script should start by setting up a Perl module
search path and 'use'ing a few support modules (see module
descriptions below):

----
use lib "$ENV{'PERF_EXEC_PATH'}/scripts/perl/perf-script-Util/lib";
use lib "./perf-script-Util/lib";
use lib "$ENV{'PERF_EXEC_PATH'}/scripts/perl/Perf-Trace-Util/lib";
use lib "./Perf-Trace-Util/lib";
use Perf::Trace::Core;
use Perf::Trace::Context;
use Perf::Trace::Util;
Expand Down Expand Up @@ -162,15 +162,15 @@ sub trace_unhandled
----

The remaining sections provide descriptions of each of the available
built-in perf script Perl modules and their associated functions.
built-in perf trace Perl modules and their associated functions.

AVAILABLE MODULES AND FUNCTIONS
-------------------------------

The following sections describe the functions and variables available
via the various Perf::Trace::* Perl modules. To use the functions and
variables from the given module, add the corresponding 'use
Perf::Trace::XXX' line to your perf script script.
Perf::Trace::XXX' line to your perf trace script.

Perf::Trace::Core Module
~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -204,7 +204,7 @@ argument.
Perf::Trace::Util Module
~~~~~~~~~~~~~~~~~~~~~~~~

Various utility functions for use with perf script:
Various utility functions for use with perf trace:

nsecs($secs, $nsecs) - returns total nsecs given secs/nsecs pair
nsecs_secs($nsecs) - returns whole secs portion given nsecs
Expand All @@ -214,4 +214,4 @@ Various utility functions for use with perf script:

SEE ALSO
--------
linkperf:perf-script[1]
linkperf:perf-trace[1]
Loading

0 comments on commit 952e8ce

Please sign in to comment.