debug trace...

This commit is contained in:
gatieme committed 2017-03-25 22:12:00 +08:00
1 parent 874c405db8
commit 7319658c33
3 files changed
+24 -24

No files matched your search

@@ -0,0 +1,24 @@
/*
* ftrace_demo.c
* http://www.ibm.com/developerworks/cn/linux/l-cn-ftrace3/
* http://lxr.free-electrons.com/source/include/trace/events/context_tracking.h 貌似没实现
*/
#include <linux/init.h>
#include <linux/module.h>
#include <linux/kernel.h>
MODULE_LICENSE("GPL");
static int ftrace_demo_init(void)
{
trace_printk("Can not see this in trace unless loaded for the second time\n");
return 0;
}
static void ftrace_demo_exit(void)
{
trace_printk("Module unloading\n");
}
module_init(ftrace_demo_init);
module_exit(ftrace_demo_exit);
@@ -1,24 +0,0 @@
/*
* ftrace_demo.c
* http://www.ibm.com/developerworks/cn/linux/l-cn-ftrace3/
* http://lxr.free-electrons.com/source/include/trace/events/context_tracking.h 貌似没实现
*/
#include <linux/init.h>
#include <linux/module.h>
#include <linux/kernel.h>
MODULE_LICENSE("GPL");
static int ftrace_demo_init(void)
{
trace_printk("Can not see this in trace unless loaded for the second time\n");
return 0;
}
static void ftrace_demo_exit(void)
{
trace_printk("Module unloading\n");
}
module_init(ftrace_demo_init);
module_exit(ftrace_demo_exit);