ftrace抢占\u深度字段未更新
我编写了一个示例程序来测试ftrace输出的ftrace抢占\u深度字段未更新,c,linux-kernel,preemption,ftrace,C,Linux Kernel,Preemption,Ftrace,我编写了一个示例程序来测试ftrace输出的抢占深度字段 从ftrace文档: preempt depth:禁用的preempt\u的级别 我的示例代码: #include <linux/kernel.h> #include <linux/module.h> MODULE_LICENSE("GPL"); static int test_hello_init(void) { trace_printk("%s: In init\n&
抢占深度
字段
从ftrace文档:
preempt depth
:禁用的preempt\u的级别
我的示例代码:
#include <linux/kernel.h>
#include <linux/module.h>
MODULE_LICENSE("GPL");
static int test_hello_init(void)
{
trace_printk("%s: In init\n", __func__);
preempt_disable();
trace_printk("Disabled preemption:%d\n", smp_processor_id());
preempt_enable();
trace_printk("Enabled preemption:%d\n", smp_processor_id());
return 0;
}
static void test_hello_exit(void)
{
trace_printk("%s: In exit\n", __func__);
}
module_init(test_hello_init);
module_exit(test_hello_exit);
为什么preempt depth
字段为空