mirror of
https://github.com/gatieme/LDD-LinuxDeviceDrivers.git
synced 2026-11-09 08:38:04 +08:00
debug trace...
This commit is contained in:
1 parent
874c405db8
commit
7319658c33
3 files changed
+24
-24
No files matched your search
File renamed without changes.
@@ -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);
|
||||
Reference in new issue
Block a user