Commit c0c50b54 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'tracing-fixes-for-linus' of...

Merge branch 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  tracing/function-profiler: do not free per cpu variable stat
  tracing/events: Move TRACE_SYSTEM outside of include guard
parents a376d446 6ab5d668
#undef TRACE_SYSTEM
#define TRACE_SYSTEM gfs2
#if !defined(_TRACE_GFS2_H) || defined(TRACE_HEADER_MULTI_READ) #if !defined(_TRACE_GFS2_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_GFS2_H #define _TRACE_GFS2_H
#include <linux/tracepoint.h> #include <linux/tracepoint.h>
#undef TRACE_SYSTEM
#define TRACE_SYSTEM gfs2
#define TRACE_INCLUDE_FILE trace_gfs2
#include <linux/fs.h> #include <linux/fs.h>
#include <linux/buffer_head.h> #include <linux/buffer_head.h>
#include <linux/dlmconstants.h> #include <linux/dlmconstants.h>
...@@ -403,5 +402,6 @@ TRACE_EVENT(gfs2_block_alloc, ...@@ -403,5 +402,6 @@ TRACE_EVENT(gfs2_block_alloc,
/* This part must be outside protection */ /* This part must be outside protection */
#undef TRACE_INCLUDE_PATH #undef TRACE_INCLUDE_PATH
#define TRACE_INCLUDE_PATH . #define TRACE_INCLUDE_PATH .
#define TRACE_INCLUDE_FILE trace_gfs2
#include <trace/define_trace.h> #include <trace/define_trace.h>
#undef TRACE_SYSTEM
#define TRACE_SYSTEM block
#if !defined(_TRACE_BLOCK_H) || defined(TRACE_HEADER_MULTI_READ) #if !defined(_TRACE_BLOCK_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_BLOCK_H #define _TRACE_BLOCK_H
...@@ -5,9 +8,6 @@ ...@@ -5,9 +8,6 @@
#include <linux/blkdev.h> #include <linux/blkdev.h>
#include <linux/tracepoint.h> #include <linux/tracepoint.h>
#undef TRACE_SYSTEM
#define TRACE_SYSTEM block
TRACE_EVENT(block_rq_abort, TRACE_EVENT(block_rq_abort,
TP_PROTO(struct request_queue *q, struct request *rq), TP_PROTO(struct request_queue *q, struct request *rq),
......
#if !defined(_TRACE_EXT4_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_EXT4_H
#undef TRACE_SYSTEM #undef TRACE_SYSTEM
#define TRACE_SYSTEM ext4 #define TRACE_SYSTEM ext4
#if !defined(_TRACE_EXT4_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_EXT4_H
#include <linux/writeback.h> #include <linux/writeback.h>
#include "../../../fs/ext4/ext4.h" #include "../../../fs/ext4/ext4.h"
#include "../../../fs/ext4/mballoc.h" #include "../../../fs/ext4/mballoc.h"
......
#undef TRACE_SYSTEM
#define TRACE_SYSTEM irq
#if !defined(_TRACE_IRQ_H) || defined(TRACE_HEADER_MULTI_READ) #if !defined(_TRACE_IRQ_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_IRQ_H #define _TRACE_IRQ_H
#include <linux/tracepoint.h> #include <linux/tracepoint.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#undef TRACE_SYSTEM
#define TRACE_SYSTEM irq
#define softirq_name(sirq) { sirq##_SOFTIRQ, #sirq } #define softirq_name(sirq) { sirq##_SOFTIRQ, #sirq }
#define show_softirq_name(val) \ #define show_softirq_name(val) \
__print_symbolic(val, \ __print_symbolic(val, \
......
#undef TRACE_SYSTEM
#define TRACE_SYSTEM jbd2
#if !defined(_TRACE_JBD2_H) || defined(TRACE_HEADER_MULTI_READ) #if !defined(_TRACE_JBD2_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_JBD2_H #define _TRACE_JBD2_H
#include <linux/jbd2.h> #include <linux/jbd2.h>
#include <linux/tracepoint.h> #include <linux/tracepoint.h>
#undef TRACE_SYSTEM
#define TRACE_SYSTEM jbd2
TRACE_EVENT(jbd2_checkpoint, TRACE_EVENT(jbd2_checkpoint,
TP_PROTO(journal_t *journal, int result), TP_PROTO(journal_t *journal, int result),
......
#undef TRACE_SYSTEM
#define TRACE_SYSTEM kmem
#if !defined(_TRACE_KMEM_H) || defined(TRACE_HEADER_MULTI_READ) #if !defined(_TRACE_KMEM_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_KMEM_H #define _TRACE_KMEM_H
#include <linux/types.h> #include <linux/types.h>
#include <linux/tracepoint.h> #include <linux/tracepoint.h>
#undef TRACE_SYSTEM
#define TRACE_SYSTEM kmem
/* /*
* The order of these masks is important. Matching masks will be seen * The order of these masks is important. Matching masks will be seen
* first and the left over flags will end up showing by themselves. * first and the left over flags will end up showing by themselves.
......
#undef TRACE_SYSTEM
#define TRACE_SYSTEM lockdep
#if !defined(_TRACE_LOCKDEP_H) || defined(TRACE_HEADER_MULTI_READ) #if !defined(_TRACE_LOCKDEP_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_LOCKDEP_H #define _TRACE_LOCKDEP_H
#include <linux/lockdep.h> #include <linux/lockdep.h>
#include <linux/tracepoint.h> #include <linux/tracepoint.h>
#undef TRACE_SYSTEM
#define TRACE_SYSTEM lockdep
#ifdef CONFIG_LOCKDEP #ifdef CONFIG_LOCKDEP
TRACE_EVENT(lock_acquire, TRACE_EVENT(lock_acquire,
......
#undef TRACE_SYSTEM
#define TRACE_SYSTEM sched
#if !defined(_TRACE_SCHED_H) || defined(TRACE_HEADER_MULTI_READ) #if !defined(_TRACE_SCHED_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_SCHED_H #define _TRACE_SCHED_H
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/tracepoint.h> #include <linux/tracepoint.h>
#undef TRACE_SYSTEM
#define TRACE_SYSTEM sched
/* /*
* Tracepoint for calling kthread_stop, performed to end a kthread: * Tracepoint for calling kthread_stop, performed to end a kthread:
*/ */
......
#undef TRACE_SYSTEM
#define TRACE_SYSTEM skb
#if !defined(_TRACE_SKB_H) || defined(TRACE_HEADER_MULTI_READ) #if !defined(_TRACE_SKB_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_SKB_H #define _TRACE_SKB_H
#include <linux/skbuff.h> #include <linux/skbuff.h>
#include <linux/tracepoint.h> #include <linux/tracepoint.h>
#undef TRACE_SYSTEM
#define TRACE_SYSTEM skb
/* /*
* Tracepoint for free an sk_buff: * Tracepoint for free an sk_buff:
*/ */
......
#undef TRACE_SYSTEM
#define TRACE_SYSTEM workqueue
#if !defined(_TRACE_WORKQUEUE_H) || defined(TRACE_HEADER_MULTI_READ) #if !defined(_TRACE_WORKQUEUE_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_WORKQUEUE_H #define _TRACE_WORKQUEUE_H
...@@ -5,9 +8,6 @@ ...@@ -5,9 +8,6 @@
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/tracepoint.h> #include <linux/tracepoint.h>
#undef TRACE_SYSTEM
#define TRACE_SYSTEM workqueue
TRACE_EVENT(workqueue_insertion, TRACE_EVENT(workqueue_insertion,
TP_PROTO(struct task_struct *wq_thread, struct work_struct *work), TP_PROTO(struct task_struct *wq_thread, struct work_struct *work),
......
...@@ -768,7 +768,7 @@ static struct tracer_stat function_stats __initdata = { ...@@ -768,7 +768,7 @@ static struct tracer_stat function_stats __initdata = {
.stat_show = function_stat_show .stat_show = function_stat_show
}; };
static void ftrace_profile_debugfs(struct dentry *d_tracer) static __init void ftrace_profile_debugfs(struct dentry *d_tracer)
{ {
struct ftrace_profile_stat *stat; struct ftrace_profile_stat *stat;
struct dentry *entry; struct dentry *entry;
...@@ -786,7 +786,6 @@ static void ftrace_profile_debugfs(struct dentry *d_tracer) ...@@ -786,7 +786,6 @@ static void ftrace_profile_debugfs(struct dentry *d_tracer)
* The files created are permanent, if something happens * The files created are permanent, if something happens
* we still do not free memory. * we still do not free memory.
*/ */
kfree(stat);
WARN(1, WARN(1,
"Could not allocate stat file for cpu %d\n", "Could not allocate stat file for cpu %d\n",
cpu); cpu);
...@@ -813,7 +812,7 @@ static void ftrace_profile_debugfs(struct dentry *d_tracer) ...@@ -813,7 +812,7 @@ static void ftrace_profile_debugfs(struct dentry *d_tracer)
} }
#else /* CONFIG_FUNCTION_PROFILER */ #else /* CONFIG_FUNCTION_PROFILER */
static void ftrace_profile_debugfs(struct dentry *d_tracer) static __init void ftrace_profile_debugfs(struct dentry *d_tracer)
{ {
} }
#endif /* CONFIG_FUNCTION_PROFILER */ #endif /* CONFIG_FUNCTION_PROFILER */
......
/*
* Notice that this file is not protected like a normal header.
* We also must allow for rereading of this file. The
*
* || defined(TRACE_HEADER_MULTI_READ)
*
* serves this purpose.
*/
#if !defined(_TRACE_EVENT_SAMPLE_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_EVENT_SAMPLE_H
/*
* All trace headers should include tracepoint.h, until we finally
* make it into a standard header.
*/
#include <linux/tracepoint.h>
/* /*
* If TRACE_SYSTEM is defined, that will be the directory created * If TRACE_SYSTEM is defined, that will be the directory created
* in the ftrace directory under /debugfs/tracing/events/<system> * in the ftrace directory under /debugfs/tracing/events/<system>
...@@ -34,10 +17,30 @@ ...@@ -34,10 +17,30 @@
* #define TRACE_INCLUDE_FILE trace-events-sample * #define TRACE_INCLUDE_FILE trace-events-sample
* *
* As we do an the bottom of this file. * As we do an the bottom of this file.
*
* Notice that TRACE_SYSTEM should be defined outside of #if
* protection, just like TRACE_INCLUDE_FILE.
*/ */
#undef TRACE_SYSTEM #undef TRACE_SYSTEM
#define TRACE_SYSTEM sample #define TRACE_SYSTEM sample
/*
* Notice that this file is not protected like a normal header.
* We also must allow for rereading of this file. The
*
* || defined(TRACE_HEADER_MULTI_READ)
*
* serves this purpose.
*/
#if !defined(_TRACE_EVENT_SAMPLE_H) || defined(TRACE_HEADER_MULTI_READ)
#define _TRACE_EVENT_SAMPLE_H
/*
* All trace headers should include tracepoint.h, until we finally
* make it into a standard header.
*/
#include <linux/tracepoint.h>
/* /*
* The TRACE_EVENT macro is broken up into 5 parts. * The TRACE_EVENT macro is broken up into 5 parts.
* *
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment