[英]No such device when I use adb to show /sys/kernel/debug/tracing/available_filter_functions
Guys.伙计们。
I am trying to study virtual memory management on Nexus 6P(An Old Android Smartphone)我正在尝试研究 Nexus 6P 上的虚拟 memory 管理(旧的 Android 智能手机)
Because the default kernel in AOSP didn't turn CONFIG_FUNCITON_TRACER on, and I can't use function tracer to study memory management related functions.因为AOSP中默认的kernel没有开启CONFIG_FUNCITON_TRACER,所以我无法使用function tracer去研究ZCD69B4957F06CD818D7BF3D61980DE相关功能管理
So I downloaded android kernel source code, turn on config_function_tracer and the other configs its depends, rebuilt kernel.所以我下载了 android kernel 源代码,打开 config_function_tracer 和其他配置依赖,重建 kernel。 Then I put the rebuilt kernel image file into aosp, rebuilt boot image, and flash the building output images into the phone.
然后我把重建的kernel镜像文件放到aosp中,重建启动镜像,把flash建筑物output镜像放到手机里。
the phone can boot normally, everything is ok but I can't 'cat /sys/kernel/debug/tracing/available_filter_functions' normally, it prompts "no such device".手机可以正常启动,一切正常,但我不能正常'cat /sys/kernel/debug/tracing/available_filter_functions',它提示“没有这样的设备”。
I checked the selinux label, and I turn off the selinux by command 'setenforce permissive', it can't help.我检查了selinux label,并通过命令'setenforce permissive'关闭了selinux,它无济于事。
can anyone help me to fix this problem?谁能帮我解决这个问题?
C:\Users\dvdface>adb shell
angler:/ # cd /sys/kernel/debug/tracing/
angler:/sys/kernel/debug/tracing # ls
README dyn_ftrace_total_info per_cpu set_ftrace_pid tracing_cpumask
available_events enabled_functions printk_formats set_graph_function tracing_on
available_filter_functions events saved_cmdlines trace tracing_thresh
available_tracers free_buffer saved_tgids trace_clock
buffer_size_kb instances set_event trace_marker
buffer_total_size_kb max_graph_depth set_ftrace_filter trace_options
current_tracer options set_ftrace_notrace trace_pipe
angler:/sys/kernel/debug/tracing # cat available_filter_functions
cat: available_filter_functions: No such device
I know why I got that error.我知道为什么会出现这个错误。
When building kernel with CONFIG_FUNCTION_TRACER, that need turn CONFIG_STRICT_MEMORY_RWX off使用 CONFIG_FUNCTION_TRACER 构建 kernel 时,需要关闭CONFIG_STRICT_MEMORY_RWX
in this document ( https://source.android.google.cn/devices/tech/debug/ftrace )在本文档中( https://source.android.google.cn/devices/tech/debug/ftrace )
in the chapter Using dynamic ftrace , it says to turn it off.在使用动态 ftrace一章中,它说要关闭它。
after I turn it off, everything is okay.我关掉它后,一切都好。
config STRICT_MEMORY_RWX
bool "restrict kernel memory permissions as much as possible"
help
If this is set, kernel text will be made RX, kernel data and stack
RW, rodata R (otherwise all of the kernel 1-to-1 mapping is
made RWX).
The tradeoff is that several sections are padded to
2M boundaries (because their permissions are different and
splitting the 2M pages into 4K ones causes TLB performance
problems), wasting memory.
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.