gpt4 book ai didi

android - 如何在 ftrace 中设置 trace_pipe 的缓冲区大小?

转载 作者:太空宇宙 更新时间:2023-11-04 12:32:06 26 4
gpt4 key购买 nike

基本上有两种读取 ftrace 日志的主要方法。要么读自 /sys/内核/调试/跟踪/跟踪或阅读 /sys/kernel/debug/tracing/trace_pipe

前者的缓冲区大小可以使用 /sys/kernel/debug/tracing/buffer_size_kb

是否可以为 trace_pipe 设置缓冲区大小。如果是,怎么办?

最佳答案

您不需要为 trace_pipe 设置缓冲区大小,因为它会提供实时跟踪并在没有可用数据时阻止。

阅读更多关于(https://www.kernel.org/doc/Documentation/trace/ftrace.txt):

跟踪管道:

The output is the same as the "trace" file but this
file is meant to be streamed with live tracing.
Reads from this file will block until new data is
retrieved. Unlike the "trace" file, this file is a
consumer. This means reading from this file causes
sequential reads to display more current data. Once
data is read from this file, it is consumed, and
will not be read again with a sequential read. The
"trace" file is static, and if the tracer is not
adding more data, it will display the same
information every time it is read.

关于android - 如何在 ftrace 中设置 trace_pipe 的缓冲区大小?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43031703/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com