mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
tracepoints: add DECLARE_TRACE() and DEFINE_TRACE()
Impact: API *CHANGE*. Must update all tracepoint users. Add DEFINE_TRACE() to tracepoints to let them declare the tracepoint structure in a single spot for all the kernel. It helps reducing memory consumption, especially when declaring a lot of tracepoints, e.g. for kmalloc tracing. *API CHANGE WARNING*: now, DECLARE_TRACE() must be used in headers for tracepoint declarations rather than DEFINE_TRACE(). This is the sane way to do it. The name previously used was misleading. Updates scheduler instrumentation to follow this API change. Signed-off-by: Mathieu Desnoyers <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
parent
32f8574277
commit
7e066fb870
11 changed files with 66 additions and 25 deletions
|
|
@ -4,10 +4,10 @@
|
|||
#include <linux/proc_fs.h> /* for struct inode and struct file */
|
||||
#include <linux/tracepoint.h>
|
||||
|
||||
DEFINE_TRACE(subsys_event,
|
||||
DECLARE_TRACE(subsys_event,
|
||||
TPPROTO(struct inode *inode, struct file *file),
|
||||
TPARGS(inode, file));
|
||||
DEFINE_TRACE(subsys_eventb,
|
||||
DECLARE_TRACE(subsys_eventb,
|
||||
TPPROTO(void),
|
||||
TPARGS());
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -13,6 +13,9 @@
|
|||
#include <linux/proc_fs.h>
|
||||
#include "tp-samples-trace.h"
|
||||
|
||||
DEFINE_TRACE(subsys_event);
|
||||
DEFINE_TRACE(subsys_eventb);
|
||||
|
||||
struct proc_dir_entry *pentry_example;
|
||||
|
||||
static int my_open(struct inode *inode, struct file *file)
|
||||
|
|
|
|||
Loading…
Reference in a new issue