-a
- |
-Samples all processes and threads in the system.
- |
-
---exclude-hiperf
- |
-Leaves the hiperf process not sampled.
- |
-
--c
- |
-Specifies the IDs of the CPUs to sample.
- |
-
---cpu-limit <percent>
- |
-Specifies the maximum percentage of CPU resources occupied by the sampling.
- |
-
--d <sec>
- |
-Specifies the sampling duration, in seconds.
- |
-
--f <freq>
- |
-Specifies how often a sampling event is triggered. The default value is 4000 times/second.
-Note: A higher value indicates heavier CPU load but more sampling data.
- |
-
---period <num>
- |
-Specifies the number of occurrence times of an event that triggers a sampling. That is, a sampling is performed once when the event occurs the specified number of times.
- |
-
--e
- |
-Specifies the events to monitor. You can run the list command to list all the events supported. event:u indicates an event in the user space, and event:k indicates an event in the kernel space.
- |
-
--g
- |
-Specifies a group of events to monitor. The events in the same group are monitored by the same PMU.
- |
-
---no-inherit
- |
-Leaves the sub-threads of the target thread or process not monitored.
- |
-
--p
- |
-Specifies the processes to monitor.
- |
-
--t
- |
-Specifies the threads to monitor.
- |
-
---offcpu
- |
-Monitors the CPU scheduling event, which is equivalent to the --period 1 -e sched:sched_switch event.
- |
-
--j <branch_filter1>[,branch_filter2]...
- |
-Monitors the branch prediction events. Branch prediction tries to predict the next instruction to be executed if there are multiple if else conditions.
- |
-
--s / --call-stack <fp \| dwarf[,size]>
- |
-Sets the user stack unwinding mode, which can be fp or dwarf. If dwarf is used, you can specify the size of the user stack to be sampled. The default value is 65528.
- |
-
---delay-unwind
- |
-Delays the stack unwinding till the sampling is complete.
- |
-
---disable-unwind
- |
-Disables stack unwinding. The user register and stack data is stored in perf.data for offline stack unwinding.
- |
-
---disable-callstack-expend
- |
-Disables the unwound call stack information from being combined or extended.
- |
-
---clockid <clock type>
- |
-Sets the clock source for the sampling data. The options are monotonic, boottime, and realtime.
- |
-
---symbol-dir <dir>
- |
-Specifies the directory of the symbol table. The specified symbol table will be preferentially used in stack unwinding.
- |
-
--m <mmap pages>
- |
-Specifies the cache size, in pages. The default value is 1024. The parameter value must be a power of 2. The value range is [2 - 1024].
-Note: A higher value indicates a lower event loss rate but higher memory usage.
- |
-
---app <package name>
- |
-Specifies the bundle name of the target application to be sampled. The default timeout interval is 10 seconds. If the specified application does not exist, the hiperf process exits after 10 seconds.
- |
-
---data-limit <SIZE[K|M|G]>
- |
-Specifies the maximum size of the sampling result, in KB, MB, or GB. By default, there is no limit on the size.
- |
-
--o <output file name>
- |
-Specifies the name of the sampling result file. It is /data/local/tmp/perf.data by default.
- |
-
--z
- |
-Saves the output file in .gzip format.
- |
-
---verbose
- |
-Displays detailed log information during sampling.
- |
-
-
-