~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/tools/perf/Documentation/perf-bench.txt

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /tools/perf/Documentation/perf-bench.txt (Version linux-6.12-rc7) and /tools/perf/Documentation/perf-bench.txt (Version linux-5.5.19)


  1 perf-bench(1)                                       1 perf-bench(1)
  2 =============                                       2 =============
  3                                                     3 
  4 NAME                                                4 NAME
  5 ----                                                5 ----
  6 perf-bench - General framework for benchmark s      6 perf-bench - General framework for benchmark suites
  7                                                     7 
  8 SYNOPSIS                                            8 SYNOPSIS
  9 --------                                            9 --------
 10 [verse]                                            10 [verse]
 11 'perf bench' [<common options>] <subsystem> <s     11 'perf bench' [<common options>] <subsystem> <suite> [<options>]
 12                                                    12 
 13 DESCRIPTION                                        13 DESCRIPTION
 14 -----------                                        14 -----------
 15 This 'perf bench' command is a general framewo     15 This 'perf bench' command is a general framework for benchmark suites.
 16                                                    16 
 17 COMMON OPTIONS                                     17 COMMON OPTIONS
 18 --------------                                     18 --------------
 19 -r::                                               19 -r::
 20 --repeat=::                                        20 --repeat=::
 21 Specify number of times to repeat the run (def !!  21 Specify amount of times to repeat the run (default 10).
 22                                                    22 
 23 -f::                                               23 -f::
 24 --format=::                                        24 --format=::
 25 Specify format style.                              25 Specify format style.
 26 Current available format styles are:               26 Current available format styles are:
 27                                                    27 
 28 'default'::                                        28 'default'::
 29 Default style. This is mainly for human readin     29 Default style. This is mainly for human reading.
 30 ---------------------                              30 ---------------------
 31 % perf bench sched pipe                      #     31 % perf bench sched pipe                      # with no style specified
 32 (executing 1000000 pipe operations between two     32 (executing 1000000 pipe operations between two tasks)
 33         Total time:5.855 sec                       33         Total time:5.855 sec
 34                 5.855061 usecs/op                  34                 5.855061 usecs/op
 35                 170792 ops/sec                     35                 170792 ops/sec
 36 ---------------------                              36 ---------------------
 37                                                    37 
 38 'simple'::                                         38 'simple'::
 39 This simple style is friendly for automated        39 This simple style is friendly for automated
 40 processing by scripts.                             40 processing by scripts.
 41 ---------------------                              41 ---------------------
 42 % perf bench --format=simple sched pipe      #     42 % perf bench --format=simple sched pipe      # specified simple
 43 5.988                                              43 5.988
 44 ---------------------                              44 ---------------------
 45                                                    45 
 46 SUBSYSTEM                                          46 SUBSYSTEM
 47 ---------                                          47 ---------
 48                                                    48 
 49 'sched'::                                          49 'sched'::
 50         Scheduler and IPC mechanisms.              50         Scheduler and IPC mechanisms.
 51                                                    51 
 52 'syscall'::                                    << 
 53         System call performance (throughput).  << 
 54                                                << 
 55 'mem'::                                            52 'mem'::
 56         Memory access performance.                 53         Memory access performance.
 57                                                    54 
 58 'numa'::                                           55 'numa'::
 59         NUMA scheduling and MM benchmarks.         56         NUMA scheduling and MM benchmarks.
 60                                                    57 
 61 'futex'::                                          58 'futex'::
 62         Futex stressing benchmarks.                59         Futex stressing benchmarks.
 63                                                    60 
 64 'epoll'::                                          61 'epoll'::
 65         Eventpoll (epoll) stressing benchmarks     62         Eventpoll (epoll) stressing benchmarks.
 66                                                    63 
 67 'internals'::                                  << 
 68         Benchmark internal perf functionality. << 
 69                                                << 
 70 'uprobe'::                                     << 
 71         Benchmark overhead of uprobe + BPF.    << 
 72                                                << 
 73 'all'::                                            64 'all'::
 74         All benchmark subsystems.                  65         All benchmark subsystems.
 75                                                    66 
 76 SUITES FOR 'sched'                                 67 SUITES FOR 'sched'
 77 ~~~~~~~~~~~~~~~~~~                                 68 ~~~~~~~~~~~~~~~~~~
 78 *messaging*::                                      69 *messaging*::
 79 Suite for evaluating performance of scheduler      70 Suite for evaluating performance of scheduler and IPC mechanisms.
 80 Based on hackbench by Rusty Russell.               71 Based on hackbench by Rusty Russell.
 81                                                    72 
 82 Options of *messaging*                             73 Options of *messaging*
 83 ^^^^^^^^^^^^^^^^^^^^^^                             74 ^^^^^^^^^^^^^^^^^^^^^^
 84 -p::                                               75 -p::
 85 --pipe::                                           76 --pipe::
 86 Use pipe() instead of socketpair()                 77 Use pipe() instead of socketpair()
 87                                                    78 
 88 -t::                                               79 -t::
 89 --thread::                                         80 --thread::
 90 Be multi thread instead of multi process           81 Be multi thread instead of multi process
 91                                                    82 
 92 -g::                                               83 -g::
 93 --group=::                                         84 --group=::
 94 Specify number of groups                           85 Specify number of groups
 95                                                    86 
 96 -l::                                               87 -l::
 97 --nr_loops=::                                      88 --nr_loops=::
 98 Specify number of loops                            89 Specify number of loops
 99                                                    90 
100 Example of *messaging*                             91 Example of *messaging*
101 ^^^^^^^^^^^^^^^^^^^^^^                             92 ^^^^^^^^^^^^^^^^^^^^^^
102                                                    93 
103 ---------------------                              94 ---------------------
104 % perf bench sched messaging                 #     95 % perf bench sched messaging                 # run with default
105 options (20 sender and receiver processes per      96 options (20 sender and receiver processes per group)
106 (10 groups == 400 processes run)                   97 (10 groups == 400 processes run)
107                                                    98 
108       Total time:0.308 sec                         99       Total time:0.308 sec
109                                                   100 
110 % perf bench sched messaging -t -g 20        #    101 % perf bench sched messaging -t -g 20        # be multi-thread, with 20 groups
111 (20 sender and receiver threads per group)        102 (20 sender and receiver threads per group)
112 (20 groups == 800 threads run)                    103 (20 groups == 800 threads run)
113                                                   104 
114       Total time:0.582 sec                        105       Total time:0.582 sec
115 ---------------------                             106 ---------------------
116                                                   107 
117 *pipe*::                                          108 *pipe*::
118 Suite for pipe() system call.                     109 Suite for pipe() system call.
119 Based on pipe-test-1m.c by Ingo Molnar.           110 Based on pipe-test-1m.c by Ingo Molnar.
120                                                   111 
121 Options of *pipe*                                 112 Options of *pipe*
122 ^^^^^^^^^^^^^^^^^                                 113 ^^^^^^^^^^^^^^^^^
123 -l::                                              114 -l::
124 --loop=::                                         115 --loop=::
125 Specify number of loops.                          116 Specify number of loops.
126                                                   117 
127 -G::                                           << 
128 --cgroups=::                                   << 
129 Names of cgroups for sender and receiver, sepa << 
130 This is useful to check cgroup context switchi << 
131 Note that perf doesn't create nor delete the c << 
132 make sure that the cgroups exist and are acces << 
133                                                << 
134                                                << 
135 Example of *pipe*                                 118 Example of *pipe*
136 ^^^^^^^^^^^^^^^^^                                 119 ^^^^^^^^^^^^^^^^^
137                                                   120 
138 ---------------------                             121 ---------------------
139 % perf bench sched pipe                           122 % perf bench sched pipe
140 (executing 1000000 pipe operations between two    123 (executing 1000000 pipe operations between two tasks)
141                                                   124 
142         Total time:8.091 sec                      125         Total time:8.091 sec
143                 8.091833 usecs/op                 126                 8.091833 usecs/op
144                 123581 ops/sec                    127                 123581 ops/sec
145                                                   128 
146 % perf bench sched pipe -l 1000              #    129 % perf bench sched pipe -l 1000              # loop 1000
147 (executing 1000 pipe operations between two ta    130 (executing 1000 pipe operations between two tasks)
148                                                   131 
149         Total time:0.016 sec                      132         Total time:0.016 sec
150                 16.948000 usecs/op                133                 16.948000 usecs/op
151                 59004 ops/sec                     134                 59004 ops/sec
152                                                << 
153 % perf bench sched pipe -G AAA,BBB             << 
154 (executing 1000000 pipe operations between cgr << 
155 # Running 'sched/pipe' benchmark:              << 
156 # Executed 1000000 pipe operations between two << 
157                                                << 
158      Total time: 6.886 [sec]                   << 
159                                                << 
160        6.886208 usecs/op                       << 
161          145217 ops/sec                        << 
162                                                << 
163 ---------------------                             135 ---------------------
164                                                   136 
165 SUITES FOR 'syscall'                           << 
166 ~~~~~~~~~~~~~~~~~~                             << 
167 *basic*::                                      << 
168 Suite for evaluating performance of core syste << 
169 This uses a single thread simply doing getppid << 
170 cached by glibc.                               << 
171                                                << 
172                                                << 
173 SUITES FOR 'mem'                                  137 SUITES FOR 'mem'
174 ~~~~~~~~~~~~~~~~                                  138 ~~~~~~~~~~~~~~~~
175 *memcpy*::                                        139 *memcpy*::
176 Suite for evaluating performance of simple mem    140 Suite for evaluating performance of simple memory copy in various ways.
177                                                   141 
178 Options of *memcpy*                               142 Options of *memcpy*
179 ^^^^^^^^^^^^^^^^^^^                               143 ^^^^^^^^^^^^^^^^^^^
180 -l::                                              144 -l::
181 --size::                                          145 --size::
182 Specify size of memory to copy (default: 1MB).    146 Specify size of memory to copy (default: 1MB).
183 Available units are B, KB, MB, GB and TB (case    147 Available units are B, KB, MB, GB and TB (case insensitive).
184                                                   148 
185 -f::                                              149 -f::
186 --function::                                      150 --function::
187 Specify function to copy (default: default).      151 Specify function to copy (default: default).
188 Available functions are depend on the architec    152 Available functions are depend on the architecture.
189 On x86-64, x86-64-unrolled, x86-64-movsq and x    153 On x86-64, x86-64-unrolled, x86-64-movsq and x86-64-movsb are supported.
190                                                   154 
191 -l::                                              155 -l::
192 --nr_loops::                                      156 --nr_loops::
193 Repeat memcpy invocation this number of times.    157 Repeat memcpy invocation this number of times.
194                                                   158 
195 -c::                                              159 -c::
196 --cycles::                                        160 --cycles::
197 Use perf's cpu-cycles event instead of gettime    161 Use perf's cpu-cycles event instead of gettimeofday syscall.
198                                                   162 
199 *memset*::                                        163 *memset*::
200 Suite for evaluating performance of simple mem    164 Suite for evaluating performance of simple memory set in various ways.
201                                                   165 
202 Options of *memset*                               166 Options of *memset*
203 ^^^^^^^^^^^^^^^^^^^                               167 ^^^^^^^^^^^^^^^^^^^
204 -l::                                              168 -l::
205 --size::                                          169 --size::
206 Specify size of memory to set (default: 1MB).     170 Specify size of memory to set (default: 1MB).
207 Available units are B, KB, MB, GB and TB (case    171 Available units are B, KB, MB, GB and TB (case insensitive).
208                                                   172 
209 -f::                                              173 -f::
210 --function::                                      174 --function::
211 Specify function to set (default: default).       175 Specify function to set (default: default).
212 Available functions are depend on the architec    176 Available functions are depend on the architecture.
213 On x86-64, x86-64-unrolled, x86-64-stosq and x    177 On x86-64, x86-64-unrolled, x86-64-stosq and x86-64-stosb are supported.
214                                                   178 
215 -l::                                              179 -l::
216 --nr_loops::                                      180 --nr_loops::
217 Repeat memset invocation this number of times.    181 Repeat memset invocation this number of times.
218                                                   182 
219 -c::                                              183 -c::
220 --cycles::                                        184 --cycles::
221 Use perf's cpu-cycles event instead of gettime    185 Use perf's cpu-cycles event instead of gettimeofday syscall.
222                                                   186 
223 SUITES FOR 'numa'                                 187 SUITES FOR 'numa'
224 ~~~~~~~~~~~~~~~~~                                 188 ~~~~~~~~~~~~~~~~~
225 *mem*::                                           189 *mem*::
226 Suite for evaluating NUMA workloads.              190 Suite for evaluating NUMA workloads.
227                                                   191 
228 SUITES FOR 'futex'                                192 SUITES FOR 'futex'
229 ~~~~~~~~~~~~~~~~~~                                193 ~~~~~~~~~~~~~~~~~~
230 *hash*::                                          194 *hash*::
231 Suite for evaluating hash tables.                 195 Suite for evaluating hash tables.
232                                                   196 
233 *wake*::                                          197 *wake*::
234 Suite for evaluating wake calls.                  198 Suite for evaluating wake calls.
235                                                   199 
236 *wake-parallel*::                                 200 *wake-parallel*::
237 Suite for evaluating parallel wake calls.         201 Suite for evaluating parallel wake calls.
238                                                   202 
239 *requeue*::                                       203 *requeue*::
240 Suite for evaluating requeue calls.               204 Suite for evaluating requeue calls.
241                                                   205 
242 *lock-pi*::                                       206 *lock-pi*::
243 Suite for evaluating futex lock_pi calls.         207 Suite for evaluating futex lock_pi calls.
244                                                   208 
245 SUITES FOR 'epoll'                                209 SUITES FOR 'epoll'
246 ~~~~~~~~~~~~~~~~~~                                210 ~~~~~~~~~~~~~~~~~~
247 *wait*::                                          211 *wait*::
248 Suite for evaluating concurrent epoll_wait cal    212 Suite for evaluating concurrent epoll_wait calls.
249                                                   213 
250 *ctl*::                                           214 *ctl*::
251 Suite for evaluating multiple epoll_ctl calls.    215 Suite for evaluating multiple epoll_ctl calls.
252                                                << 
253 SUITES FOR 'internals'                         << 
254 ~~~~~~~~~~~~~~~~~~~~~~                         << 
255 *synthesize*::                                 << 
256 Suite for evaluating perf's event synthesis pe << 
257                                                   216 
258 SEE ALSO                                          217 SEE ALSO
259 --------                                          218 --------
260 linkperf:perf[1]                                  219 linkperf:perf[1]
                                                      

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php