android – 如何调试YAFFS?

我想打开YAFFS中提供的任何调试工具.我希望它能帮助我调试使用闪存时出现的问题.

linux内核中是否有任何配置可以帮助我调试YAFFS?

提前致谢. 最佳答案 根据文件有:

Yaffs has a lot of built in tracing to help debug and integrate. The
tracing is controlled by yaffs_traceMask bitmask which allows various
sets of tracing to be disabled or enabled at runtime.

The trace bits are specified in the yaffs_trace.h file.

The tracing mechanism has also been ‘hijacked’ to provide a control
mask for extra verification code when the YAFFS_TRACE_VERIFYxxx trace
bits are selected.

The tracing mechanism is readily integrated into the system via
printf-like statements. Tracing is all done through macros which allow
the strings to be converted into unicode or similar if need be.

它可以在运行时通过proc或sysfs接口进行操作,例如:

cat +os > /proc/yaffs # Enables YAFFS_TRACE_OS
cat -all+gc > /proc/yaffs # Disables everything then enable YAFFS_TRACE_GC
cat 0xf000 > /proc/yaffs # Set trace mask to specified bitmask.

有关详细信息,请参阅:http://www.yaffs.net/yaffs-tuning-and-configuration#Tracing_mechanism

点赞