hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/tools/perf/Documentation/perf-config.txt
....@@ -40,6 +40,10 @@
4040 The file '$(sysconfdir)/perfconfig' can be used to
4141 store a system-wide default configuration.
4242
43
+One an disable reading config files by setting the PERF_CONFIG environment
44
+variable to /dev/null, or provide an alternate config file by setting that
45
+variable.
46
+
4347 When reading or writing, the values are read from the system and user
4448 configuration files by default, and options '--system' and '--user'
4549 can be used to tell the command to read from or write to only that location.
....@@ -120,6 +124,10 @@
120124 children = true
121125 group = true
122126
127
+ [llvm]
128
+ dump-obj = true
129
+ clang-opt = -g
130
+
123131 You can hide source code of annotate feature setting the config to false with
124132
125133 % perf config annotate.hide_src_code=true
....@@ -199,6 +207,12 @@
199207 Colors for headers in the output of a sub-commands (top, report).
200208 Default values are 'white', 'blue'.
201209
210
+core.*::
211
+ core.proc-map-timeout::
212
+ Sets a timeout (in milliseconds) for parsing /proc/<pid>/maps files.
213
+ Can be overridden by the --proc-map-timeout option on supported
214
+ subcommands. The default timeout is 500ms.
215
+
202216 tui.*, gtk.*::
203217 Subcommands that can be configured here are 'top', 'report' and 'annotate'.
204218 These values are booleans, for example:
....@@ -225,9 +239,13 @@
225239 set buildid.dir to /dev/null. The default is $HOME/.debug
226240
227241 annotate.*::
228
- These options work only for TUI.
229242 These are in control of addresses, jump function, source code
230243 in lines of assembly code from a specific program.
244
+
245
+ annotate.disassembler_style:
246
+ Use this to change the default disassembler style to some other value
247
+ supported by binutils, such as "intel", see the '-M' option help in the
248
+ 'objdump' man page.
231249
232250 annotate.hide_src_code::
233251 If a program which is analyzed has source code,
....@@ -255,6 +273,8 @@
255273 │ mov (%rdi),%rdx
256274 │ return n;
257275
276
+ This option works with tui, stdio2 browsers.
277
+
258278 annotate.use_offset::
259279 Basing on a first address of a loaded function, offset can be used.
260280 Instead of using original addresses of assembly code,
....@@ -272,6 +292,8 @@
272292 Default is true. This option is only applied to TUI.
273293
274294 368:│ mov 0x8(%r14),%rdi
295
+
296
+ This option works with tui, stdio2 browsers.
275297
276298 annotate.jump_arrows::
277299 There can be jump instruction among assembly code.
....@@ -292,6 +314,8 @@
292314 │1330: mov %r15,%r10
293315 │1333: cmp %r15,%r14
294316
317
+ This option works with tui browser.
318
+
295319 annotate.show_linenr::
296320 When showing source code if this option is 'true',
297321 line numbers are printed as below.
....@@ -311,6 +335,8 @@
311335 │ array++;
312336 │ }
313337
338
+ This option works with tui, stdio2 browsers.
339
+
314340 annotate.show_nr_jumps::
315341 Let's see a part of assembly code.
316342
....@@ -320,6 +346,8 @@
320346 Default is 'false'.
321347
322348 │1 1382: movb $0x1,-0x270(%rbp)
349
+
350
+ This option works with tui, stdio2 browsers.
323351
324352 annotate.show_total_period::
325353 To compare two records on an instruction base, with this option
....@@ -334,10 +362,29 @@
334362
335363 99.93 │ mov %eax,%eax
336364
365
+ This option works with tui, stdio2, stdio browsers.
366
+
367
+ annotate.show_nr_samples::
368
+ By default perf annotate shows percentage of samples. This option
369
+ can be used to print absolute number of samples. Ex, when set as
370
+ false:
371
+
372
+ Percent│
373
+ 74.03 │ mov %fs:0x28,%rax
374
+
375
+ When set as true:
376
+
377
+ Samples│
378
+ 6 │ mov %fs:0x28,%rax
379
+
380
+ This option works with tui, stdio2, stdio browsers.
381
+
337382 annotate.offset_level::
338383 Default is '1', meaning just jump targets will have offsets show right beside
339384 the instruction. When set to '2' 'call' instructions will also have its offsets
340385 shown, 3 or higher will show offsets for all instructions.
386
+
387
+ This option works with tui, stdio2 browsers.
341388
342389 hist.*::
343390 hist.percentage::
....@@ -363,14 +410,16 @@
363410 This option is only applied to TUI.
364411
365412 call-graph.*::
366
- When sub-commands 'top' and 'report' work with -g/—-children
367
- there're options in control of call-graph.
413
+ The following controls the handling of call-graphs (obtained via the
414
+ -g/--call-graph options).
368415
369416 call-graph.record-mode::
370
- The record-mode can be 'fp' (frame pointer), 'dwarf' and 'lbr'.
371
- The value of 'dwarf' is effective only if perf detect needed library
372
- (libunwind or a recent version of libdw).
373
- 'lbr' only work for cpus that support it.
417
+ The mode for user space can be 'fp' (frame pointer), 'dwarf'
418
+ and 'lbr'. The value 'dwarf' is effective only if libunwind
419
+ (or a recent version of libdw) is present on the system;
420
+ the value 'lbr' only works for certain cpus. The method for
421
+ kernel space is controlled not by this option but by the
422
+ kernel config (CONFIG_UNWINDER_*).
374423
375424 call-graph.dump-size::
376425 The size of stack to dump in order to do post-unwinding. Default is 8192 (byte).
....@@ -476,6 +525,12 @@
476525 column by default.
477526 The default is 'true'.
478527
528
+ top.call-graph::
529
+ This is identical to 'call-graph.record-mode', except it is
530
+ applicable only for 'top' subcommand. This option ONLY setup
531
+ the unwind method. To enable 'perf top' to actually use it,
532
+ the command line option -g must be specified.
533
+
479534 man.*::
480535 man.viewer::
481536 This option can assign a tool to view manual pages when 'help'
....@@ -503,6 +558,16 @@
503558 But if this option is 'no-cache', it will not update the build-id cache.
504559 'skip' skips post-processing and does not update the cache.
505560
561
+ record.call-graph::
562
+ This is identical to 'call-graph.record-mode', except it is
563
+ applicable only for 'record' subcommand. This option ONLY setup
564
+ the unwind method. To enable 'perf record' to actually use it,
565
+ the command line option -g must be specified.
566
+
567
+ record.aio::
568
+ Use 'n' control blocks in asynchronous (Posix AIO) trace writing
569
+ mode ('n' default: 1, max: 4).
570
+
506571 diff.*::
507572 diff.order::
508573 This option sets the number of columns to sort the result.
....@@ -515,6 +580,121 @@
515580 Possible values are 'delta', 'delta-abs', 'ratio' and
516581 'wdiff'. Default is 'delta'.
517582
583
+trace.*::
584
+ trace.add_events::
585
+ Allows adding a set of events to add to the ones specified
586
+ by the user, or use as a default one if none was specified.
587
+ The initial use case is to add augmented_raw_syscalls.o to
588
+ activate the 'perf trace' logic that looks for syscall
589
+ pointer contents after the normal tracepoint payload.
590
+
591
+ trace.args_alignment::
592
+ Number of columns to align the argument list, default is 70,
593
+ use 40 for the strace default, zero to no alignment.
594
+
595
+ trace.no_inherit::
596
+ Do not follow children threads.
597
+
598
+ trace.show_arg_names::
599
+ Should syscall argument names be printed? If not then trace.show_zeros
600
+ will be set.
601
+
602
+ trace.show_duration::
603
+ Show syscall duration.
604
+
605
+ trace.show_prefix::
606
+ If set to 'yes' will show common string prefixes in tables. The default
607
+ is to remove the common prefix in things like "MAP_SHARED", showing just "SHARED".
608
+
609
+ trace.show_timestamp::
610
+ Show syscall start timestamp.
611
+
612
+ trace.show_zeros::
613
+ Do not suppress syscall arguments that are equal to zero.
614
+
615
+ trace.tracepoint_beautifiers::
616
+ Use "libtraceevent" to use that library to augment the tracepoint arguments,
617
+ "libbeauty", the default, to use the same argument beautifiers used in the
618
+ strace-like sys_enter+sys_exit lines.
619
+
620
+ftrace.*::
621
+ ftrace.tracer::
622
+ Can be used to select the default tracer when neither -G nor
623
+ -F option is not specified. Possible values are 'function' and
624
+ 'function_graph'.
625
+
626
+llvm.*::
627
+ llvm.clang-path::
628
+ Path to clang. If omit, search it from $PATH.
629
+
630
+ llvm.clang-bpf-cmd-template::
631
+ Cmdline template. Below lines show its default value. Environment
632
+ variable is used to pass options.
633
+ "$CLANG_EXEC -D__KERNEL__ -D__NR_CPUS__=$NR_CPUS "\
634
+ "-DLINUX_VERSION_CODE=$LINUX_VERSION_CODE " \
635
+ "$CLANG_OPTIONS $PERF_BPF_INC_OPTIONS $KERNEL_INC_OPTIONS " \
636
+ "-Wno-unused-value -Wno-pointer-sign " \
637
+ "-working-directory $WORKING_DIR " \
638
+ "-c \"$CLANG_SOURCE\" -target bpf $CLANG_EMIT_LLVM -O2 -o - $LLVM_OPTIONS_PIPE"
639
+
640
+ llvm.clang-opt::
641
+ Options passed to clang.
642
+
643
+ llvm.kbuild-dir::
644
+ kbuild directory. If not set, use /lib/modules/`uname -r`/build.
645
+ If set to "" deliberately, skip kernel header auto-detector.
646
+
647
+ llvm.kbuild-opts::
648
+ Options passed to 'make' when detecting kernel header options.
649
+
650
+ llvm.dump-obj::
651
+ Enable perf dump BPF object files compiled by LLVM.
652
+
653
+ llvm.opts::
654
+ Options passed to llc.
655
+
656
+samples.*::
657
+
658
+ samples.context::
659
+ Define how many ns worth of time to show
660
+ around samples in perf report sample context browser.
661
+
662
+scripts.*::
663
+
664
+ Any option defines a script that is added to the scripts menu
665
+ in the interactive perf browser and whose output is displayed.
666
+ The name of the option is the name, the value is a script command line.
667
+ The script gets the same options passed as a full perf script,
668
+ in particular -i perfdata file, --cpu, --tid
669
+
670
+convert.*::
671
+
672
+ convert.queue-size::
673
+ Limit the size of ordered_events queue, so we could control
674
+ allocation size of perf data files without proper finished
675
+ round events.
676
+stat.*::
677
+
678
+ stat.big-num::
679
+ (boolean) Change the default for "--big-num". To make
680
+ "--no-big-num" the default, set "stat.big-num=false".
681
+
682
+intel-pt.*::
683
+
684
+ intel-pt.cache-divisor::
685
+
686
+ intel-pt.mispred-all::
687
+ If set, Intel PT decoder will set the mispred flag on all
688
+ branches.
689
+
690
+auxtrace.*::
691
+
692
+ auxtrace.dumpdir::
693
+ s390 only. The directory to save the auxiliary trace buffer
694
+ can be changed using this option. Ex, auxtrace.dumpdir=/tmp.
695
+ If the directory does not exist or has the wrong file type,
696
+ the current directory is used.
697
+
518698 SEE ALSO
519699 --------
520700 linkperf:perf[1]