同步操作将从 OpenHarmony/docs 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
bytrace is a tool for you to trace processes and analyze performance. It encapsulates and extends the kernel ftrace and supports event tracking in the user space. With bytrace, you can open a user-space or kernel-space label you want to view (run the bytrace -l command to query all the supported labels) and run the --trace_begin and -o filename (or --output filename) commands to capture traces and dump them to a specified file.
bytrace supports the following commands:
Table 1 Commands
Option | Description |
---|---|
-h, --help | Views the help text for bytrace. |
-b n, --buffer_size n | Sets the size of the buffer (KB) for storing and reading traces. The default buffer size is 2048 KB. |
-t n, --time n | Sets the bytrace uptime in seconds, which depends on the time required for analysis. |
--trace_clock clock | Sets the type of the clock for adding a timestamp to a trace, which can be boot (default), global, mono, uptime, or perf. |
--trace_begin | Starts capturing traces. |
--trace_dump | Dumps traces to a specified position (console where you run this command by default). |
--trace_finish | Stops capturing traces and dumps traces to a specified position (console where you run this command by default). |
-l, --list_categories | Lists the bytrace categories supported by the device. |
--overwrite | Sets the action to take when the buffer is full. If this option is used, the latest traces are discarded; if this option is not used, the earliest traces are discarded (default). |
-o filename, --output filename | Outputs traces to a specified file. |
-z | Compresses a captured trace. |
The following are some examples of bytrace commands:
bytrace -l
Alternatively, run the following command to query the supported bytrace categories:
bytrace --list_categories
bytrace -b 4096 -t 10 --overwrite ability > /data/mytrace.ftrace
bytrace --trace_clock mono -b 4096 -t 10 --overwrite ability > /data/mytrace.ftrace
bytrace -z -b 4096 -t 10 --overwrite ability > /data/mytrace.ftrace
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。