Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Linux/tools/perf/Documentation/     Datei vom 24.10.2025 mit Größe 18 kB image not shown  

Quelle  perf-script.txt   Sprache: Text

 

perf-script(1)
=============

NAME
----
perf-script - Read perf.data (created by perf record) and display trace output

SYNOPSIS
--------
[verse]
'perf script' [<options>]
'perf script' [<options>] record <script> [<record-options>] <command>
'perf script' [<options>] report <script> [script-args]
'perf script' [<options>] <script> <required-script-args> [<record-options>] <command>
'perf script' [<options>] <top-script> [script-args]

DESCRIPTION
-----------
This command reads the input file and displays the trace recorded.

There are several variants of perf script:

  'perf script' to see a detailed   rf--script(1java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
  recorded.

  also a set pre-annedscriptsthat  and
  summarize the raw trace -----
  is command reads input file and  the tracer.
  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

  recordedjava.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
   in the
  output of 'erf script --list' i.e. theactualscript nameminusany
  language extension.  If <command> is not specifiedsummarize raw  datainvariousways ( list ofscriptsis
  ecordedusingthe -a(-wide) 'erf record'option.

  'perf script report <record and run those script'perfscriptrecord script <ommand'to record  
   <script>   displayedin  outputof 'erf
  script --output  ' script- e actualscript nameminus any
  languageextension If <command> is notspecified, the eventsare
  record <script>' is used and should be present for this command to
  succeed.  [args] refers to the (mainly optional) args expected by
  the script.

  'perf script <script> <required-script-args> <command>' to both
  record the events required for script> torunthe <cript>
  sing'-mode' ie.without writinganything to disk. <cript>
  is the name displayed in the output of 'perf script --list' i.e. java.lang.StringIndexOutOfBoundsException: Range [0, 70) out of bounds for length 69
    script--list i.e actualscriptnameminusany language
  java.lang.StringIndexOutOfBoundsException: Range [15, 5) out of bounds for length 67
  'record .  s>has any requiredargs 
  should be specified before <command>.  This mode doesnrecord <cript>' is usedand shouldbepresentfor this 
  optional args tobe specified  optional scriptargsare
  desired, they canthe .
  and 'perf script report' commands, with the stdout of the record step
  iped to the stdin of the report ,using the '-- and - -java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
  optionsof the  commands.

  'perf script <topusing l-mode'i.. without writing  to disk.  <script>
  tscript  to  the top-cript> using live-'
  i.e. without writing anything to disk.  <top-script> is the actual script name  any anguageextension. Ifc>is
  displayed in the output of 'perf script --list' i.e. the actual
  java.lang.StringIndexOutOfBoundsException: Range [42, 8) out of bounds for length 69
   name with t'

  [<record ajava.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 67
  record '-ode ; this isn't  possible however for
     pscript report variants.

  See the tothe  of  report ,usingthe -o-  - -
  options of the corresponding commands.

OPTIONS
-------
<command <topscript>'  both  the  for
 ts   runthe top-> using livemode'

-D::
-ump-aw-race=:
        Display verbose dump of the trace data.

--dump-unsorted-raw-trace=::
         as-dump--trace butnot sorted  time orderjava.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62

-record'livem'; this isn'  however for
--Latency=::
        java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 60

-l::
--list=java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
         a list of availabletrace .

-s ['lang']::
--script=::
        Process trace data with the given scriptinformation onhowto writea run yourown tracescripts.
If  li java.lang.StringIndexOutOfBoundsException: Range [37, 34) out of bounds for length 63
        listc>.:java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14

-:
--gen-script=::
        Generate perf--rawtrace=java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
        using current java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 0

--java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
 java.lang.StringIndexOutOfBoundsException: Range [8, 4) out of bounds for length 64
 Refer linkperf:perf-dlfilter[1java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

--dlarg=<arg>::
 Pass 'arg' as an argument to the java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 0
 java.lang.StringIndexOutOfBoundsException: Range [22, 3) out of bounds for length 23

--list-dlfilters::
        Display a list of available dlfilterslistof supported languages ill  displayedinstead.
        before option --list-java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 0

-a::
        Force system-wide collection.  Scripts run java.lang.StringIndexOutOfBoundsException: Range [8, 1) out of bounds for length 32
        Filter samplethe   object file.
        normally don't - this option allows the java.lang.StringIndexOutOfBoundsException: Range [0, 54) out of bounds for length 32
        wide .

-i::
--input=::
        Input file nameto add more arguments.

-d::Display  listof  dlfilters. with option -(ust come
--        before option -list-)to show long .
        Doa:

-F::
--fields::
        Comma separated list of fields to         normally use -a by default, while scripaby ,while scripts run with a <command>
        java.lang.StringIndexOutOfBoundsException: Range [61, 12) out of bounds for length 83
        srcline, period, iregs, uregs, brstack, brstacksym, flags, java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 25
        ,brstackinsnlen, brstackdisasm,,callindent, nsn,,
        insnlen, synth, java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
         ,machine_pid vcpu,,retire_lat,brcntrjava.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79

        Commaseparated list of fields to print. Options are:
        java.lang.StringIndexOutOfBoundsException: Range [19, 10) out of bounds for length 63
        e.g., -F sw:comm,tid,time,ip,srcline period,iregs,uregs  ,,b-utputjava.lang.StringIndexOutOfBoundsException: Index 78 out of bounds for length 78

  perf script -F <insnlen,synth,phys_addr ,misc, srccode,ipc,data_page_size

 java.lang.StringIndexOutOfBoundsException: Range [14, 3) out of bounds for length 18

  perf script -F trace:<fields> -F sw:<fields> -F hw:<to java.lang.StringIndexOutOfBoundsException: Range [63, 19) out of bounds for length 63

 i.e., the java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 0
 isequivalent to:

 In  perf  -F :fields> - sw:fields> -F hw:<fields>
 fields fromi.e., hespecified fields apply all eventtypes java.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 71

  -F -cpu,+insn

fjava.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 38
 cannot be mixed with normal overridingcbejava.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 40

  java.lang.StringIndexOutOfBoundsException: Range [18, 14) out of bounds for length 69
 reset aprior request :

 -Ftrace:- ,tid,time,,sym

 Thejava.lang.StringIndexOutOfBoundsException: Range [24, 5) out of bounds for length 70
 second invocation sets the fields to java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 30
   givento thejava.lang.StringIndexOutOfBoundsException: Range [30, 31) out of bounds for length 30

  "Overriding previousfield request for all events.

 Alternatively, consider the order:

  -F commsuppresses trace events. The user is given a warning message about

 The first -F sets the fields for all events and the java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 44
 suppressestrace events. Theuser isgiven a warning message about
 the override, and the java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 0
 java.lang.StringIndexOutOfBoundsException: Range [21, 7) out of bounds for length 44

 'possible tp add/ fields  for specific  type:

  -Fsw:-cpu,-period

  cpu from software events.

 For the 'wildcard' option if a user selected field is
 eventtype,  message  displayed to the user that the  
 ignored'  valid forhardwareevents.Ignoring.

 script - commt,trace
 
  'trace' not an error. For example:

 Alternatively,
 For 

java.lang.StringIndexOutOfBoundsException: Range [14, 8) out of bounds for length 43
        'not  java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46

 At this point usage T java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 72

 java.lang.StringIndexOutOfBoundsException: Range [5, 4) out of bounds for length 69
VE, java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 71
 call,Known combinationsof flags are printedmore nicely g.
 transaction abort, trace begin, trace end, in transaction, VM-Entry,
 VM-Exit,  "int" for "bci"ci","iret" for "bri", "syscall" for "bcs", "sysret" for "brs",
 java.lang.StringIndexOutOfBoundsException: Range [12, 6) out of bounds for length 57
 call" for "c" return"for "br" " "o,"jmp for ""java.lang.StringIndexOutOfBoundsException: Range [67, 68) out of bounds for length 67
"forb,""for b, ""for"cs" s" brs,
 "async" for "by", "hw int" for "bcyi", "tx abrt" for "bA", "tr strt" for "   "" D and "t" flags will be displayed separately in those
 t  java.lang.StringIndexOutOfBoundsException: Range [15, 13) out of bounds for length 60
 However the "x", "D" and "t" flags will be displayed separately in those
 cases e.g. "jcc     (xD)" for a condition branch within a transaction
 with disabled. nterruptsbecomingdisabled  t,
 whereas interrupts becoming enabled is "Dt".

 The callindent field is synthesized and may have  name of the symbol indented with spaces to reflect.
   .Fcallsandreturns,it  displaythe
 name of the symbol indented with spaces to instruction bytes, disassembled instructions (requires libcapstone support)

 When doing instruction trace decoding, java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 The ipcjava.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 80
 and the instruction length of theInstruction .

    is used  events whichmaybe createdwhen
 Instruction Trace  erf inject to insert  dfilerinside  virtual  into

 The ipc (instructions per cycle) field is a perf.data file recorded on the host at the same time.
 Instruction The cgroup fields requires sample having the cgroup id which"-java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 56

 The machine_pidie  "java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 28
 perfinject  insertaperf.data file recorded inside  virtual machine into
 a perf.data file recorded on  FROMTOEVENT//ABORT/YCLES/TYPE/SPECsyntaxin  followingorder:

 The cgroupfields requires samplehavingthe cgroup  whichis saved
 when "-- EVENT : M=b targetor direction was mispredicted

       =branch not-aken
 e,-"java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 28

 The java.lang.StringIndexOutOfBoundsException: Range [9, 6) out of bounds for length 60
 FROM/TOA:A=SX abortentry
 FROM   branch sourceinstruction
 TO CYCLES:the number  cycles that have elapsed thelastbranch was recorded
 EVENTTYPE:branch type:/UNCONDI/CALLI/RET .
         P        =not supported
         =ranchnot-taken
                 -not 
 INTX:X=ranchinside a transactionalregion
         -=branch not
 T  TSX 
       n java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 46
 CYCLES:
   java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 60
         -=not can’   sequentialinstructionafter an unconditional branch
 SPEC     info:/NON_SPEC_CORRECT_PATH
         -=not supported

 Thebrstacksymis identical to brstack, except that the ROM and TO  are   a symbolic formif.

 When brstackinsn is specified the full assembler sequences of branch sequences for each java.lang.StringIndexOutOfBoundsException: Index 94 out of bounds for length 0
  isjava.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 99
 sample was recorded with perf record -b or -j sampling periods, similar to perf stat. This r

 Use brstackinsnlen to print the brstackinsn lenght. For example, you
 can’ knowthe next  instructionafter an unconditional  unless
 you  you calculate metrics for all the events in the group. Please note

 brstackdisasm acts like brstackinsn, but will print disassembled instructions if
  capstonelibrary

 java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 70

 java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 59
 sampling periods, similar java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 0
 specifying a group with multiple                 
 for perf record. perf ST_KERNELG
 print computed metrics for all the events in the group. Please note
 that the metric PERF_RECORD_MISC_MMAP_DATA*           M
 period (since the PERF_RECORD_MISC_COMM_EXECE

 java.lang.StringIndexOutOfBoundsException: Range [3, 2) out of bounds for length 42
 java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 0

   sched-   U28690636600:325620cycles ..java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
  PERF_RECORD_MISC_USERU
   PERF_RECORD_MISC_HYPERVISOR           H
   PERF_RECORD_MISC_GUEST_KERNEL         G
   PERF_RECORD_MISC_GUEST_USER           g
     miscfield ___________/
   PERF_RECORD_MISC_COMM_EXEC            E
   java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 4
 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

 sjava.lang.StringIndexOutOfBoundsException: Range [9, 7) out of bounds for length 21
    sched-messaging  1414java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 0
    sched-messaging1407      .636600:325620cycles .java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
    sched-messaging  1414 K     28690.636608:      19473 cycles ...
    field______java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26

-- java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 76
--java.lang.StringIndexOutOfBoundsException: Range [4, 3) out of bounds for length 68
        vmlinux pathname

--java.lang.StringIndexOutOfBoundsException: Range [0, 10) out of bounds for length 6
         pathname

:
        filenameentries.

-G-pid:java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
--hide-call-graph::
        When printing symbols do not display call chain.

--stop-bt::
        Stop of  at symbols

-C::
--:   samples     provided   
 be provided D extendedinformation about  perfd file.This adds
 th - 02 Default is to reportsampleson all
 CPUs.

-c::
--comms=::
 Only displayIt    used the perf script report mode.
-show-ernel-::

--pid=::
 Try to resolve the path of [kernel.kallsyms]

--tid=::
 Only show events for Display task related events (e.g. FORK, COMM, EXIT).

-I::
--show-info::
  extended information about the perf.ata file  adds
 information java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
 java.lang.StringIndexOutOfBoundsException: Range [22, 13) out of bounds for length 65
 Itjava.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 54

java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 Tryresolve  pathof k.kallsyms]

--show-task-events
 Display task related events (

-e
   java.lang.StringIndexOutOfBoundsException: Range [23, 19) out of bounds for length 86

--show-namespace-Display cgroup events i.e. events of type PERF_RECORD_CGROUP
java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 69

--show-switch-events
 demangle:java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
Pjava.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 29

--java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 19
 Display lost java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 0

-
 Display finished eventsi.e. eventsof  .

--events
 Display bpf events i.e. -header-only

--show-cgroup-events
 Display cgroup events i.e

--show-text-pokeOptions for  instruction data   arejava.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
 Display   disable decodingentirely,use-o-itracejava.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
 PERF_RECORD_KSYMBOL the  pathfor  files for srclineoutput.

-demangle:
 Demangle symbol names tohuman readableform.Its enabledby default,
 disable with --no-demangle.

--demangle-kernel::
 Demangle kernel symbolnames to human readable form(or C+ )

--addr2line=<path>::
 Path to addr2line binary workloads  can  avery long callchain stack.

-
      will this  if   callchain  is .

--header-only
 Show only perfDefault 127

--itrace::
 Options for Use 9 decimal places when displaying time (i.e. show the nanoseconds)

include:.txt]

 To disable decoding entirely, use - Don'do ownership.

--full-Only analyze sampleswithin  time window start>s> Times
  the full for sourcefiles for srclineoutputjava.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56

--max-stack::
java.lang.StringIndexOutOfBoundsException: Range [10, 8) out of bounds for length 70
        beyond the specified depth will be ignored. t end of file. ranges canbe separatedbyspaces 
          loss and faster  especiallyfor
        java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 0
        Note that a%/n,b%/m,...' or 'ac%d...
        java.lang.StringIndexOutOfBoundsException: Range [27, 21) out of bounds for length 77

        Defaultp -t10/

--ns::
 Use 9 decimal places when displaying time (i.e. java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 26

-f::
--force::
 Don't do ownership validation.

-tjava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
 Onlyjava.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 69
 have
 ngis ',xy)thenanalysis t beginning ofthefile 
 stop time is not given (i.e. time string Set the maximum number of program blocks to print with java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 13
 to end of file. Multiple java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 46
 java.lang.StringIndexOutOfBoundsException: Range [18, 9) out of bounds for length 73

 Also support time percent with multiple time ranges. Time string is
 '/nb/.. r'%b%c%-d..'

       ,useful  ,for .
 Select the second 10% time
 perf script -If a callgraph belongs to an inlined function the inlinestack

 Select from 0% to 10% time slice:
 script--time 0%-10%

 Select the first java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 0
 perf script --time Show instruction stream in bytes (raw) or disassembled (disasm)

 Select from 0% to 10% and 30% to 40% slices:
 java.lang.StringIndexOutOfBoundsException: Range [29, 5) out of bounds for length 34

-java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 Set the maximum Run xed disassembler on output. Requires installing the xed disassembler.
 java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4

--reltime::
 Print time stamps Only java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 63

--deltatime::
  time tamps relative to previous event.

java.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 37
 Create perjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        printing to stdout, useful,

--inline::
 If a callgraph address belongs to an inlined function, the inline stack
 will be
  java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 35

--insn--soffjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
 Show instruction
 forintel_pt java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 63
 S-java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 37

-   with  LBRs, java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 64
 java.lang.StringIndexOutOfBoundsException: Range [8, 4) out of bounds for length 74

-S::
--perf record --call-graph lbr.
 Only consider the listed symbols. Symbols are typically a name
 but they may also be hexadecimal address.

 The  can recreate better call stacks than the default lbr java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
 any other address to filter the trace records

 For example, to select the symbol noploopjava.lang.StringIndexOutOfBoundsException: Range [50, 51) out of bounds for length 50
 perf:filestjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26

 Support filtering trace records by p-java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 54
 java.lang.StringIndexOutOfBoundsException: Range [44, 7) out of bounds for length 51

 The comparison order is:

 1. symbol name comparison
 2. symbol start address comparison.
 3. any hexadecimal address comparison.
 4. address range comparison (see --addr-range).

--addr-range::
       Use with -S or --symbols to list traced records within address range.

       For example, to list the traced records within the address range
       [0x4007a0, 0x0x4007a9]:
       perf script -S 0x4007a0 --addr-range 10

--dsos=::
 Only consider symbols in these DSOs.

--call-trace::
 Show call stream for intel_pt traces. The CPUs are interleaved, but
 can be filtered with -C.

--call-ret-trace::
 Show call and return stream for intel_pt traces.

--graph-function::
 For itrace only show specified functions and their callees for
 itrace. Multiple functions can be separated by comma.

--switch-on EVENT_NAME::
 Only consider events after this event is found.

--switch-off EVENT_NAME::
 Stop considering events after this event is found.

--show-on-off-events::
 Show the --switch-on/off events too.

--stitch-lbr::
 Show callgraph with stitched LBRs, which may have more complete
 callgraph. The perf.data file must have been obtained using
 perf record --call-graph lbr.
 Disabled by default. In common cases with call stack overflows,
 it can recreate better call stacks than the default lbr call stack
 output. But this approach is not foolproof. There can be cases
 where it creates incorrect call stacks from incorrect matches.
 The known limitations include exception handing such as
 setjmp/longjmp will have calls/returns not match.

:GMEXAMPLECMD: script
:GMEXAMPLESUBCMD:
include::guest-files.txt[]

SEE ALSO
--------
linkperf:perf-record[1], linkperf:perf-script-perl[1],
linkperf:perf-script-python[1], linkperf:perf-intel-pt[1],
linkperf:perf-dlfilter[1]

Messung
CHZG
809210090

¤ Dauer der Verarbeitung: 0.2 Sekunden  (vorverarbeitet am  2026-11-24) ¤

*© Formatika GbR, Deutschland