Lines Matching refs:stat
10 - [The stat command](#the-stat-command)
11 - [Select events to stat](#select-events-to-stat)
12 - [Select target to stat](#select-target-to-stat)
13 - [Decide how long to stat](#decide-how-long-to-stat)
44 Simpleperf has three main commands: stat, record and report.
46 The stat command gives a summary of how many events have happened in the profiled processes in a
77 The stat command: profiles processes and prints counter summary.
91 Below describes the most frequently used commands, which are list, stat, record and report.
119 ## The stat command
121 The stat command is used to get event counter values of the profiled processes. By passing options,
127 $ simpleperf stat -p 7394 --duration 10
140 ### Select events to stat
146 $ simpleperf stat -e cpu-cycles -p 11904 --duration 10
149 $ simpleperf stat -e cache-references,cache-misses -p 11904 --duration 10
152 When running the stat command, if the number of hardware events is larger than the number of
160 $ simpleperf stat -p 7394 -e cache-references,cache-references:u,cache-references:k \
181 $ simpleperf stat -p 7964 --group cache-references,cache-misses \
197 ### Select target to stat
205 $ simpleperf stat -p 11904,11905 --duration 10
208 $ simpleperf stat -t 11904,11905 --duration 10
210 # Start a child process running `ls`, and stat it.
211 $ simpleperf stat ls
215 $ simpleperf stat --app com.example.simpleperf.simpleperfexamplewithnative
218 $ simpleperf stat -a --duration 10
221 ### Decide how long to stat
229 $ simpleperf stat -p 11904 --duration 10
232 $ simpleperf stat ls
235 $ simpleperf stat -p 11904 --duration 10
247 # Print stat for process 11904 every 300ms.
248 $ simpleperf stat -p 11904 --duration 10 --interval 300
250 # Print system wide stat at interval of 300ms for 10 seconds. Note that system wide profiling needs
252 $ su 0 simpleperf stat -a --duration 10 --interval 300
258 to do a system wide stat.
263 $ su 0 simpleperf stat -e instructions:k,cache-misses -a --interval 300 --duration 15
271 By default, stat cmd outputs an event count sum for all monitored targets. But when `--per-thread`
272 option is used, stat cmd outputs an event count for each thread in monitored targets. It can be
273 used to find busy threads in a process or system wide. With `--per-thread` option, stat cmd opens
280 # stat cmd will be added to threads creating them.
281 $ simpleperf stat --per-thread -p 11904 --duration 1
285 $ su 0 simpleperf stat --per-thread -a --interval 1000 --interval-only-values
288 # created after stat cmd will be omitted.
289 $ su 0 simpleperf stat --per-thread -a --interval 1000 --interval-only-values --no-inherit
294 By default, stat cmd outputs an event count sum for all monitored cpu cores. But when `--per-core`
295 option is used, stat cmd outputs an event count for each core. It can be used to see how events
306 $ simpleperf stat --per-core -p 11904 --duration 1
319 $ su 0 simpleperf stat --per-core -a --duration 1
322 $ su 0 simpleperf stat -e cpu-cycles -a --per-thread --per-core --duration 1
356 The way to select target in record command is similar to that in the stat command.
404 The way to decide how long to monitor in record command is similar to that in the stat command.