Lines Matching +full:aux +full:- +full:bus

1 perf-record(1)
5 ----
6 perf-record - Run a command and record its profile into perf.data
9 --------
11 'perf record' [-e <EVENT> | --event=EVENT] [-a] <command>
12 'perf record' [-e <EVENT> | --event=EVENT] [-a] \-- <command> [<options>]
15 -----------
17 from it, into perf.data - without displaying anything.
23 -------
27 -e::
28 --event=::
31 - a symbolic event name (use 'perf list' to list all events)
33 - a raw PMU event in the form of rN where N is a hexadecimal value
36 /sys/bus/event_source/devices/cpu/format/*.
38 - a symbolic or raw PMU event followed by an optional colon
39 and a list of event modifiers, e.g., cpu-cycles:p. See the
40 linkperf:perf-list[1] man page for details on event modifiers.
42 - a symbolically formed PMU event like 'pmu/param1=0x3,param2/' where
44 /sys/bus/event_source/devices/<pmu>/format/*.
46 - a symbolically formed event like 'pmu/config=M,config1=N,config3=K/'
50 corresponding entries in /sys/bus/event_source/devices/<pmu>/format/*
52 /sys/bus/event_source/devices/<pmu>/format/*
57 - 'period': Set event sampling period
58 - 'freq': Set event sampling frequency
59 - 'time': Disable/enable time stamping. Acceptable values are 1 for
62 - 'call-graph': Disable/enable callgraph. Acceptable str are "fp" for
65 - 'stack-size': user stack size for dwarf mode
66 - 'name' : User defined event name. Single quotes (') may be used to
69 - 'aux-output': Generate AUX records instead of events. This requires
70 that an AUX area event is also provided.
71 - 'aux-sample-size': Set sample size for AUX area sampling. If the
72 '--aux-sample' option has been used, set aux-sample-size=0 to disable
73 AUX area sampling for the event.
75 See the linkperf:perf-list[1] man page for more parameters.
85 perf record -e some_event/@cfg1,@cfg2=config/ ...
92 - a hardware breakpoint event in the form of '\mem:addr[/len][:access]'
97 If you want to profile read-write accesses in 0x1000, just set
102 - a group of events surrounded by a pair of brace ("{event1,event2,...}").
104 prevent the shell interpretation. You also need to use --group on
107 --filter=<filter>::
108 Event filter. This option should follow an event selector (-e).
115 - tracepoint filters
117 In the case of tracepoints, multiple '--filter' options are combined
120 - address filters
123 address filters by specifying a non-zero value in
124 /sys/bus/event_source/devices/<pmu>/nr_addr_filters.
131 - 'filter': defines a region that will be traced.
132 - 'start': defines an address at which tracing will begin.
133 - 'stop': defines an address at which tracing will stop.
134 - 'tracestop': defines a region in which tracing will stop.
160 To see the filter that is passed, use the -v option.
168 - bpf filters
177 --filter 'period > 1000, cpu == 1'
179 --filter 'mem_op == load || mem_op == store, mem_lvl > l1'
187 Also user should request to collect that information (with -d option in
190 $ sudo perf record -e cycles --filter 'mem_op == load'
192 Hint: please add -d option to perf record.
219 --exclude-perf::
221 an event selector (-e) which selects tracepoint event(s). It adds a
223 '--filter' exists, the new filter expression will be combined with
226 -a::
227 --all-cpus::
228 System-wide collection from all CPUs (default if no target is specified).
230 -p::
231 --pid=::
234 -t::
235 --tid=::
238 --inherit.
240 -u::
241 --uid=::
244 -r::
245 --realtime=::
248 --no-buffering::
251 -c::
252 --count=::
255 -o::
256 --output=::
259 -i::
260 --no-inherit::
263 -F::
264 --freq=::
268 See --strict-freq.
270 --strict-freq::
273 -m::
274 --mmap-pages=::
276 specification with appended unit character - B/K/M/G. The
278 Also, by adding a comma, the number of mmap pages for AUX
281 -g::
282 Enables call-graph (stack chain/backtrace) recording for both
285 --call-graph::
286 Setup and enable call-graph (stack chain/backtrace) recording,
287 implies -g. Default is "fp" (for user space).
295 Valid options are "fp" (frame pointer), "dwarf" (DWARF's CFI -
300 --fomit-frame-pointer, using the "fp" method will produce bogus
312 "--call-graph dwarf,4096".
317 like "--call-graph fp,32".
319 -q::
320 --quiet::
323 -v::
324 --verbose::
327 -s::
328 --stat::
329 Record per-thread event counts. Use it with 'perf report -T' to see
332 -d::
333 --data::
336 --phys-data::
339 --data-page-size::
342 --code-page-size::
345 -T::
346 --timestamp::
347 Record the sample timestamps. Use it with 'perf report -D' to see the
350 -P::
351 --period::
354 --sample-cpu::
357 --sample-identifier::
362 -n::
363 --no-samples::
366 -R::
367 --raw-samples::
370 -C::
371 --cpu::
373 comma-separated list with no space: 0,1. Ranges of CPUs are specified with -: 0-2.
374 In per-thread mode with inheritance mode on (default), samples are captured only when
377 -B::
378 --no-buildid::
385 pathname. You can also set the "record.build-id" config variable to
388 -N::
389 --no-buildid-cache::
392 is sufficient. You can also set the "record.build-id" config variable to
393 'no-cache' to have the same effect.
395 -G name,...::
396 --cgroup name,...::
398 in per-cpu mode. The cgroup filesystem must be mounted. All threads belonging to
402 an empty cgroup (monitor all the time) using, e.g., -G foo,,bar. Cgroups must have
405 use '-e e1 -e e2 -G foo,foo' or just use '-e e1 -e e2 -G foo'.
408 command line can be used: 'perf stat -e cycles -G cgroup_name -a -e cycles'.
410 -b::
411 --branch-any::
413 This is a shortcut for --branch-filter any. See --branch-filter for more infos.
415 -j::
416 --branch-filter::
423 - any: any type of branches
424 - any_call: any function call or system call
425 - any_ret: any function return or system call return
426 - ind_call: any indirect branch
427 - ind_jmp: any indirect jump
428 - call: direct calls, including far (to/from kernel) calls
429 - u: only when the branch target is at the user level
430 - k: only when the branch target is in the kernel
431 - hv: only when the target is at the hypervisor level
432 - in_tx: only when the target is in a hardware transaction
433 - no_tx: only when the target is not in a hardware transaction
434 - abort_tx: only when the target is a hardware transaction abort
435 - cond: conditional branches
436 - call_stack: save call stack
437 - no_flags: don't save branch flags e.g prediction, misprediction etc
438 - no_cycles: don't save branch cycles
439 - hw_index: save branch hardware index
440 - save_type: save branch type during sampling in case binary is not available later
441 For the platforms with Intel Arch LBR support (12th-Gen+ client or
442 4th-Gen Xeon+ server), the save branch type is unconditionally enabled
444 - priv: save privilege state during sampling in case binary is not available later
452 The various filters must be specified as a comma separated list: --branch-filter any_ret,u,k
455 -W::
456 --weight::
461 --namespaces::
464 --all-cgroups::
467 --transaction::
470 --per-thread::
471 Use per-thread mmaps. By default per-cpu mmaps are created. This option
472 overrides that and uses per-thread mmaps. A side-effect of that is that
473 inheritance is automatically disabled. --per-thread is ignored with a warning
474 if combined with -a or -C options.
476 -D::
477 --delay=::
478 After starting the program, wait msecs before measuring (-1: start with events
480 -D 10-20,30-40 means wait 10 msecs, enable for 10 msecs, wait 10 msecs, enable
484 -I::
485 --intr-regs::
490 --intr-regs=\?. To name registers, pass a comma separated list such as
491 --intr-regs=ax,bx. The list of register is architecture dependent.
493 --user-regs::
494 Similar to -I, but capture user registers at sample time. To list the available
495 user registers use --user-regs=\?.
497 --running-time::
500 -k::
501 --clockid::
507 -S::
508 --snapshot::
509 Select AUX area tracing Snapshot Mode. This option is valid only with an
510 AUX area tracing event. Optionally, certain snapshot capturing parameters
513 - 'e': take one last snapshot on exit; guarantees that there is at least one
515 - <size>: if the PMU supports this, specify the desired snapshot size.
520 --aux-sample[=OPTIONS]::
521 Select AUX area sampling. At least one of the events selected by the -e option
522 must be an AUX area event. Samples on other events will be created containing
523 data from the AUX area. Optionally sample size may be specified, otherwise it
526 --proc-map-timeout::
527 When processing pre-existing threads /proc/XXX/mmap, it may take a long time,
531 --switch-events::
535 by the option --no-switch-events.
537 --vmlinux=PATH::
541 --buildid-all::
542 Record build-id of all DSOs regardless whether it's actually hit or not.
544 --buildid-mmap::
545 Record build ids in mmap2 events, disables build id cache (implies --no-buildid).
547 --aio[=n]::
552 --affinity=mode::
555 - node - thread affinity mask is set to NUMA node cpu mask of the processed mmap buffer
556 - cpu - thread affinity mask is set to cpu of the processed mmap buffer
558 --mmap-flush=number::
567 possibly compressed (-z) and written to the output, perf.data or pipe.
577 -z::
578 --compression-level[=n]::
579 Produce compressed trace using specified level n (default: 1 - fastest compression,
580 22 - smallest trace)
582 --all-kernel::
585 --all-user::
588 --kernel-callchains::
592 --user-callchains::
596 Don't use both --kernel-callchains and --user-callchains at the same time or no
599 --timestamp-filename
602 --timestamp-boundary::
605 --switch-output[=mode]::
609 - "signal" - when receiving a SIGUSR2 (default value) or
610 - <size> - when reaching the size threshold, size is expected to
611 be a number with appended unit character - B/K/M/G
612 - <time> - when reaching the time threshold, size is expected to
613 be a number with appended unit character - s/m/h/d
616 on your configuration - the number and size of your ring
617 buffers (-m). It is generally more precise for higher sizes
624 Implies --timestamp-filename, --no-buildid and --no-buildid-cache.
628 --switch-output --no-no-buildid --no-no-buildid-cache
630 --switch-output-event::
631 Events that will cause the switch of the perf.data file, auto-selecting
632 --switch-output=signal, the results are similar as internally the side band
635 Uses the same syntax as --event, it will just not be recorded, serving only to
636 switch the perf.data file as soon as the --switch-output event is processed by
643 --switch-max-files=N::
645 When rotating perf.data with --switch-output, only keep N files.
647 --dry-run::
648 Parse options then exit. --dry-run can be used to detect errors in cmdline
651 'perf record --dry-run -e' can act as a BPF script compiler if llvm.dump-obj
654 --synth=TYPE::
657 task status for pre-existing threads.
660 choice in this option. For example, --synth=no would have MMAP events for
665 - 'task' - synthesize FORK and COMM events for each task
666 - 'mmap' - synthesize MMAP events for each process (implies 'task')
667 - 'cgroup' - synthesize CGROUP events for each cgroup
668 - 'all' - synthesize all events (default)
669 - 'no' - do not synthesize any of the above events
671 --tail-synthesize::
672 Instead of collecting non-sample events (for example, fork, comm, mmap) at
674 The collected non-sample events reflects the status of the system when
677 --overwrite::
683 When '--overwrite' and '--switch-output' are used perf records and drops
689 config terms. For example: 'cycles/overwrite/' and 'instructions/no-overwrite/'.
691 Implies --tail-synthesize.
693 --kcore::
696 --max-size=<size>::
698 appended unit character - B/K/M/G
700 --num-thread-synthesize::
705 --pfm-events events::
707 including support for event filters. For example '--pfm-events
710 events cannot be mixed together. The latter must be used with the -e
711 option. The -e option and this one can be mixed and matched. Events
715 --control=fifo:ctl-fifo[,ack-fifo]::
716 --control=fd:ctl-fd[,ack-fd]::
717 ctl-fifo / ack-fifo are opened and used as ctl-fd / ack-fd as follows.
718 Listen on ctl-fd descriptor for command to control measurement.
722 - 'enable' : enable events
723 - 'disable' : disable events
724 - 'enable name' : enable event 'name'
725 - 'disable name' : disable event 'name'
726 - 'snapshot' : AUX area tracing snapshot).
727 - 'stop' : stop perf record
728 - 'ping' : ping
729 - 'evlist [-v|-g|-F] : display all events
731 -F Show just the sample frequency used for each event.
732 -v Show all fields.
733 -g Show event group information.
735 Measurements can be started with events disabled using --delay=-1 option. Optionally
736 send control command completion ('ack\n') to ack-fd descriptor to synchronize with the
745 test -p ${ctl_fifo} && unlink ${ctl_fifo}
750 test -p ${ctl_ack_fifo} && unlink ${ctl_ack_fifo}
754 perf record -D -1 -e cpu-cycles -a \
755 --control fd:${ctl_fd},${ctl_fd_ack} \
756 -- sleep 30 &
759 sleep 5 && echo 'enable' >&${ctl_fd} && read -u ${ctl_fd_ack} e1 && echo "enabled(${e1})"
760 sleep 10 && echo 'disable' >&${ctl_fd} && read -u ${ctl_fd_ack} d1 && echo "disabled(${d1})"
762 exec {ctl_fd_ack}>&-
765 exec {ctl_fd}>&-
768 wait -n ${perf_pid}
771 --threads=<spec>::
785 0,2-4/2-4:1,5-7/5-7
788 the first thread monitors CPUs 0 and 2-4 with the affinity mask 2-4,
789 the second monitors CPUs 1 and 5-7 with the affinity mask 5-7.
794 - cpu - create new data streaming thread for every monitored cpu
795 - core - create new thread to monitor CPUs grouped by a core
796 - package - create new thread to monitor CPUs grouped by a package
797 - numa - create new threed to monitor CPUs grouped by a NUMA domain
800 order not to spawn multiple per-cpu streaming threads but still avoid LOST
803 filtered through the mask provided by -C option.
805 --debuginfod[=URLs]::
814 --off-cpu::
815 Enable off-cpu profiling with BPF. The BPF program will collect
817 as sample data of a software event named "offcpu-time". The
824 include::intel-hybrid.txt[]
827 --------
828 linkperf:perf-stat[1], linkperf:perf-list[1], linkperf:perf-intel-pt[1]