TRACE_EVENT for modules
Subsystems (9)
Steven Rostedt
maintainerIngo,
This is the long awaited TRACE_EVENT for modules patch series.
Not only does it allow for modules to use the TRACE_EVENT infrastructure, but it also cleans up the way TRACE_EVENTS are used in core kernel code.
Some of the clean ups are:
Removal of the two headers per trace system. No need to have include/trace/sched.h and include/linux/sched_event_types.h All the changes go into include/trace/sched.h. But note that how that file is made is important. One could look at the sched.h file, or skb.h, lockdep.h and kmem.h as an example.
Another clean up is that I got rid of the need to add these files into include/trace/trace_events.h and include/trace/trace_event_types.h. Those files have been deleted.
Another clean up is that we do not need to do the DEFINE_TRACE(name) for every TRACE_EVENT (or TRACE_FORMAT and DECLARE_TRACE) in the include/trace/ header. One only needs to define a CREATE_TRACE_POINTS in one C file to do the work for them:
#define CREATE_TRACE_POINTS
#inlude <trace/sched.h>
That will do the DEFINE_TRACE for every defined trace item in sched.h.
I also removed the trace_events_stage_X.h files and combined them into a include/trace/ftrace.h file.
I made sure that each stage did not break the code. Well, I tested kmem at each level. kmem seems to be the most complex of the trace events.
At the end I made a module and tested it out as well. I even removed the module as the trace was running. Note, if you remove the file and view the trace, you will get something like:
<...>-4197 [002] 205.524992: Unknown type 47
<...>-4197 [002] 206.523325: Unknown type 47
<...>-4197 [002] 207.521665: Unknown type 47
<...>-4197 [002] 208.520118: Unknown type 47The unknown type will appear. This is because the format to print the string is in the module itself. When the code is removed, ftrace has no way of knowing how to print that string out. But if you had a user space tool that read the format file first, it could still parse the binary data just fine.
Please pull the latest tip/tracing/core tree, which can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace.git
tip/tracing/core
Steven Rostedt (8):
tracing: consolidate trace and trace_event headers
tracing: create automated trace defines
tracing: make trace_seq operations available for core kernel tracing/events: move declarations from trace directory to core include tracing/events: move the ftrace event tracing code to core tracing/events: convert event call sites to use a link list tracing/events: add export symbols for trace events in modules tracing/events: add support for modules to TRACE_EVENT
----
include/linux/ftrace_event.h | 150 +++++++++++ include/linux/module.h | 4 + include/linux/trace_seq.h | 91 +++++++ include/linux/tracepoint.h | 9 +- include/trace/define_trace.h | 79 ++++++ include/trace/ftrace.h | 493 +++++++++++++++++++++++++++++++++++ include/trace/irq.h | 56 ++++- include/trace/irq_event_types.h | 55 ---- include/trace/kmem.h | 189 +++++++++++++- include/trace/lockdep.h | 55 ++++- include/trace/lockdep_event_types.h | 57 ---- include/trace/sched.h | 336 +++++++++++++++++++++++- include/trace/sched_event_types.h | 337 ------------------------ include/trace/skb.h | 39 +++- include/trace/skb_event_types.h | 38 --- include/trace/trace_event_types.h | 7 - include/trace/trace_events.h | 7 - kernel/exit.c | 4 - kernel/fork.c | 2 - kernel/irq/handle.c | 7 +- kernel/kthread.c | 3 - kernel/lockdep.c | 12 +- kernel/module.c | 7 + kernel/sched.c | 10 +- kernel/signal.c | 2 - kernel/softirq.c | 3 - kernel/trace/Makefile | 1 - kernel/trace/events.c | 14 - kernel/trace/trace.c | 3 + kernel/trace/trace.h | 148 +---------- kernel/trace/trace_event_profile.c | 4 +- kernel/trace/trace_events.c | 170 +++++++++---- kernel/trace/trace_events_filter.c | 10 +- kernel/trace/trace_events_stage_1.h | 39 --- kernel/trace/trace_events_stage_2.h | 170 ------------ kernel/trace/trace_events_stage_3.h | 279 -------------------- kernel/trace/trace_output.c | 3 + kernel/trace/trace_output.h | 30 +-- mm/util.c | 11 +- net/core/net-traces.c | 4 +- 40 files changed, 1648 insertions(+), 1290 deletions(-)
Steven Rostedt
maintainerPATCH 1/8 tracing: consolidate trace and trace_event headers
From: Steven Rostedt <[email protected]>
Impact: clean up
Neil Horman (et. al.) criticized the way the trace events were broken up into two files. The reason for that was that ftrace needed to separate out the declarations from where the #include <linux/tracepoint.h> was used. It then dawned on me that the tracepoint.h header only needs to define the TRACE_EVENT macro if it is not already defined.
The solution is simply to test if TRACE_EVENT is defined, and if it is not then the linux/tracepoint.h header can define it. This change consolidates all the <traces>.h and <traces>_event_types.h into the <traces>.h file.
--- include/linux/tracepoint.h | 9 +- include/trace/irq.h | 51 +++++- include/trace/irq_event_types.h | 55 ------ include/trace/kmem.h | 189 +++++++++++++++++++- include/trace/lockdep.h | 52 +++++- include/trace/lockdep_event_types.h | 57 ------ include/trace/sched.h | 333 ++++++++++++++++++++++++++++++++++- include/trace/sched_event_types.h | 337 ----------------------------------- include/trace/skb.h | 36 ++++- include/trace/skb_event_types.h | 38 ---- include/trace/trace_event_types.h | 7 - kernel/trace/events.c | 1 + kernel/trace/trace_events_stage_1.h | 4 +- kernel/trace/trace_events_stage_2.h | 8 +- kernel/trace/trace_events_stage_3.h | 4 +- 15 files changed, 663 insertions(+), 518 deletions(-) delete mode 100644 include/trace/irq_event_types.h delete mode 100644 include/trace/lockdep_event_types.h delete mode 100644 include/trace/sched_event_types.h delete mode 100644 include/trace/skb_event_types.h delete mode 100644 include/trace/trace_event_types.h
include/linux/tracepoint.h +8 -1
@@ -31,6 +31,8 @@ struct tracepoint {* Keep in sync with vmlinux.lds.h. */ +#ifndef DECLARE_TRACE + #define TP_PROTO(args...) args #define TP_ARGS(args...) args
@@ -114,6 +116,7 @@ static inline void tracepoint_update_probe_range(struct tracepoint *begin, struct tracepoint *end) { }#endif /* CONFIG_TRACEPOINTS */ +#endif /* DECLARE_TRACE */ /* * Connect a probe to a tracepoint.
@@ -154,10 +157,13 @@ static inline void tracepoint_synchronize_unregister(void) } #define PARAMS(args...) args + +#ifndef TRACE_FORMAT #define TRACE_FORMAT (name, proto, args, fmt) \ DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)) +#endif - +#ifndef TRACE_EVENT /* * For use with the TRACE_EVENT macro: *
@@ -262,5 +268,6 @@ static inline void tracepoint_synchronize_unregister(void)#define TRACE_EVENT (name, proto, args, struct, assign, print) \ DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)) +#endif #endif
include/trace/irq.h +48 -3
57 lines not on this page · raw message
include/trace/irq_event_types.h deleted +0 -55
55 lines not on this page · raw message
include/trace/kmem.h +186 -3
195 lines not on this page · raw message
include/trace/lockdep.h +50 -2
59 lines not on this page · raw message
include/trace/lockdep_event_types.h deleted +0 -57
57 lines not on this page · raw message
include/trace/sched.h +330 -3
339 lines not on this page · raw message
include/trace/sched_event_types.h deleted +0 -337
337 lines not on this page · raw message
include/trace/skb.h +32 -4
@@ -1,9 +1,37 @@ -#ifndef _TRACE_SKB_H_ -#define _TRACE_SKB_H_ +#if !defined(_TRACE_SKB_H) || defined(TRACE_HEADER_MULTI_READ ) +#define _TRACE_SKB_H#include <linux/skbuff.h> #include <linux/tracepoint.h> -#include <trace/skb_event_types.h> +#undef TRACE_SYSTEM +#define TRACE_SYSTEM skb -#endif +/* +* Tracepoint for free an sk_buff: +*/ +TRACE_EVENT (kfree_skb, + + TP_PROTO(struct sk_buff *skb, void *location), + +TP_ARGS (skb, location), + +TP_STRUCT__entry ( + __field( void *, skbaddr ) + __field( unsigned short, protocol ) + __field( void *, location ) + ), + +TP_fast_assign ( + __entry->skbaddr = skb; + if (skb) { + __entry->protocol = ntohs(skb->protocol); + } + __entry->location = location; + ), + +TP_printk ("skbaddr=%p protocol=%u location=%p" , + __entry->skbaddr, __entry->protocol, __entry->location) +); + +#endif /* _TRACE_SKB_H */
include/trace/skb_event_types.h deleted +0 -38
@@ -1,38 +0,0 @@ - -/* use <trace/skb.h> instead */ -#ifndef TRACE_EVENT -# error Do not include this file directly. -# error Unless you know what you are doing. -#endif - -#undef TRACE_SYSTEM -#define TRACE_SYSTEM skb - -/* -* Tracepoint for free an sk_buff: -*/ -TRACE_EVENT (kfree_skb, - - TP_PROTO(struct sk_buff *skb, void *location), - -TP_ARGS (skb, location), - -TP_STRUCT__entry ( - __field( void *, skbaddr ) - __field( unsigned short, protocol ) - __field( void *, location ) - ), - -TP_fast_assign ( - __entry->skbaddr = skb; - if (skb) { - __entry->protocol = ntohs(skb->protocol); - } - __entry->location = location; - ), - -TP_printk ("skbaddr=%p protocol=%u location=%p" , - __entry->skbaddr, __entry->protocol, __entry->location) -); - -#undef TRACE_SYSTEM
include/trace/trace_event_types.h deleted +0 -7
@@ -1,7 +0,0 @@ -/* trace/<type>_event_types.h here */ - -#include <trace/sched_event_types.h> -#include <trace/irq_event_types.h> -#include <trace/lockdep_event_types.h> -#include <trace/skb_event_types.h> -#include <trace/kmem_event_types.h>
kernel/trace/events.c +1 -0
@@ -8,6 +8,7 @@#include "trace_output.h" +#define TRACE_HEADER_MULTI_READ #include "trace_events_stage_1.h" #include "trace_events_stage_2.h" #include "trace_events_stage_3.h"
kernel/trace/trace_events_stage_1.h +2 -2
@@ -1,7 +1,7 @@/* * Stage 1 of the trace events. * -* Override the macros in <trace/trace_event_types.h> to include the following: +* Override the macros in <trace/trace_events.h> to include the following: * * struct ftrace_raw_<call> { * struct trace_entry ent;
@@ -36,4 +36,4 @@ }; \ static struct ftrace_event_call event_##name -#include <trace/trace_event_types.h> +#include <trace/trace_events.h>
kernel/trace/trace_events_stage_2.h +4 -4
@@ -1,7 +1,7 @@/* * Stage 2 of the trace events. * -* Override the macros in <trace/trace_event_types.h> to include the following: +* Override the macros in <trace/trace_events.h> to include the following: * * enum print_line_t * ftrace_raw_output_<call>(struct trace_iterator *iter, int flags)
@@ -64,7 +64,7 @@ ftrace_raw_output_##call(struct trace_iterator *iter, int flags) \return TRACE_TYPE_HANDLED ; \ } -#include <trace/trace_event_types.h> +#include <trace/trace_events.h> /* * Setup the showing format of trace point.
@@ -128,7 +128,7 @@ ftrace_format_##call(struct trace_seq *s) \return ret; \ } -#include <trace/trace_event_types.h> +#include <trace/trace_events.h> #undef __field#define __field (type, item) \
@@ -167,4 +167,4 @@ ftrace_define_fields_##call(void) \return ret; \ } -#include <trace/trace_event_types.h> +#include <trace/trace_events.h>
kernel/trace/trace_events_stage_3.h +2 -2
@@ -1,7 +1,7 @@/* * Stage 3 of the trace events. * -* Override the macros in <trace/trace_event_types.h> to include the following: +* Override the macros in <trace/trace_events.h> to include the following: * * static void ftrace_event_<call>(proto) * {
@@ -272,7 +272,7 @@ __attribute__((section("_ftrace_events"))) event_##call = { \ _TRACE_PROFILE_INIT(call) \ } -#include <trace/trace_event_types.h> +#include <trace/trace_events.h> #undef _TRACE_PROFILE#undef _TRACE_PROFILE_INIT
Signature · 3 lines
1.6.2.1 --
Re: [PATCH 1/8] tracing: consolidate trace and trace_event headers
Quoted 37 lines · Steven Rostedt
From: Steven Rostedt <[email protected]>
Impact: clean up
Neil Horman (et. al.) criticized the way the trace events were broken up into two files. The reason for that was that ftrace needed to separate out the declarations from where the #include <
linux/tracepoint.h> was used. It then dawned on me that thetracepoint.hheader only needs to define theTRACE_EVENTmacro if it is not already defined.The solution is simply to test if
TRACE_EVENTis defined, and if it is not then thelinux/tracepoint.hheader can define it. This change consolidates all the <traces>.h and <traces>_event_types.h into the <traces>.h file.Reported-by Neil Horman <[email protected]>Reported-by Theodore Tso <[email protected]>Reported-by Jiaying Zhang <[email protected]>Cc Zhaolei <[email protected]>Cc Frederic Weisbecker <[email protected]>Cc Peter Zijlstra <[email protected]>Cc Jason Baron <[email protected]>Cc Mathieu Desnoyers <[email protected]>Signed-off-by Steven Rostedt <[email protected]>--- include/linux/tracepoint.h | 9 +- include/trace/irq.h | 51 +++++- include/trace/irq_event_types.h | 55 ------ include/trace/kmem.h | 189 +++++++++++++++++++- include/trace/lockdep.h | 52 +++++- include/trace/lockdep_event_types.h | 57 ------ include/trace/sched.h | 333 ++++++++++++++++++++++++++++++++++- include/trace/sched_event_types.h | 337 ----------------------------------- include/trace/skb.h | 36 ++++- include/trace/skb_event_types.h | 38 ---- include/trace/trace_event_types.h | 7 - kernel/trace/events.c | 1 + kernel/trace/trace_events_stage_1.h | 4 +-
Quoted 8 lines
kernel/trace/trace_events_stage_2.h | 8 +- kernel/trace/trace_events_stage_3.h | 4 +- 15 files changed, 663 insertions(+), 518 deletions(-) delete mode 100644 include/trace/irq_event_types.h delete mode 100644 include/trace/lockdep_event_types.h delete mode 100644 include/trace/sched_event_types.h delete mode 100644 include/trace/skb_event_types.h delete mode 100644 include/trace/trace_event_types.h
I don't know if you use git-format-patch without -M or something else specific to git pull request. But it looks like the renames are not detected here, so it's a bit hard to know what have been actually happened or deleted in the end result.
Thanks,
Frederic.
Quoted 1,377 lines
include/linux/tracepoint.h +8
-1@@ -31,6 +31,8 @@ struct tracepoint {* Keep in sync with vmlinux.lds.h. */ +#ifndef DECLARE_TRACE + #define TP_PROTO(args...) args #define TP_ARGS(args...) args@@ -114,6 +116,7 @@ static inline void tracepoint_update_probe_range(struct tracepoint *begin, struct tracepoint *end) { }#endif /* CONFIG_TRACEPOINTS */ +#endif /* DECLARE_TRACE */ /* * Connect a probe to a tracepoint. @@ -154,10 +157,13 @@ static inline void tracepoint_synchronize_unregister(void) } #define PARAMS(args...) args + +#ifndef TRACE_FORMAT #define TRACE_FORMAT (name, proto, args, fmt) \ DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)) +#endif - +#ifndef TRACE_EVENT /* * For use with the TRACE_EVENT macro: * @@ -262,5 +268,6 @@ static inline void tracepoint_synchronize_unregister(void)#define TRACE_EVENT (name, proto, args, struct, assign, print) \ DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)) +#endif #endif include/trace/irq.h +48
-3@@ -1,9 +1,54 @@ -#ifndef _TRACE_IRQ_H +#if !defined(_TRACE_IRQ_H) || defined(TRACE_HEADER_MULTI_READ )#define _TRACE_IRQ_H -#include <linux/interrupt.h> #include <linux/tracepoint.h> +#include <linux/interrupt.h> + +#undef TRACE_SYSTEM +#define TRACE_SYSTEM irq + +/* +* Tracepoint for entry of interrupt handler: +*/ +TRACE_FORMAT (irq_handler_entry, + TP_PROTO(int irq, struct irqaction *action), +TP_ARGS (irq, action), +TP_FMT ("irq=%d handler=%s" , irq, action->name) + ); + +/* +* Tracepoint for return of an interrupt handler: +*/ +TRACE_EVENT (irq_handler_exit, + + TP_PROTO(int irq, struct irqaction *action, int ret), + +TP_ARGS (irq, action, ret), + +TP_STRUCT__entry ( + __field( int, irq ) +__field ( int, ret ) + ), + +TP_fast_assign ( + __entry->irq = irq; + __entry->ret = ret; + ), + +TP_printk ("irq=%d return=%s" , + __entry->irq, __entry->ret ?"handled" :"unhandled" ) +); + +TRACE_FORMAT (softirq_entry, + TP_PROTO(struct softirq_action *h, struct softirq_action *vec), +TP_ARGS (h, vec), +TP_FMT ("softirq=%d action=%s" , (int )(h - vec), softirq_to_name[h-vec]) + ); -#include <trace/irq_event_types.h> +TRACE_FORMAT (softirq_exit, + TP_PROTO(struct softirq_action *h, struct softirq_action *vec), +TP_ARGS (h, vec), +TP_FMT ("softirq=%d action=%s" , (int )(h - vec), softirq_to_name[h-vec]) + );#endif include/trace/irq_event_types.h deleted +0
-55@@ -1,55 +0,0 @@ - -/* use <trace/irq.h> instead */ -#ifndef TRACE_FORMAT -# error Do not include this file directly. -# error Unless you know what you are doing. -#endif - -#undef TRACE_SYSTEM -#define TRACE_SYSTEM irq - -/* -* Tracepoint for entry of interrupt handler: -*/ -TRACE_FORMAT (irq_handler_entry, - TP_PROTO(int irq, struct irqaction *action), -TP_ARGS (irq, action), -TP_FMT ("irq=%d handler=%s" , irq, action->name) - ); - -/* -* Tracepoint for return of an interrupt handler: -*/ -TRACE_EVENT (irq_handler_exit, - - TP_PROTO(int irq, struct irqaction *action, int ret), - -TP_ARGS (irq, action, ret), - -TP_STRUCT__entry ( - __field( int, irq ) -__field ( int, ret ) - ), - -TP_fast_assign ( - __entry->irq = irq; - __entry->ret = ret; - ), - -TP_printk ("irq=%d return=%s" , - __entry->irq, __entry->ret ?"handled" :"unhandled" ) -); - -TRACE_FORMAT (softirq_entry, - TP_PROTO(struct softirq_action *h, struct softirq_action *vec), -TP_ARGS (h, vec), -TP_FMT ("softirq=%d action=%s" , (int )(h - vec), softirq_to_name[h-vec]) - ); - -TRACE_FORMAT (softirq_exit, - TP_PROTO(struct softirq_action *h, struct softirq_action *vec), -TP_ARGS (h, vec), -TP_FMT ("softirq=%d action=%s" , (int )(h - vec), softirq_to_name[h-vec]) - ); - -#undef TRACE_SYSTEMinclude/trace/kmem.h +186
-3@@ -1,9 +1,192 @@ -#ifndef _TRACE_KMEM_H +#if !defined(_TRACE_KMEM_H) || defined(TRACE_HEADER_MULTI_READ )#define _TRACE_KMEM_H#include <linux/types.h> #include <linux/tracepoint.h> -#include <trace/kmem_event_types.h> +#undef TRACE_SYSTEM +#define TRACE_SYSTEM kmem -#endif /* _TRACE_KMEM_H */ +TRACE_EVENT (kmalloc, + + TP_PROTO(unsigned long call_site, + const void *ptr, + size_t bytes_req, + size_t bytes_alloc, + gfp_t gfp_flags), + +TP_ARGS (call_site, ptr, bytes_req, bytes_alloc, gfp_flags), + +TP_STRUCT__entry ( + __field( unsigned long, call_site ) + __field( const void *, ptr ) + __field( size_t, bytes_req ) + __field( size_t, bytes_alloc ) +__field ( gfp_t, gfp_flags ) + ), + +TP_fast_assign ( + __entry->call_site = call_site; + __entry->ptr = ptr; + __entry->bytes_req = bytes_req; + __entry->bytes_alloc = bytes_alloc; + __entry->gfp_flags = gfp_flags; + ), + +TP_printk ("call_site=%lx ptr=%p bytes_req=%zu bytes_alloc=%zu gfp_flags=%08x" , + __entry->call_site, + __entry->ptr, + __entry->bytes_req, + __entry->bytes_alloc, + __entry->gfp_flags) +); + +TRACE_EVENT (kmem_cache_alloc, + + TP_PROTO(unsigned long call_site, + const void *ptr, + size_t bytes_req, + size_t bytes_alloc, + gfp_t gfp_flags), + +TP_ARGS (call_site, ptr, bytes_req, bytes_alloc, gfp_flags), + +TP_STRUCT__entry ( + __field( unsigned long, call_site ) + __field( const void *, ptr ) + __field( size_t, bytes_req ) + __field( size_t, bytes_alloc ) +__field ( gfp_t, gfp_flags ) + ), + +TP_fast_assign ( + __entry->call_site = call_site; + __entry->ptr = ptr; + __entry->bytes_req = bytes_req; + __entry->bytes_alloc = bytes_alloc; + __entry->gfp_flags = gfp_flags; + ), + +TP_printk ("call_site=%lx ptr=%p bytes_req=%zu bytes_alloc=%zu gfp_flags=%08x" , + __entry->call_site, + __entry->ptr, + __entry->bytes_req, + __entry->bytes_alloc, + __entry->gfp_flags) +); + +TRACE_EVENT (kmalloc_node, + + TP_PROTO(unsigned long call_site, + const void *ptr, + size_t bytes_req, + size_t bytes_alloc, + gfp_t gfp_flags, + int node), + +TP_ARGS (call_site, ptr, bytes_req, bytes_alloc, gfp_flags, node), + +TP_STRUCT__entry ( + __field( unsigned long, call_site ) + __field( const void *, ptr ) + __field( size_t, bytes_req ) + __field( size_t, bytes_alloc ) + __field( gfp_t, gfp_flags ) +__field ( int, node ) + ), + +TP_fast_assign ( + __entry->call_site = call_site; + __entry->ptr = ptr; + __entry->bytes_req = bytes_req; + __entry->bytes_alloc = bytes_alloc; + __entry->gfp_flags = gfp_flags; + __entry->node = node; + ), + +TP_printk ("call_site=%lx ptr=%p bytes_req=%zu bytes_alloc=%zu gfp_flags=%08x node=%d" , + __entry->call_site, + __entry->ptr, + __entry->bytes_req, + __entry->bytes_alloc, + __entry->gfp_flags, + __entry->node) +); + +TRACE_EVENT (kmem_cache_alloc_node, + + TP_PROTO(unsigned long call_site, + const void *ptr, + size_t bytes_req, + size_t bytes_alloc, + gfp_t gfp_flags, + int node), + +TP_ARGS (call_site, ptr, bytes_req, bytes_alloc, gfp_flags, node), + +TP_STRUCT__entry ( + __field( unsigned long, call_site ) + __field( const void *, ptr ) + __field( size_t, bytes_req ) + __field( size_t, bytes_alloc ) + __field( gfp_t, gfp_flags ) +__field ( int, node ) + ), + +TP_fast_assign ( + __entry->call_site = call_site; + __entry->ptr = ptr; + __entry->bytes_req = bytes_req; + __entry->bytes_alloc = bytes_alloc; + __entry->gfp_flags = gfp_flags; + __entry->node = node; + ), + +TP_printk ("call_site=%lx ptr=%p bytes_req=%zu bytes_alloc=%zu gfp_flags=%08x node=%d" , + __entry->call_site, + __entry->ptr, + __entry->bytes_req, + __entry->bytes_alloc, + __entry->gfp_flags, + __entry->node) +); + +TRACE_EVENT (kfree, + + TP_PROTO(unsigned long call_site, const void *ptr), + +TP_ARGS (call_site, ptr), + +TP_STRUCT__entry ( + __field( unsigned long, call_site ) + __field( const void *, ptr ) + ), + +TP_fast_assign ( + __entry->call_site = call_site; + __entry->ptr = ptr; + ), + +TP_printk ("call_site=%lx ptr=%p" , __entry->call_site, __entry->ptr) +); + +TRACE_EVENT (kmem_cache_free, + + TP_PROTO(unsigned long call_site, const void *ptr), + +TP_ARGS (call_site, ptr), + +TP_STRUCT__entry ( + __field( unsigned long, call_site ) + __field( const void *, ptr ) + ), + +TP_fast_assign ( + __entry->call_site = call_site; + __entry->ptr = ptr; + ), + +TP_printk ("call_site=%lx ptr=%p" , __entry->call_site, __entry->ptr) +); + +#endif include/trace/lockdep.h +50
-2@@ -1,9 +1,57 @@ -#ifndef _TRACE_LOCKDEP_H +#if !defined(_TRACE_LOCKDEP_H) || defined(TRACE_HEADER_MULTI_READ )#define _TRACE_LOCKDEP_H#include <linux/lockdep.h> #include <linux/tracepoint.h> -#include <trace/lockdep_event_types.h> +#undef TRACE_SYSTEM +#define TRACE_SYSTEM lock + +#ifdef CONFIG_LOCKDEP + +TRACE_FORMAT (lock_acquire, + TP_PROTO(struct lockdep_map *lock, unsigned int subclass, + int trylock, int read, int check, + struct lockdep_map *next_lock, unsigned long ip), +TP_ARGS (lock, subclass, trylock, read, check, next_lock, ip), +TP_FMT ("%s%s%s" , trylock ?"try " :"" , + read ?"read " :"" , lock->name) + ); + +TRACE_FORMAT (lock_release, + TP_PROTO(struct lockdep_map *lock, int nested, unsigned long ip), +TP_ARGS (lock, nested, ip), +TP_FMT ("%s" , lock->name) + ); + +#ifdef CONFIG_LOCK_STAT + +TRACE_FORMAT (lock_contended, + TP_PROTO(struct lockdep_map *lock, unsigned long ip), +TP_ARGS (lock, ip), +TP_FMT ("%s" , lock->name) + ); + +TRACE_EVENT (lock_acquired, + TP_PROTO(struct lockdep_map *lock, unsigned long ip, s64 waittime), + +TP_ARGS (lock, ip, waittime), + +TP_STRUCT__entry ( + __field(const char *, name) + __field(unsigned long, wait_usec) + __field(unsigned long, wait_nsec_rem) + ), +TP_fast_assign ( + __entry->name = lock->name; + __entry->wait_nsec_rem = do_div(waittime, NSEC_PER_USEC); + __entry->wait_usec = (unsigned long) waittime; + ), +TP_printk ("%s (%lu.%03lu us)" , __entry->name, __entry->wait_usec, + __entry->wait_nsec_rem) +);#endif +#endif + +#endif /* _TRACE_LOCKDEP_H */ include/trace/lockdep_event_types.h deleted +0
-57@@ -1,57 +0,0 @@ - -#ifndef TRACE_FORMAT -# error Do not include this file directly. -# error Unless you know what you are doing. -#endif - -#undef TRACE_SYSTEM -#define TRACE_SYSTEM lock - -#ifdef CONFIG_LOCKDEP - -TRACE_FORMAT (lock_acquire, - TP_PROTO(struct lockdep_map *lock, unsigned int subclass, - int trylock, int read, int check, - struct lockdep_map *next_lock, unsigned long ip), -TP_ARGS (lock, subclass, trylock, read, check, next_lock, ip), -TP_FMT ("%s%s%s" , trylock ?"try " :"" , - read ?"read " :"" , lock->name) - ); - -TRACE_FORMAT (lock_release, - TP_PROTO(struct lockdep_map *lock, int nested, unsigned long ip), -TP_ARGS (lock, nested, ip), -TP_FMT ("%s" , lock->name) - ); - -#ifdef CONFIG_LOCK_STAT - -TRACE_FORMAT (lock_contended, - TP_PROTO(struct lockdep_map *lock, unsigned long ip), -TP_ARGS (lock, ip), -TP_FMT ("%s" , lock->name) - ); - -TRACE_EVENT (lock_acquired, - TP_PROTO(struct lockdep_map *lock, unsigned long ip, s64 waittime), - -TP_ARGS (lock, ip, waittime), - -TP_STRUCT__entry ( - __field(const char *, name) - __field(unsigned long, wait_usec) - __field(unsigned long, wait_nsec_rem) - ), -TP_fast_assign ( - __entry->name = lock->name; - __entry->wait_nsec_rem = do_div(waittime, NSEC_PER_USEC); - __entry->wait_usec = (unsigned long) waittime; - ), -TP_printk ("%s (%lu.%03lu us)" , __entry->name, __entry->wait_usec, - __entry->wait_nsec_rem) -); - -#endif -#endif - -#undef TRACE_SYSTEMinclude/trace/sched.h +330
-3@@ -1,9 +1,336 @@ -#ifndef _TRACE_SCHED_H +#if !defined(_TRACE_SCHED_H) || defined(TRACE_HEADER_MULTI_READ )#define _TRACE_SCHED_H#include <linux/sched.h> #include <linux/tracepoint.h> -#include <trace/sched_event_types.h> +#undef TRACE_SYSTEM +#define TRACE_SYSTEM sched -#endif +/* +* Tracepoint for calling kthread_stop, performed to end a kthread: +*/ +TRACE_EVENT (sched_kthread_stop, + + TP_PROTO(struct task_struct *t), + +TP_ARGS (t), + +TP_STRUCT__entry ( + __array( char, comm, TASK_COMM_LEN ) +__field ( pid_t, pid ) + ), + +TP_fast_assign ( + memcpy(__entry->comm, t->comm, TASK_COMM_LEN); + __entry->pid = t->pid; + ), + +TP_printk ("task %s:%d" , __entry->comm, __entry->pid) +); + +/* +* Tracepoint for the return value of the kthread stopping: +*/ +TRACE_EVENT (sched_kthread_stop_ret, + + TP_PROTO(int ret), + +TP_ARGS (ret), + +TP_STRUCT__entry ( +__field ( int, ret ) + ), + +TP_fast_assign ( + __entry->ret = ret; + ), + +TP_printk ("ret %d" , __entry->ret) +); + +/* +* Tracepoint for waiting on task to unschedule: +* +* (NOTE: the 'rq' argument is not used by generic trace events, +* but used by the latency tracer plugin. ) +*/ +TRACE_EVENT (sched_wait_task, + + TP_PROTO(struct rq *rq, struct task_struct *p), + +TP_ARGS (rq, p), + +TP_STRUCT__entry ( + __array( char, comm, TASK_COMM_LEN ) + __field( pid_t, pid ) +__field ( int, prio ) + ), + +TP_fast_assign ( + memcpy(__entry->comm, p->comm, TASK_COMM_LEN); + __entry->pid = p->pid; + __entry->prio = p->prio; + ), + +TP_printk ("task %s:%d [%d]" , + __entry->comm, __entry->pid, __entry->prio) +); + +/* +* Tracepoint for waking up a task: +* +* (NOTE: the 'rq' argument is not used by generic trace events, +* but used by the latency tracer plugin. ) +*/ +TRACE_EVENT (sched_wakeup, + + TP_PROTO(struct rq *rq, struct task_struct *p, int success), + +TP_ARGS (rq, p, success), + +TP_STRUCT__entry ( + __array( char, comm, TASK_COMM_LEN ) + __field( pid_t, pid ) + __field( int, prio ) +__field ( int, success ) + ), + +TP_fast_assign ( + memcpy(__entry->comm, p->comm, TASK_COMM_LEN); + __entry->pid = p->pid; + __entry->prio = p->prio; + __entry->success = success; + ), + +TP_printk ("task %s:%d [%d] success=%d" , + __entry->comm, __entry->pid, __entry->prio, + __entry->success) +); + +/* +* Tracepoint for waking up a new task: +* +* (NOTE: the 'rq' argument is not used by generic trace events, +* but used by the latency tracer plugin. ) +*/ +TRACE_EVENT (sched_wakeup_new, + + TP_PROTO(struct rq *rq, struct task_struct *p, int success), + +TP_ARGS (rq, p, success), + +TP_STRUCT__entry ( + __array( char, comm, TASK_COMM_LEN ) + __field( pid_t, pid ) + __field( int, prio ) +__field ( int, success ) + ), + +TP_fast_assign ( + memcpy(__entry->comm, p->comm, TASK_COMM_LEN); + __entry->pid = p->pid; + __entry->prio = p->prio; + __entry->success = success; + ), + +TP_printk ("task %s:%d [%d] success=%d" , + __entry->comm, __entry->pid, __entry->prio, + __entry->success) +); + +/* +* Tracepoint for task switches, performed by the scheduler: +* +* (NOTE: the 'rq' argument is not used by generic trace events, +* but used by the latency tracer plugin. ) +*/ +TRACE_EVENT (sched_switch, + + TP_PROTO(struct rq *rq, struct task_struct *prev, + struct task_struct *next), + +TP_ARGS (rq, prev, next), + +TP_STRUCT__entry ( + __array( char, prev_comm, TASK_COMM_LEN ) + __field( pid_t, prev_pid ) + __field( int, prev_prio ) + __array( char, next_comm, TASK_COMM_LEN ) + __field( pid_t, next_pid ) +__field ( int, next_prio ) + ), + +TP_fast_assign ( + memcpy(__entry->next_comm, next->comm, TASK_COMM_LEN); + __entry->prev_pid = prev->pid; + __entry->prev_prio = prev->prio; + memcpy(__entry->prev_comm, prev->comm, TASK_COMM_LEN); + __entry->next_pid = next->pid; + __entry->next_prio = next->prio; + ), + +TP_printk ("task %s:%d [%d] ==> %s:%d [%d]" , + __entry->prev_comm, __entry->prev_pid, __entry->prev_prio, + __entry->next_comm, __entry->next_pid, __entry->next_prio) +); + +/* +* Tracepoint for a task being migrated: +*/ +TRACE_EVENT (sched_migrate_task, + + TP_PROTO(struct task_struct *p, int orig_cpu, int dest_cpu), + +TP_ARGS (p, orig_cpu, dest_cpu), + +TP_STRUCT__entry ( + __array( char, comm, TASK_COMM_LEN ) + __field( pid_t, pid ) + __field( int, prio ) + __field( int, orig_cpu ) +__field ( int, dest_cpu ) + ), + +TP_fast_assign ( + memcpy(__entry->comm, p->comm, TASK_COMM_LEN); + __entry->pid = p->pid; + __entry->prio = p->prio; + __entry->orig_cpu = orig_cpu; + __entry->dest_cpu = dest_cpu; + ), + +TP_printk ("task %s:%d [%d] from: %d to: %d" , + __entry->comm, __entry->pid, __entry->prio, + __entry->orig_cpu, __entry->dest_cpu) +); + +/* +* Tracepoint for freeing a task: +*/ +TRACE_EVENT (sched_process_free, + + TP_PROTO(struct task_struct *p), + +TP_ARGS (p), + +TP_STRUCT__entry ( + __array( char, comm, TASK_COMM_LEN ) + __field( pid_t, pid ) +__field ( int, prio ) + ), + +TP_fast_assign ( + memcpy(__entry->comm, p->comm, TASK_COMM_LEN); + __entry->pid = p->pid; + __entry->prio = p->prio; + ), + +TP_printk ("task %s:%d [%d]" , + __entry->comm, __entry->pid, __entry->prio) +); + +/* +* Tracepoint for a task exiting: +*/ +TRACE_EVENT (sched_process_exit, + + TP_PROTO(struct task_struct *p), + +TP_ARGS (p), + +TP_STRUCT__entry ( + __array( char, comm, TASK_COMM_LEN ) + __field( pid_t, pid ) +__field ( int, prio ) + ), + +TP_fast_assign ( + memcpy(__entry->comm, p->comm, TASK_COMM_LEN); + __entry->pid = p->pid; + __entry->prio = p->prio; + ), + +TP_printk ("task %s:%d [%d]" , + __entry->comm, __entry->pid, __entry->prio) +); + +/* +* Tracepoint for a waiting task: +*/ +TRACE_EVENT (sched_process_wait, + + TP_PROTO(struct pid *pid), + +TP_ARGS (pid), + +TP_STRUCT__entry ( + __array( char, comm, TASK_COMM_LEN ) + __field( pid_t, pid ) +__field ( int, prio ) + ), + +TP_fast_assign ( + memcpy(__entry->comm, current->comm, TASK_COMM_LEN); + __entry->pid = pid_nr(pid); + __entry->prio = current->prio; + ), + +TP_printk ("task %s:%d [%d]" , + __entry->comm, __entry->pid, __entry->prio) +); + +/* +* Tracepoint for do_fork: +*/ +TRACE_EVENT (sched_process_fork, + + TP_PROTO(struct task_struct *parent, struct task_struct *child), + +TP_ARGS (parent, child), + +TP_STRUCT__entry ( + __array( char, parent_comm, TASK_COMM_LEN ) + __field( pid_t, parent_pid ) + __array( char, child_comm, TASK_COMM_LEN ) +__field ( pid_t, child_pid ) + ), + +TP_fast_assign ( + memcpy(__entry->parent_comm, parent->comm, TASK_COMM_LEN); + __entry->parent_pid = parent->pid; + memcpy(__entry->child_comm, child->comm, TASK_COMM_LEN); + __entry->child_pid = child->pid; + ), + +TP_printk ("parent %s:%d child %s:%d" , + __entry->parent_comm, __entry->parent_pid, + __entry->child_comm, __entry->child_pid) +); + +/* +* Tracepoint for sending a signal: +*/ +TRACE_EVENT (sched_signal_send, + + TP_PROTO(int sig, struct task_struct *p), + +TP_ARGS (sig, p), + +TP_STRUCT__entry ( + __field( int, sig ) + __array( char, comm, TASK_COMM_LEN ) +__field ( pid_t, pid ) + ), + +TP_fast_assign ( + memcpy(__entry->comm, p->comm, TASK_COMM_LEN); + __entry->pid = p->pid; + __entry->sig = sig; + ), + +TP_printk ("sig: %d task %s:%d" , + __entry->sig, __entry->comm, __entry->pid) +); + +#endif /* _TRACE_SCHED_H */ include/trace/sched_event_types.h deleted +0
-337@@ -1,337 +0,0 @@ - -/* use <trace/sched.h> instead */ -#ifndef TRACE_EVENT -# error Do not include this file directly. -# error Unless you know what you are doing. -#endif - -#undef TRACE_SYSTEM -#define TRACE_SYSTEM sched - -/* -* Tracepoint for calling kthread_stop, performed to end a kthread: -*/ -TRACE_EVENT (sched_kthread_stop, - - TP_PROTO(struct task_struct *t), - -TP_ARGS (t), - -TP_STRUCT__entry ( - __array( char, comm, TASK_COMM_LEN ) -__field ( pid_t, pid ) - ), - -TP_fast_assign ( - memcpy(__entry->comm, t->comm, TASK_COMM_LEN); - __entry->pid = t->pid; - ), - -TP_printk ("task %s:%d" , __entry->comm, __entry->pid) -); - -/* -* Tracepoint for the return value of the kthread stopping: -*/ -TRACE_EVENT (sched_kthread_stop_ret, - - TP_PROTO(int ret), - -TP_ARGS (ret), - -TP_STRUCT__entry ( -__field ( int, ret ) - ), - -TP_fast_assign ( - __entry->ret = ret; - ), - -TP_printk ("ret %d" , __entry->ret) -); - -/* -* Tracepoint for waiting on task to unschedule: -* -* (NOTE: the 'rq' argument is not used by generic trace events, -* but used by the latency tracer plugin. ) -*/ -TRACE_EVENT (sched_wait_task, - - TP_PROTO(struct rq *rq, struct task_struct *p), - -TP_ARGS (rq, p), - -TP_STRUCT__entry ( - __array( char, comm, TASK_COMM_LEN ) - __field( pid_t, pid ) -__field ( int, prio ) - ), - -TP_fast_assign ( - memcpy(__entry->comm, p->comm, TASK_COMM_LEN); - __entry->pid = p->pid; - __entry->prio = p->prio; - ), - -TP_printk ("task %s:%d [%d]" , - __entry->comm, __entry->pid, __entry->prio) -); - -/* -* Tracepoint for waking up a task: -* -* (NOTE: the 'rq' argument is not used by generic trace events, -* but used by the latency tracer plugin. ) -*/ -TRACE_EVENT (sched_wakeup, - - TP_PROTO(struct rq *rq, struct task_struct *p, int success), - -TP_ARGS (rq, p, success), - -TP_STRUCT__entry ( - __array( char, comm, TASK_COMM_LEN ) - __field( pid_t, pid ) - __field( int, prio ) -__field ( int, success ) - ), - -TP_fast_assign ( - memcpy(__entry->comm, p->comm, TASK_COMM_LEN); - __entry->pid = p->pid; - __entry->prio = p->prio; - __entry->success = success; - ), - -TP_printk ("task %s:%d [%d] success=%d" , - __entry->comm, __entry->pid, __entry->prio, - __entry->success) -); - -/* -* Tracepoint for waking up a new task: -* -* (NOTE: the 'rq' argument is not used by generic trace events, -* but used by the latency tracer plugin. ) -*/ -TRACE_EVENT (sched_wakeup_new, - - TP_PROTO(struct rq *rq, struct task_struct *p, int success), - -TP_ARGS (rq, p, success), - -TP_STRUCT__entry ( - __array( char, comm, TASK_COMM_LEN ) - __field( pid_t, pid ) - __field( int, prio ) -__field ( int, success ) - ), - -TP_fast_assign ( - memcpy(__entry->comm, p->comm, TASK_COMM_LEN); - __entry->pid = p->pid; - __entry->prio = p->prio; - __entry->success = success; - ), - -TP_printk ("task %s:%d [%d] success=%d" , - __entry->comm, __entry->pid, __entry->prio, - __entry->success) -); - -/* -* Tracepoint for task switches, performed by the scheduler: -* -* (NOTE: the 'rq' argument is not used by generic trace events, -* but used by the latency tracer plugin. ) -*/ -TRACE_EVENT (sched_switch, - - TP_PROTO(struct rq *rq, struct task_struct *prev, - struct task_struct *next), - -TP_ARGS (rq, prev, next), - -TP_STRUCT__entry ( - __array( char, prev_comm, TASK_COMM_LEN ) - __field( pid_t, prev_pid ) - __field( int, prev_prio ) - __array( char, next_comm, TASK_COMM_LEN ) - __field( pid_t, next_pid ) -__field ( int, next_prio ) - ), - -TP_fast_assign ( - memcpy(__entry->next_comm, next->comm, TASK_COMM_LEN); - __entry->prev_pid = prev->pid; - __entry->prev_prio = prev->prio; - memcpy(__entry->prev_comm, prev->comm, TASK_COMM_LEN); - __entry->next_pid = next->pid; - __entry->next_prio = next->prio; - ), - -TP_printk ("task %s:%d [%d] ==> %s:%d [%d]" , - __entry->prev_comm, __entry->prev_pid, __entry->prev_prio, - __entry->next_comm, __entry->next_pid, __entry->next_prio) -); - -/* -* Tracepoint for a task being migrated: -*/ -TRACE_EVENT (sched_migrate_task, - - TP_PROTO(struct task_struct *p, int orig_cpu, int dest_cpu), - -TP_ARGS (p, orig_cpu, dest_cpu), - -TP_STRUCT__entry ( - __array( char, comm, TASK_COMM_LEN ) - __field( pid_t, pid ) - __field( int, prio ) - __field( int, orig_cpu ) -__field ( int, dest_cpu ) - ), - -TP_fast_assign ( - memcpy(__entry->comm, p->comm, TASK_COMM_LEN); - __entry->pid = p->pid; - __entry->prio = p->prio; - __entry->orig_cpu = orig_cpu; - __entry->dest_cpu = dest_cpu; - ), - -TP_printk ("task %s:%d [%d] from: %d to: %d" , - __entry->comm, __entry->pid, __entry->prio, - __entry->orig_cpu, __entry->dest_cpu) -); - -/* -* Tracepoint for freeing a task: -*/ -TRACE_EVENT (sched_process_free, - - TP_PROTO(struct task_struct *p), - -TP_ARGS (p), - -TP_STRUCT__entry ( - __array( char, comm, TASK_COMM_LEN ) - __field( pid_t, pid ) -__field ( int, prio ) - ), - -TP_fast_assign ( - memcpy(__entry->comm, p->comm, TASK_COMM_LEN); - __entry->pid = p->pid; - __entry->prio = p->prio; - ), - -TP_printk ("task %s:%d [%d]" , - __entry->comm, __entry->pid, __entry->prio) -); - -/* -* Tracepoint for a task exiting: -*/ -TRACE_EVENT (sched_process_exit, - - TP_PROTO(struct task_struct *p), - -TP_ARGS (p), - -TP_STRUCT__entry ( - __array( char, comm, TASK_COMM_LEN ) - __field( pid_t, pid ) -__field ( int, prio ) - ), - -TP_fast_assign ( - memcpy(__entry->comm, p->comm, TASK_COMM_LEN); - __entry->pid = p->pid; - __entry->prio = p->prio; - ), - -TP_printk ("task %s:%d [%d]" , - __entry->comm, __entry->pid, __entry->prio) -); - -/* -* Tracepoint for a waiting task: -*/ -TRACE_EVENT (sched_process_wait, - - TP_PROTO(struct pid *pid), - -TP_ARGS (pid), - -TP_STRUCT__entry ( - __array( char, comm, TASK_COMM_LEN ) - __field( pid_t, pid ) -__field ( int, prio ) - ), - -TP_fast_assign ( - memcpy(__entry->comm, current->comm, TASK_COMM_LEN); - __entry->pid = pid_nr(pid); - __entry->prio = current->prio; - ), - -TP_printk ("task %s:%d [%d]" , - __entry->comm, __entry->pid, __entry->prio) -); - -/* -* Tracepoint for do_fork: -*/ -TRACE_EVENT (sched_process_fork, - - TP_PROTO(struct task_struct *parent, struct task_struct *child), - -TP_ARGS (parent, child), - -TP_STRUCT__entry ( - __array( char, parent_comm, TASK_COMM_LEN ) - __field( pid_t, parent_pid ) - __array( char, child_comm, TASK_COMM_LEN ) -__field ( pid_t, child_pid ) - ), - -TP_fast_assign ( - memcpy(__entry->parent_comm, parent->comm, TASK_COMM_LEN); - __entry->parent_pid = parent->pid; - memcpy(__entry->child_comm, child->comm, TASK_COMM_LEN); - __entry->child_pid = child->pid; - ), - -TP_printk ("parent %s:%d child %s:%d" , - __entry->parent_comm, __entry->parent_pid, - __entry->child_comm, __entry->child_pid) -); - -/* -* Tracepoint for sending a signal: -*/ -TRACE_EVENT (sched_signal_send, - - TP_PROTO(int sig, struct task_struct *p), - -TP_ARGS (sig, p), - -TP_STRUCT__entry ( - __field( int, sig ) - __array( char, comm, TASK_COMM_LEN ) -__field ( pid_t, pid ) - ), - -TP_fast_assign ( - memcpy(__entry->comm, p->comm, TASK_COMM_LEN); - __entry->pid = p->pid; - __entry->sig = sig; - ), - -TP_printk ("sig: %d task %s:%d" , - __entry->sig, __entry->comm, __entry->pid) -); - -#undef TRACE_SYSTEMinclude/trace/skb.h +32
-4@@ -1,9 +1,37 @@ -#ifndef _TRACE_SKB_H_ -#define _TRACE_SKB_H_ +#if !defined(_TRACE_SKB_H) || defined(TRACE_HEADER_MULTI_READ ) +#define _TRACE_SKB_H#include <linux/skbuff.h> #include <linux/tracepoint.h> -#include <trace/skb_event_types.h> +#undef TRACE_SYSTEM +#define TRACE_SYSTEM skb -#endif +/* +* Tracepoint for free an sk_buff: +*/ +TRACE_EVENT (kfree_skb, + + TP_PROTO(struct sk_buff *skb, void *location), + +TP_ARGS (skb, location), + +TP_STRUCT__entry ( + __field( void *, skbaddr ) + __field( unsigned short, protocol ) + __field( void *, location ) + ), + +TP_fast_assign ( + __entry->skbaddr = skb; + if (skb) { + __entry->protocol = ntohs(skb->protocol); + } + __entry->location = location; + ), + +TP_printk ("skbaddr=%p protocol=%u location=%p" , + __entry->skbaddr, __entry->protocol, __entry->location) +); + +#endif /* _TRACE_SKB_H */ include/trace/skb_event_types.h deleted +0
-38@@ -1,38 +0,0 @@ - -/* use <trace/skb.h> instead */ -#ifndef TRACE_EVENT -# error Do not include this file directly. -# error Unless you know what you are doing. -#endif - -#undef TRACE_SYSTEM -#define TRACE_SYSTEM skb - -/* -* Tracepoint for free an sk_buff: -*/ -TRACE_EVENT (kfree_skb, - - TP_PROTO(struct sk_buff *skb, void *location), - -TP_ARGS (skb, location), - -TP_STRUCT__entry ( - __field( void *, skbaddr ) - __field( unsigned short, protocol ) - __field( void *, location ) - ), - -TP_fast_assign ( - __entry->skbaddr = skb; - if (skb) { - __entry->protocol = ntohs(skb->protocol); - } - __entry->location = location; - ), - -TP_printk ("skbaddr=%p protocol=%u location=%p" , - __entry->skbaddr, __entry->protocol, __entry->location) -); - -#undef TRACE_SYSTEMinclude/trace/trace_event_types.h deleted +0
-7@@ -1,7 +0,0 @@ -/* trace/<type>_event_types.h here */ - -#include <trace/sched_event_types.h> -#include <trace/irq_event_types.h> -#include <trace/lockdep_event_types.h> -#include <trace/skb_event_types.h> -#include <trace/kmem_event_types.h> kernel/trace/events.c +1
-0@@ -8,6 +8,7 @@#include "trace_output.h" +#define TRACE_HEADER_MULTI_READ #include "trace_events_stage_1.h" #include "trace_events_stage_2.h" #include "trace_events_stage_3.h" kernel/trace/trace_events_stage_1.h +2
-2@@ -1,7 +1,7 @@/* * Stage 1 of the trace events. * -* Override the macros in <trace/trace_event_types.h> to include the following: +* Override the macros in <trace/trace_events.h> to include the following: * * struct ftrace_raw_<call> { * struct trace_entry ent; @@ -36,4 +36,4 @@ }; \ static struct ftrace_event_call event_##name -#include <trace/trace_event_types.h> +#include <trace/trace_events.h> kernel/trace/trace_events_stage_2.h +4
-4@@ -1,7 +1,7 @@/* * Stage 2 of the trace events. * -* Override the macros in <trace/trace_event_types.h> to include the following: +* Override the macros in <trace/trace_events.h> to include the following: * * enum print_line_t * ftrace_raw_output_<call>(struct trace_iterator *iter, int flags) @@ -64,7 +64,7 @@ ftrace_raw_output_##call(struct trace_iterator *iter, int flags) \return TRACE_TYPE_HANDLED ; \ } -#include <trace/trace_event_types.h> +#include <trace/trace_events.h> /* * Setup the showing format of trace point. @@ -128,7 +128,7 @@ ftrace_format_##call(struct trace_seq *s) \return ret; \ } -#include <trace/trace_event_types.h> +#include <trace/trace_events.h> #undef __field#define __field (type, item) \@@ -167,4 +167,4 @@ ftrace_define_fields_##call(void) \return ret; \ } -#include <trace/trace_event_types.h> +#include <trace/trace_events.h> kernel/trace/trace_events_stage_3.h +2
-2@@ -1,7 +1,7 @@/* * Stage 3 of the trace events. * -* Override the macros in <trace/trace_event_types.h> to include the following: +* Override the macros in <trace/trace_events.h> to include the following: * * static void ftrace_event_<call>(proto) * { @@ -272,7 +272,7 @@ __attribute__((section("_ftrace_events"))) event_##call = { \ _TRACE_PROFILE_INIT(call) \ } -#include <trace/trace_event_types.h> +#include <trace/trace_events.h> #undef _TRACE_PROFILE#undef _TRACE_PROFILE_INITSignature · 3 lines
1.6.2.1 --
Steven Rostedt
maintainerRe: [PATCH 1/8] tracing: consolidate trace and trace_event headers
Quoted 49 lines · Frederic Weisbecker
Quoted 37 lines · Steven Rostedt
From: Steven Rostedt <[email protected]>
Impact: clean up
Neil Horman (et. al.) criticized the way the trace events were broken up into two files. The reason for that was that ftrace needed to separate out the declarations from where the #include <
linux/tracepoint.h> was used. It then dawned on me that thetracepoint.hheader only needs to define theTRACE_EVENTmacro if it is not already defined.The solution is simply to test if
TRACE_EVENTis defined, and if it is not then thelinux/tracepoint.hheader can define it. This change consolidates all the <traces>.h and <traces>_event_types.h into the <traces>.h file.Reported-by Neil Horman <[email protected]>Reported-by Theodore Tso <[email protected]>Reported-by Jiaying Zhang <[email protected]>Cc Zhaolei <[email protected]>Cc Frederic Weisbecker <[email protected]>Cc Peter Zijlstra <[email protected]>Cc Jason Baron <[email protected]>Cc Mathieu Desnoyers <[email protected]>Signed-off-by Steven Rostedt <[email protected]>--- include/linux/tracepoint.h | 9 +- include/trace/irq.h | 51 +++++- include/trace/irq_event_types.h | 55 ------ include/trace/kmem.h | 189 +++++++++++++++++++- include/trace/lockdep.h | 52 +++++- include/trace/lockdep_event_types.h | 57 ------ include/trace/sched.h | 333 ++++++++++++++++++++++++++++++++++- include/trace/sched_event_types.h | 337 ----------------------------------- include/trace/skb.h | 36 ++++- include/trace/skb_event_types.h | 38 ---- include/trace/trace_event_types.h | 7 - kernel/trace/events.c | 1 + kernel/trace/trace_events_stage_1.h | 4 +-Quoted 8 lines
kernel/trace/trace_events_stage_2.h | 8 +- kernel/trace/trace_events_stage_3.h | 4 +- 15 files changed, 663 insertions(+), 518 deletions(-) delete mode 100644 include/trace/irq_event_types.h delete mode 100644 include/trace/lockdep_event_types.h delete mode 100644 include/trace/sched_event_types.h delete mode 100644 include/trace/skb_event_types.h delete mode 100644 include/trace/trace_event_types.h
Quoted 6 lines
I don't know if you use git-format-patch without -M or something else specific to git pull request. But it looks like the renames are not detected here, so it's a bit hard to know what have been actually happened or deleted in the end result.
Hmm, good point. I use git format-patch with no options and then use quilt to send the emair. I always want the patches to work with quilt, thus I avoid anything git specific.
My repo is public, so anyone can still look at it and run any git command they want.
-- Steve
Steven Rostedt
maintainerPATCH 2/8 tracing: create automated trace defines
In reply to Steven RostedtFrom: Steven Rostedt <[email protected]>
This patch lowers the number of places a developer must modify to add new tracepoints. The current method to add a new tracepoint into an existing system is to write the trace point macro in the trace header with one of the macros TRACE_EVENT, TRACE_FORMAT or DECLARE_TRACE, then they must add the same named item into the C file with the macro DEFINE_TRACE(name) and then add the trace point.
This change cuts out the needing to add the DEFINE_TRACE(name). Every file that uses the tracepoint must still include the trace/<type>.h file, but the one C file must also add a define before the including of that file.
#define CREATE_TRACE_POINTS
#include <trace/mytrace.h>
This will cause the trace/mytrace.h file to also produce the C code necessary to implement the trace point.
Note, if more than one trace/<type>.h is used to create the C code it is best to list them all together.
#define CREATE_TRACE_POINTS
#include <trace/foo.h>
#include <trace/bar.h>
#include <trace/fido.h>
Thanks to Mathieu Desnoyers and Christoph Hellwig for coming up with the cleaner solution of the define above the includes over my first design to have the C code include a "special" header.
This patch converts sched, irq and lockdep and skb to use this new method.
--- include/trace/define_trace.h | 75 ++++++++++++++++++++++++++++++++++++++++++ include/trace/irq.h | 5 ++- include/trace/kmem.h | 4 ++- include/trace/lockdep.h | 3 ++ include/trace/sched.h | 3 ++ include/trace/skb.h | 3 ++ kernel/exit.c | 4 -- kernel/fork.c | 2 - kernel/irq/handle.c | 7 ++-- kernel/kthread.c | 3 -- kernel/lockdep.c | 12 ++----- kernel/sched.c | 10 ++---- kernel/signal.c | 2 - kernel/softirq.c | 3 -- mm/util.c | 11 ++---- net/core/net-traces.c | 4 +- 16 files changed, 105 insertions(+), 46 deletions(-) create mode 100644 include/trace/define_trace.h
include/trace/define_trace.h new file +75 -0
@@ -0,0 +1,75 @@ +/* +* Trace files that want to automate creationg of all tracepoints defined +* in their file should include this file. The following are macros that the +* trace file may define: +* +* TRACE_SYSTEM defines the system the tracepoint is for +* +* TRACE_INCLUDE_FILE if the file name is something other than TRACE_SYSTEM.h +* This macro may be defined to tell define_trace.h what file to include. +* Note, leave off the ".h". +* +* TRACE_INCLUDE_PATH if the path is something other than core kernel include/trace +* then this macro can define the path to use. Note, the path is relative to +* define_trace.h, not the file including it. Full path names for out of tree +* modules must be used. +*/ + +#ifdef CREATE_TRACE_POINTS + +/* Prevent recursion */ +#undef CREATE_TRACE_POINTS + +#include <linux/stringify.h> + +#undef TRACE_EVENT +#define TRACE_EVENT (name, proto, args, tstruct, assign, print) \ + DEFINE_TRACE(name) + +#undef TRACE_FORMAT +#define TRACE_FORMAT (name, proto, args, print) \ + DEFINE_TRACE(name) + +#undef DECLARE_TRACE +#define DECLARE_TRACE (name, proto, args) \ + DEFINE_TRACE(name) + +#undef TRACE_INCLUDE +#undef __TRACE_INCLUDE + +#ifndef TRACE_INCLUDE_FILE +# define TRACE_INCLUDE_FILE TRACE_SYSTEM +# define UNDEF_TRACE_INCLUDE_FILE +#endif + +#ifndef TRACE_INCLUDE_PATH +# define __TRACE_INCLUDE (system) <trace/system.h> +# define UNDEF_TRACE_INCLUDE_FILE +#else +# define __TRACE_INCLUDE (system) __stringify(TRACE_INCLUDE_PATH/system.h) +#endif + +# define TRACE_INCLUDE (system) __TRACE_INCLUDE(system) + +/* Let the trace headers be reread */ +#define TRACE_HEADER_MULTI_READ + +#include TRACE_INCLUDE (TRACE_INCLUDE_FILE ) + +#undef TRACE_HEADER_MULTI_READ + +/* Only undef what we defined in this file */ +#ifdef UNDEF_TRACE_INCLUDE_FILE +# undef TRACE_INCLUDE_PATH +# undef UNDEF_TRACE_INCLUDE_FILE +#endif + +#ifdef UNDEF_TRACE_INCLUDE_FILE +# undef TRACE_INCLUDE_PATH +# undef UNDEF_TRACE_INCLUDE_FILE +#endif + +/* We may be processing more files */ +#define CREATE_TRACE_POINTS + +#endif /* CREATE_TRACE_POINTS */
include/trace/irq.h +4 -1
@@ -51,4 +51,7 @@ TRACE_FORMAT(softirq_exit,TP_FMT ("softirq=%d action=%s" , (int )(h - vec), softirq_to_name[h-vec]) ); -#endif +#endif /* _TRACE_IRQ_H */ + +/* This part must be outside protection */ +#include <trace/define_trace.h>
include/trace/kmem.h +3 -1
@@ -188,5 +188,7 @@ TRACE_EVENT(kmem_cache_free,TP_printk ("call_site=%lx ptr=%p" , __entry->call_site, __entry->ptr) ); +#endif /* _TRACE_KMEM_H */ -#endif +/* This part must be outside protection */ +#include <trace/define_trace.h>
include/trace/lockdep.h +3 -0
@@ -55,3 +55,6 @@ TRACE_EVENT(lock_acquired,#endif #endif /* _TRACE_LOCKDEP_H */ + +/* This part must be outside protection */ +#include <trace/define_trace.h>
include/trace/sched.h +3 -0
@@ -334,3 +334,6 @@ TRACE_EVENT(sched_signal_send, );#endif /* _TRACE_SCHED_H */ + +/* This part must be outside protection */ +#include <trace/define_trace.h>
include/trace/skb.h +3 -0
@@ -35,3 +35,6 @@ TRACE_EVENT(kfree_skb, );#endif /* _TRACE_SKB_H */ + +/* This part must be outside protection */ +#include <trace/define_trace.h>
kernel/exit.c +0 -4
@@ -56,10 +56,6 @@#include <asm/mmu_context.h> #include "cred-internals.h" -DEFINE_TRACE (sched_process_free); -DEFINE_TRACE (sched_process_exit); -DEFINE_TRACE (sched_process_wait); -static void exit_mm (struct task_struct * tsk);static void __unhash_process (struct task_struct *p)
kernel/fork.c +0 -2
@@ -83,8 +83,6 @@ DEFINE_PER_CPU(unsigned long, process_counts) = 0;__cacheline_aligned DEFINE_RWLOCK (tasklist_lock );/* outer */ -DEFINE_TRACE (sched_process_fork); -int nr_processes (void ) {int cpu;
kernel/irq/handle.c +3 -4
@@ -17,9 +17,11 @@#include <linux/kernel_stat.h> #include <linux/rculist.h> #include <linux/hash.h> -#include <trace/irq.h> #include <linux/bootmem.h> +#define CREATE_TRACE_POINTS +#include <trace/irq.h> +#include "internals.h" /*
@@ -348,9 +350,6 @@ static void warn_no_thread(unsigned int irq, struct irqaction *action) "but no thread function available.", irq, action->name); } -DEFINE_TRACE (irq_handler_entry); -DEFINE_TRACE (irq_handler_exit); -/** * handle_IRQ_event - irq action chain handler * @irq: the interrupt number
kernel/kthread.c +0 -3
@@ -21,9 +21,6 @@ static DEFINE_SPINLOCK(kthread_create_lock);static LIST_HEAD (kthread_create_list);struct task_struct *kthreadd_task; -DEFINE_TRACE (sched_kthread_stop); -DEFINE_TRACE (sched_kthread_stop_ret); -struct kthread_create_info {/* Information passed to kthread() from kthreadd. */
kernel/lockdep.c +3 -9
@@ -42,12 +42,14 @@#include <linux/hash.h> #include <linux/ftrace.h> #include <linux/stringify.h> -#include <trace/lockdep.h> #include <asm/sections.h> #include "lockdep_internals.h" +#define CREATE_TRACE_POINTS +#include <trace/lockdep.h> +#ifdef CONFIG_PROVE_LOCKING int prove_locking =1 ;module_param (prove_locking, int,0644 );
@@ -2929,8 +2931,6 @@ void lock_set_class(struct lockdep_map *lock, const char *name, }EXPORT_SYMBOL_GPL (lock_set_class); -DEFINE_TRACE (lock_acquire); -/* * We are not always called with irqs disabled - do that here, * and also avoid lockdep recursion:
@@ -2957,8 +2957,6 @@ void lock_acquire(struct lockdep_map *lock, unsigned int subclass, }EXPORT_SYMBOL_GPL (lock_acquire); -DEFINE_TRACE (lock_release); -void lock_release (struct lockdep_map *lock,int nested,unsigned long ip) {
@@ -3061,8 +3059,6 @@ found_it:put_lock_stats (stats); } -DEFINE_TRACE (lock_acquired); -static void __lock_acquired (struct lockdep_map *lock,unsigned long ip) {
@@ -3118,8 +3114,6 @@ found_it: lock->ip = ip; } -DEFINE_TRACE (lock_contended); -void lock_contended (struct lockdep_map *lock,unsigned long ip) {unsigned long flags;
kernel/sched.c +3 -7
@@ -72,13 +72,15 @@#include <linux/debugfs.h> #include <linux/ctype.h> #include <linux/ftrace.h> -#include <trace/sched.h> #include <asm/tlb.h> #include <asm/irq_regs.h> #include "sched_cpupri.h" +#define CREATE_TRACE_POINTS +#include <trace/sched.h> +/* * Convert user-nice values [ -20 ... 0 ... 19 ] * to static priority [ MAX_RT_PRIO..MAX_PRIO-1 ],
@@ -118,12 +120,6 @@*/ #define RUNTIME_INF ((u64)~0ULL) -DEFINE_TRACE (sched_wait_task); -DEFINE_TRACE (sched_wakeup); -DEFINE_TRACE (sched_wakeup_new); -DEFINE_TRACE (sched_switch); -DEFINE_TRACE (sched_migrate_task); -#ifdef CONFIG_SMP static void double_rq_lock (struct rq *rq1,struct rq *rq2);
kernel/signal.c +0 -2
@@ -41,8 +41,6 @@static struct kmem_cache *sigqueue_cachep; -DEFINE_TRACE (sched_signal_send); -static void __user *sig_handler (struct task_struct *t,int sig) {return t->sighand->action[sig -1 ].sa.sa_handler;
kernel/softirq.c +0 -3
@@ -186,9 +186,6 @@ EXPORT_SYMBOL(local_bh_enable_ip);*/ #define MAX_SOFTIRQ_RESTART 10 -DEFINE_TRACE (softirq_entry); -DEFINE_TRACE (softirq_exit); - asmlinkage void __do_softirq(void) {struct softirq_action *h;
mm/util.c +3 -8
@@ -4,9 +4,11 @@#include <linux/module.h> #include <linux/err.h> #include <linux/sched.h> -#include <linux/tracepoint.h> #include <asm/uaccess.h> +#define CREATE_TRACE_POINTS +#include <trace/kmem.h> +/** * kstrdup - allocate space for and copy an existing string * @s: the string to duplicate
@@ -239,13 +241,6 @@ int __attribute__((weak)) get_user_pages_fast(unsigned long start,EXPORT_SYMBOL_GPL (get_user_pages_fast);/* Tracepoints definitions. */ -DEFINE_TRACE (kmalloc); -DEFINE_TRACE (kmem_cache_alloc); -DEFINE_TRACE (kmalloc_node); -DEFINE_TRACE (kmem_cache_alloc_node); -DEFINE_TRACE (kfree); -DEFINE_TRACE (kmem_cache_free); -EXPORT_TRACEPOINT_SYMBOL (kmalloc);EXPORT_TRACEPOINT_SYMBOL (kmem_cache_alloc);EXPORT_TRACEPOINT_SYMBOL (kmalloc_node);
net/core/net-traces.c +2 -2
@@ -19,11 +19,11 @@#include <linux/workqueue.h> #include <linux/netlink.h> #include <linux/net_dropmon.h> -#include <trace/skb.h> #include <asm/unaligned.h> #include <asm/bitops.h> +#define CREATE_TRACE_POINTS +#include <trace/skb.h> -DEFINE_TRACE (kfree_skb);EXPORT_TRACEPOINT_SYMBOL_GPL (kfree_skb);
Signature · 3 lines
1.6.2.1 --
Re: [PATCH 2/8] tracing: create automated trace defines
How about something like this:
Quoted 1 line
From
f7fa71c046bc383706bf58503c4b75e05e252152Mon Sep 17 00:00:00 2001
From: Jeremy Fitzhardinge <[email protected]>
Date: Tue, 14 Apr 2009 16:41:18 -0700
Subject: [PATCH] tracing: move __DO_TRACE out of line
Mainly simplify linux/tracepoint.h's include dependencies (removes rcupdate.h), but it can't help with icache locality, since it definitely moves the code out of line, rather than relying on gcc to do it.
include/linux/tracepoint.h +0 -0
@@ -15,7 +15,6 @@*/
#include <linux/types.h>
-#include <linux/rcupdate.h>
struct module;
struct tracepoint;
@@ -42,19 +41,20 @@ struct tracepoint {
* it_func[0] is never NULL because there is at least one element in the array
* when the array itself is non NULL.
*/
-#define __DO_TRACE(tp, proto, args) \
- do { \
+#define DEFINE_DO_TRACE(name, proto, args) \
+ void __do_trace_##name(struct tracepoint *tp, TP_PROTO(proto)) \
+ { \
void **it_func; \
\
rcu_read_lock_sched_notrace(); \
- it_func = rcu_dereference((tp)->funcs); \
+ it_func = rcu_dereference(tp->funcs); \
if (it_func) { \
do { \
((void(*)(proto))(*it_func))(args); \
} while (*(++it_func)); \
} \
rcu_read_unlock_sched_notrace(); \- } while (0)
+ }
/*
* Make sure the alignment of the structure in the __tracepoints section will
@@ -63,11 +63,13 @@ struct tracepoint {
*/
#define DECLARE_TRACE(name, proto, args) \
extern struct tracepoint __tracepoint_##name; \
+ extern void __do_trace_##name(struct tracepoint *tp, \
+ TP_PROTO(proto)); \
static inline void trace_##name(proto) \
{ \
if (unlikely(__tracepoint_##name.state)) \
- __DO_TRACE(&__tracepoint_##name, \
- TP_PROTO(proto), TP_ARGS(args)); \
+ __do_trace_##name(&__tracepoint_##name, \
+ TP_ARGS(args)); \
} \
static inline int register_trace_##name(void (*probe)(proto)) \
{ \@@ -151,10 +153,7 @@ extern int tracepoint_get_iter_range(struct tracepoint **tracepoint,
* probe unregistration and the end of module exit to make sure there is no
* caller executing a probe when it is freed.
*/
-static inline void tracepoint_synchronize_unregister(void)
-{
- synchronize_sched();
-}
+extern void tracepoint_synchronize_unregister(void);
#define PARAMS(args...) args
include/trace/define_trace.h +0 -0
@@ -24,14 +24,17 @@
#undef TRACE_EVENT
#define TRACE_EVENT(name, proto, args, tstruct, assign, print) \
+ DEFINE_DO_TRACE(name, TP_PROTO(proto), TP_ARGS(args)) \
DEFINE_TRACE(name)
#undef TRACE_FORMAT
-#define TRACE_FORMAT(name, proto, args, print) \
+#define TRACE_FORMAT(name, proto, args, print) \
+ DEFINE_DO_TRACE(name, TP_PROTO(proto), TP_ARGS(args)) \
DEFINE_TRACE(name)
#undef DECLARE_TRACE
-#define DECLARE_TRACE(name, proto, args) \
+#define DECLARE_TRACE(name, proto, args) \
+ DEFINE_DO_TRACE(name, TP_PROTO(proto), TP_ARGS(args)) \
DEFINE_TRACE(name)
#undef TRACE_INCLUDE
kernel/tracepoint.c +0 -0
@@ -545,6 +545,12 @@ void tracepoint_iter_reset(struct tracepoint_iter *iter)
}EXPORT_SYMBOL_GPL(tracepoint_iter_reset);
+void tracepoint_synchronize_unregister(void) +{
+ synchronize_sched();
+} +EXPORT_SYMBOL_GPL(tracepoint_synchronize_unregister); +
#ifdef CONFIG_MODULES
int tracepoint_module_notify(struct notifier_block *self,
Re: [PATCH 2/8] tracing: create automated trace defines
Quoted 27 lines · * Jeremy Fitzhardinge ([email protected]) wrote:
How about something like this:
From
f7fa71c046bc383706bf58503c4b75e05e252152Mon Sep 17 00:00:00 2001
From: Jeremy Fitzhardinge <[email protected]>
Date: Tue, 14 Apr 2009 16:41:18 -0700
Subject: [PATCH] tracing: move__DO_TRACEout of lineMainly simplify linux/tracepoint.h's include dependencies (removes
rcupdate.h), but it can't help with icache locality, since it definitely moves the code out of line, rather than relying on gcc to do it.Signed-off-by Jeremy Fitzhardinge <[email protected]>include/linux/tracepoint.h +0
-1@@ -15,7 +15,6 @@*/ #include <linux/types.h> -#include <linux/rcupdate.h> struct module ;struct tracepoint ;
include/linux/tracepoint.h struct tracepoint { · line 45
Quoted 7 lines
include/linux/tracepoint.h +2
-2@@ -42,19 +41,20 @@ struct tracepoint {* it_func[0] is never NULL because there is at least one element in the array * when the array itself is non NULL. */ -#define __DO_TRACE (tp, proto, args) \ - do { \ +#define DEFINE_DO_TRACE (name, proto, args) \ + void __do_trace_##name(struct tracepoint *tp, TP_PROTO(proto)) \
I fear that won't work with "void" prototype. If we need this kind of flexibility, we will need to create a special case for empty prototype.
Mathieu
Quoted 88 lines
include/linux/tracepoint.h +8
-8+ { \void **it_func; \ \rcu_read_lock_sched_notrace (); \ - it_func =rcu_dereference ((tp)->funcs); \ + it_func =rcu_dereference (tp->funcs); \if (it_func) { \do { \ ((void (*)(proto ))(*it_func))(args); \ }while (*(++it_func)); \ } \rcu_read_unlock_sched_notrace (); \ - }while (0 ) + }/* * Make sure the alignment of the structure in the __tracepoints section will @@ -63,11 +63,13 @@ struct tracepoint {*/ #define DECLARE_TRACE (name, proto, args) \ extern struct tracepoint __tracepoint_##name; \ + extern void __do_trace_##name(struct tracepoint *tp, \ + TP_PROTO(proto)); \ static inline void trace_##name(proto) \ { \ if (unlikely(__tracepoint_##name.state)) \ - __DO_TRACE(&__tracepoint_##name, \ - TP_PROTO(proto), TP_ARGS(args)); \ + __do_trace_##name(&__tracepoint_##name, \ + TP_ARGS(args)); \ } \ static inline int register_trace_##name(void (*probe)(proto)) \ { \@@ -151,10 +153,7 @@ extern int tracepoint_get_iter_range(struct tracepoint **tracepoint,* probe unregistration and the end of module exit to make sure there is no * caller executing a probe when it is freed. */ -static inline void tracepoint_synchronize_unregister (void ) -{ -synchronize_sched (); -} +extern void tracepoint_synchronize_unregister (void ); #define PARAMS(args...) argsinclude/trace/define_trace.h +5
-2@@ -24,14 +24,17 @@#undef TRACE_EVENT#define TRACE_EVENT (name, proto, args, tstruct, assign, print) \ + DEFINE_DO_TRACE(name, TP_PROTO(proto), TP_ARGS(args)) \ DEFINE_TRACE(name)#undef TRACE_FORMAT -#define TRACE_FORMAT (name, proto, args, print) \ +#define TRACE_FORMAT (name, proto, args, print) \ + DEFINE_DO_TRACE(name, TP_PROTO(proto), TP_ARGS(args)) \ DEFINE_TRACE(name)#undef DECLARE_TRACE -#define DECLARE_TRACE (name, proto, args) \ +#define DECLARE_TRACE (name, proto, args) \ + DEFINE_DO_TRACE(name, TP_PROTO(proto), TP_ARGS(args)) \ DEFINE_TRACE(name)#undef TRACE_INCLUDEkernel/tracepoint.c +6
-0@@ -545,6 +545,12 @@ void tracepoint_iter_reset(struct tracepoint_iter *iter) }EXPORT_SYMBOL_GPL (tracepoint_iter_reset); +void tracepoint_synchronize_unregister (void ) +{ +synchronize_sched (); +} +EXPORT_SYMBOL_GPL (tracepoint_synchronize_unregister); +#ifdef CONFIG_MODULES int tracepoint_module_notify(struct notifier_block *self,
Signature · 2 lines
Mathieu Desnoyers OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
Re: [PATCH 2/8] tracing: create automated trace defines
Quoted 10 lines · Mathieu Desnoyers
Review
Quoted 5 lines · * Jeremy Fitzhardinge ([email protected]) wrote:
(quoted diff) +2
-2-#define __DO_TRACE(tp, proto, args) \ - do { \ +#define DEFINE_DO_TRACE(name, proto, args) \ + void __do_trace_##name(struct tracepoint *tp, TP_PROTO(proto)) \I fear that won't work with "void" prototype. If we need this kind of flexibility, we will need to create a special case for empty prototype.
Yes, that has been a bit awkward. I couldn't find a way to create a no-param tracepoint, and so ended up passing a dummy arg. Stupid C syntax.
On the other hand, I can get something that actually compiles this way...
J
Re: [PATCH 2/8] tracing: create automated trace defines
Quoted 12 lines · * Jeremy Fitzhardinge ([email protected]) wrote:
Quoted 10 lines · Mathieu Desnoyers
Review
Quoted 5 lines · * Jeremy Fitzhardinge ([email protected]) wrote:
(quoted diff) +2
-2-#define __DO_TRACE(tp, proto, args) \ - do { \ +#define DEFINE_DO_TRACE(name, proto, args) \ + void __do_trace_##name(struct tracepoint *tp, TP_PROTO(proto)) \I fear that won't work with "void" prototype. If we need this kind of flexibility, we will need to create a special case for empty prototype.
Quoted 7 lines
Yes, that has been a bit awkward. I couldn't find a way to create a no-param tracepoint, and so ended up passing a dummy arg. Stupid C syntax.
On the other hand, I can get something that actually compiles this way...
J
Is your only problem the fact that tracepoints include rcupdate.h ? This can easily be solved by moving rcu_read_(un)lock_sched_notrace to a rcu-update-<insert meaningful name here> and include this header in rcupdate.h and tracepoint.h.
We could keep the indirection layer you proposed for synchronize_sched() though, even if it adds an unnecessary function call. It's a slow path anyway.
If by doing these modifications we succeed in keeping the "void" parameters working _and_ make your stuff to compile, I think we would have done something great. :-)
Mathieu
Signature · 2 lines
Mathieu Desnoyers OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
Re: [PATCH 2/8] tracing: create automated trace defines
Quoted 1 line · Mathieu Desnoyers
Is your only problem the fact that tracepoints include
rcupdate.h?
No. That was the first roadblock, which caused massive cyclic dependencies between includes and consequent failure to define everything required. I solved that by pushing __DO_TRACE out of line. Everything since then is a separate issue.
Quoted 5 lines
This
can easily be solved by moving rcu_read_(un)lock_sched_notrace to a rcu-update-<insert meaningful name here> and include this header inrcupdate.handtracepoint.h.
I suppose, but I think pushing __do_trace_##name out of line is cleaner anyway. And I think it's very important that tracepoint.h have a *absolutely minimal* #include set, so that it can be safely included in as many contexts as possible. asm/paravirt.h is complex enough as it is, and I really don't want tracepoint bringing in any extra headers at all. linux/types.h is about the only acceptable one.
Quoted 4 lines
If by doing these modifications we succeed in keeping the "void" parameters working _and_ make your stuff to compile, I think we would have done something great. :-)
The void issue is irritating, but relatively minor compared to the rest. If everything else gets solved except for the need to pass a dummy param to no-arg tracepoints, then I think it'll be a generally useful facility.
J
Re: [PATCH 2/8] tracing: create automated trace defines
Quoted 20 lines · * Jeremy Fitzhardinge ([email protected]) wrote:
Quoted 1 line · Mathieu Desnoyers
Is your only problem the fact that tracepoints include
rcupdate.h?No. That was the first roadblock, which caused massive cyclic dependencies between includes and consequent failure to define everything required. I solved that by pushing
__DO_TRACEout of line. Everything since then is a separate issue.Quoted 5 lines
This
can easily be solved by moving rcu_read_(un)lock_sched_notrace to a rcu-update-<insert meaningful name here> and include this header inrcupdate.handtracepoint.h.I suppose, but I think pushing __do_trace_##name out of line is cleaner anyway. And I think it's very important that
tracepoint.hhave a *absolutely minimal* #include set, so that it can be safely included in as many contexts as possible.asm/paravirt.his complex enough as it is, and I really don't want tracepoint bringing in any extra headers at all.linux/types.his about the only acceptable one.
Quoted 9 lines
Quoted 4 lines
If by doing these modifications we succeed in keeping the "void" parameters working _and_ make your stuff to compile, I think we would have done something great. :-)
The void issue is irritating, but relatively minor compared to the rest. If everything else gets solved except for the need to pass a dummy param to no-arg tracepoints, then I think it'll be a generally useful facility.
The other point I dislike about the out-of-line approach is that the tracer will suffer from a pointless supplementary function call at each event. Given how slow function calls are, at least on x86, I'd prefer leaving the handler call chain inline, unless there is a very strong reason not to do so.
I'll come up with a patch that leaves the tracepoint inline, but fixes the header dependency.
Mathieu
Quoted 2 lines
J
Signature · 2 lines
Mathieu Desnoyers OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
Re: [PATCH 2/8] tracing: create automated trace defines
Quoted 6 lines · Mathieu Desnoyers
The other point I dislike about the out-of-line approach is that the tracer will suffer from a pointless supplementary function call at each event. Given how slow function calls are, at least on x86, I'd prefer leaving the handler call chain inline, unless there is a very strong reason not to do so.
Are they? They're generally considered to be "free", because the call and return are predicted 100% accurately.
Quoted 3 lines
I'll come up with a patch that leaves the tracepoint inline, but fixes the header dependency.
OK.
J
Re: [PATCH 2/8] tracing: create automated trace defines
Quoted 11 lines · * Jeremy Fitzhardinge ([email protected]) wrote:
Quoted 6 lines · Mathieu Desnoyers
The other point I dislike about the out-of-line approach is that the tracer will suffer from a pointless supplementary function call at each event. Given how slow function calls are, at least on x86, I'd prefer leaving the handler call chain inline, unless there is a very strong reason not to do so.
Are they? They're generally considered to be "free", because the call and return are predicted 100% accurately.
Adding a simple function call within the tracer fast path, in LTTng, has a very measurable performance impact on the tbench workload. This is why I don't use any function call-based trace clocks in LTTng, but rather my own inline trace clock.
Mathieu
Quoted 7 lines
Quoted 3 lines
I'll come up with a patch that leaves the tracepoint inline, but fixes the header dependency.
OK.
J
Signature · 2 lines
Mathieu Desnoyers OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
Re: [PATCH 2/8] tracing: create automated trace defines
Quoted 8 lines · Mathieu Desnoyers
Quoted 3 lines
Are they? They're generally considered to be "free", because the call and return are predicted 100% accurately.
Adding a simple function call within the tracer fast path, in LTTng, has a very measurable performance impact on the tbench workload. This is why I don't use any function call-based trace clocks in LTTng, but rather my own inline trace clock.
I'm a bit concerned about all the code that tracing puts inline though. It seems it would put quite a lot of icache overhead on the codepath when the tracepoint is disabled, not least because its duplicated in every instance of the tracepoint. And if the compiler decides to put the unlikely() branch code out of line, then that's the same as making it a function call (except that if it is a function call, all the tracepoints will share the same code, and get a higher likelihood of getting icache hits).
J
Re: [PATCH 2/8] tracing: create automated trace defines
Quoted 11 lines · * Jeremy Fitzhardinge ([email protected]) wrote:
Quoted 9 lines · Mathieu Desnoyers
Quoted 4 lines
Are they? They're generally considered to be "free", because the call and return are predicted 100% accurately.
Adding a simple function call within the tracer fast path, in LTTng, has a very measurable performance impact on the tbench workload. This is why I don't use any function call-based trace clocks in LTTng, but rather my own inline trace clock.
Quoted 9 lines
I'm a bit concerned about all the code that tracing puts inline though. It seems it would put quite a lot of icache overhead on the codepath when the tracepoint is disabled, not least because its duplicated in every instance of the tracepoint. And if the compiler decides to put the
unlikely()branch code out of line, then that's the same as making it a function call (except that if it is a function call, all the tracepoints will share the same code, and get a higher likelihood of getting icache hits).
"all this code" is actually :
rcu_read_lock_sched_notrace(); \
it_func = rcu_dereference((tp)->funcs); \
if (it_func) { \
do { \
((void(*)(proto))(*it_func))(args); \
} while (*(++it_func)); \
} \
rcu_read_unlock_sched_notrace(); \Which does nothing more than disabling preemption and a for loop to call all the tracepoint handlers. I don't see the big win in laying out the stack to call this code out-of-line; we would just remove the preempt disable and the loop, which are minimal compared to most call stacks.
So basically, tracepoints are already just doing a function call, with a few more bytes for preempt disable and multiple handler support.
About the compiler deciding to put the unlikely branch out-of-line, I've never seen any function calls generated just for the sake of saving those few bytes, that would be crazy of the part of the compiler. However, it can (and should) freely put the stack setup in the coldest cache-lines possible, which are reachable by a near jump.
Mathieu
Quoted 3 lines
J
Signature · 2 lines
Mathieu Desnoyers OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
Re: [PATCH 2/8] tracing: create automated trace defines
Quoted 11 lines · Mathieu Desnoyers
"all this code" is actually :
rcu_read_lock_sched_notrace(); \ it_func = rcu_dereference((tp)->funcs); \ if (it_func) { \ do { \ ((void(*)(proto))(*it_func))(args); \ } while (*(++it_func)); \ } \ rcu_read_unlock_sched_notrace(); \
Quoted 6 lines
Which does nothing more than disabling preemption and a for loop to call all the tracepoint handlers. I don't see the big win in laying out the stack to call this code out-of-line; we would just remove the preempt disable and the loop, which are minimal compared to most call stacks.
Well, look at it from my perspective: Ingo has been repeatedly beating me up for the overhead pvops adds to a native kernel, where it really is just a (direct) function call. I want to instrument each pvop site with a tracepoint so I can actually work out which calls are being called how frequently to look for new optimisation opportunities.
I would guess the tracepoint code sequence is going to increase the impact of each pvop call site by a fair bit, and that's not counting the effects the extra register pressure will have. That's a pile of code to add.
And frankly, that's fine by me, because I would expect this degree of introspection to have some performance hit. But it does make the need for per-subsystem tracing Kconfig entries fairly important, because I don't think this would be acceptable to ship in a non-debug-everything kernel build, even though other tracepoints might be.
Quoted 9 lines
So basically, tracepoints are already just doing a function call, with a few more bytes for preempt disable and multiple handler support.
About the compiler deciding to put the unlikely branch out-of-line, I've never seen any function calls generated just for the sake of saving those few bytes, that would be crazy of the part of the compiler. However, it can (and should) freely put the stack setup in the coldest cache-lines possible, which are reachable by a near jump.
No, it wouldn't generate a call. But if its going to put the code out of line into cold cache-lines, then it may as well generate a call.
Anyway, the important point from my perspective is that tracepoint.h have no #include dependencies beyond linux/types.h (compiler.h, etc).
J
PATCH 1/1 tracepoints : let subsystem nop-out the tracepoints at build time
Quoted 30 lines · * Jeremy Fitzhardinge ([email protected]) wrote:
Quoted 11 lines · Mathieu Desnoyers
"all this code" is actually :
rcu_read_lock_sched_notrace(); \ it_func = rcu_dereference((tp)->funcs); \ if (it_func) { \ do { \ ((void(*)(proto))(*it_func))(args); \ } while (*(++it_func)); \ } \ rcu_read_unlock_sched_notrace(); \Quoted 6 lines
Which does nothing more than disabling preemption and a for loop to call all the tracepoint handlers. I don't see the big win in laying out the stack to call this code out-of-line; we would just remove the preempt disable and the loop, which are minimal compared to most call stacks.
Well, look at it from my perspective: Ingo has been repeatedly beating me up for the overhead pvops adds to a native kernel, where it really is just a (direct) function call. I want to instrument each pvop site with a tracepoint so I can actually work out which calls are being called how frequently to look for new optimisation opportunities.
I would guess the tracepoint code sequence is going to increase the impact of each pvop call site by a fair bit, and that's not counting the effects the extra register pressure will have. That's a pile of code to add.
Quoted 6 lines
And frankly, that's fine by me, because I would expect this degree of introspection to have some performance hit. But it does make the need for per-subsystem tracing
Kconfigentries fairly important, because I don't think this would be acceptable to ship in a non-debug-everything kernel build, even though other tracepoints might be.
Agreed. Tracepoints might change the code surrounding the pvops in a similar fashion as the pvops themselves would change the code. Therefore, it makes sense to have a Kconfig option to enable the pvops tracepoints.
In terms of tracepoints (with the DECLARE_TRACE/DEFINE_TRACE semantic), we could have something like :
in include/trace/pvops.h :
#include <linux/tracepoint.h>
#ifdef CONFIG_PVOPS_TRACEPOINTS
#define DECLARE_PVOPS_TRACE DECLARE_TRACE
#define DEFINE_PVOPS_TRACE DEFINE_TRACE
#define EXPORT_PVOPS_TRACEPOINT_SYMBOL_GPL EXPORT_TRACEPOINT_SYMBOL_GPL
#define EXPORT_PVOPS_TRACEPOINT_SYMBOL EXPORT_TRACEPOINT_SYMBOL
#else /* !CONFIG_PVOPS_TRACEPOINTS */
#define DECLARE_PVOPS_TRACE DECLARE_TRACE_NOP
#define DEFINE_PVOPS_TRACE DEFINE_TRACE_NOP
#define EXPORT_PVOPS_TRACEPOINT_SYMBOL_GPL EXPORT_TRACEPOINT_SYMBOL_GPL_NOP
#define EXPORT_PVOPS_TRACEPOINT_SYMBOL EXPORT_TRACEPOINT_SYMBOL_NOP
#endif /* CONFIG_PVOPS_TRACEPOINTS */
And then do the declarations/definitions using the new
DECLARE_PVOPS_TRACE / DEFINE_PVOPS_TRACE.
For that you'll need the patch I am attaching below. I'll let Steven figure out how to tweak TRACE_EVENT() to support this new tracepoint feature.
Quoted 10 lines
Quoted 9 lines
So basically, tracepoints are already just doing a function call, with a few more bytes for preempt disable and multiple handler support.
About the compiler deciding to put the unlikely branch out-of-line, I've never seen any function calls generated just for the sake of saving those few bytes, that would be crazy of the part of the compiler. However, it can (and should) freely put the stack setup in the coldest cache-lines possible, which are reachable by a near jump.
Quoted 3 lines
No, it wouldn't generate a call. But if its going to put the code out of line into cold cache-lines, then it may as well generate a call.
Jumping out-of-line was somewhat faster than calling a function if I recall well my performance tests. But that's all been done long ago.
And note that whenever the tracer becomes active, the out-of-line code of busy tracepoints becomes cache-hot, which means that there is no more cache line fetch to perform, which leaves the stack setup and other overhead of function call/return vs 2*jump very measurable.
Quoted 3 lines
Anyway, the important point from my perspective is that
tracepoint.hhave no #include dependencies beyondlinux/types.h(compiler.h, etc).
Is preempt.h a problem ?
Here is the patch.
Mathieu
tracepoints : let subsystem nop-out the tracepoints at build time
--- include/linux/tracepoint.h | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-)
include/linux/tracepoint.h +22 -16
@@ -37,6 +37,24 @@ struct tracepoint { #define TP_PROTO(args...) args #define TP_ARGS(args...) args +#define DECLARE_TRACE_NOP (name, proto, args) \ + static inline void _do_trace_##name(struct tracepoint *tp, proto) \ + { } \ + static inline void trace_##name(proto) \ + { } \ + static inline int register_trace_##name(void (*probe)(proto)) \ + { \ + return -ENOSYS; \ + } \ + static inline int unregister_trace_##name(void (*probe)(proto)) \ + { \ + return -ENOSYS; \ + } + +#define DEFINE_TRACE_NOP (name) +#define EXPORT_TRACEPOINT_SYMBOL_GPL_NOP (name) +#define EXPORT_TRACEPOINT_SYMBOL_NOP (name) +#ifdef CONFIG_TRACEPOINTS /*
@@ -95,23 +113,11 @@ extern void tracepoint_update_probe_rang struct tracepoint *end);#else /* !CONFIG_TRACEPOINTS */ -#define DECLARE_TRACE (name, proto, args) \ - static inline void _do_trace_##name(struct tracepoint *tp, proto) \ - { } \ - static inline void trace_##name(proto) \ - { } \ - static inline int register_trace_##name(void (*probe)(proto)) \ - { \ - return -ENOSYS; \ - } \ - static inline int unregister_trace_##name(void (*probe)(proto)) \ - { \ - return -ENOSYS; \ - } -#define DEFINE_TRACE (name) -#define EXPORT_TRACEPOINT_SYMBOL_GPL (name) -#define EXPORT_TRACEPOINT_SYMBOL (name) +#define DECLARE_TRACE DECLARE_TRACE_NOP +#define DEFINE_TRACE DEFINE_TRACE_NOP +#define EXPORT_TRACEPOINT_SYMBOL_GPL EXPORT_TRACEPOINT_SYMBOL_GPL_NOP +#define EXPORT_TRACEPOINT_SYMBOL EXPORT_TRACEPOINT_SYMBOL_NOPstatic inline void tracepoint_update_probe_range (struct tracepoint *begin,struct tracepoint *end)
Signature · 2 lines
Mathieu Desnoyers OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
Re: [PATCH 2/8] tracing: create automated trace defines
In reply to Mathieu DesnoyersQuoted 1 line · Mathieu Desnoyers
Given how slow function calls are, at least on x86,
That was with frame pointers right? Frame pointers tend to make function calls slow.
-Andi
Signature · 1 line
[email protected] -- Speaking for myself only.
Re: [PATCH 2/8] tracing: create automated trace defines
Quoted 7 lines · * Andi Kleen ([email protected]) wrote:
Quoted 1 line · Mathieu Desnoyers
Given how slow function calls are, at least on x86,
That was with frame pointers right? Frame pointers tend to make function calls slow.
Looking at my .config, CONFIG_FRAME_POINTER is disabled here. So we should probably expect an even worse performance impact if we enable them.
Mathieu
Quoted 4 lines
-Andi
Signature · 1 line
[email protected] -- Speaking for myself only.
Signature · 2 lines
Mathieu Desnoyers OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
Re: [PATCH 2/8] tracing: create automated trace defines
Quoted 7 lines · Mathieu Desnoyers
Quoted 5 lines · * Andi Kleen ([email protected]) wrote:
Quoted 2 lines · Mathieu Desnoyers
Given how slow function calls are, at least on x86,
Quoted 8 lines
Quoted 4 lines
That was with frame pointers right? Frame pointers tend to make function calls slow.
Looking at my .config,
CONFIG_FRAME_POINTERis disabled here. So we should probably expect an even worse performance impact if we enable them.
I tried disabling frame pointers, but it looked to me like tracing selects them. Did I misread, or perhaps it was some other config option doing it...
J
Steven Rostedt
maintainerRe: [PATCH 2/8] tracing: create automated trace defines
Quoted 13 lines · Jeremy Fitzhardinge
Quoted 12 lines · Mathieu Desnoyers
Quoted 9 lines · * Andi Kleen ([email protected]) wrote:
Quoted 2 lines · Mathieu Desnoyers
Given how slow function calls are, at least on x86,
That was with frame pointers right? Frame pointers tend to make function calls slow.
Quoted 6 lines
Quoted 3 lines
Looking at my .config,
CONFIG_FRAME_POINTERis disabled here. So we should probably expect an even worse performance impact if we enable them.I tried disabling frame pointers, but it looked to me like tracing selects them. Did I misread, or perhaps it was some other config option doing it...
It is needed for the function tracer (gcc -pg wont work without it). It is the only tracer that selects it.
-- Steve
Re: [PATCH 2/8] tracing: create automated trace defines
Quoted 7 lines · Steven Rostedt
Quoted 4 lines
I tried disabling frame pointers, but it looked to me like tracing selects them. Did I misread, or perhaps it was some other config option doing it...
It is needed for the function tracer (gcc -pg wont work without it). It is the only tracer that selects it.
Ah, right. I'm never sure what all the trace options actually control, so I tend to enable them a bit indescriminately.
J
Re: [PATCH 2/8] tracing: create automated trace defines
In reply to Steven RostedtQuoted 2 lines
It is needed for the function tracer (gcc -pg wont work without it). It is the only tracer that selects it.
FWIW i still have gcc patches to fix that. They were first stalled on copyright assignment and then on gcc's merge window being closed, but now with 4.5 open for game I hope to resubmit them soon again.
With that you can use -pg without frame pointer, but you have to supply a special mcount function that expects the different stack layout.
-Andi
Signature · 1 line
[email protected] -- Speaking for myself only.
Steven Rostedt
maintainerRe: [PATCH 2/8] tracing: create automated trace defines
Quoted 11 lines · Andi Kleen
Quoted 2 lines
It is needed for the function tracer (gcc -pg wont work without it). It is the only tracer that selects it.
FWIW i still have gcc patches to fix that. They were first stalled on copyright assignment and then on gcc's merge window being closed, but now with 4.5 open for game I hope to resubmit them soon again.
With that you can use -pg without frame pointer, but you have to supply a special mcount function that expects the different stack layout.
I think it was Ingo that let out the idea, and I'm starting to like it.
Perhaps we should fork off gcc and ship Linux with its own compiler. This way we can optimize it for the kernel and not worry about any userland optimizations.
I would like to do something like:
if (unlikely(err)) {
__section__(".error_sect") {
/* put error code here */
}
}And have gcc in the error section (if it is big enough perhaps) do:
jmp .L123
.L124 [...]
and in the section ".error_sect" we would have:
.L123
/* error code here */ jmp .L124
We could do the same for trace points. That is, any part of code that really would happen once in a while (error handling for one) we can move off to its own section and keep hot paths hot.
-- Steve
Re: [PATCH 2/8] tracing: create automated trace defines
Hi -
Quoted 3 lines · Steven Rostedt
[...] Perhaps we should fork off gcc and ship Linux with its own compiler. This way we can optimize it for the kernel and not worry about any userland optimizations.
In this regard, kernel land does not seem that unlike user land.
Quoted 7 lines
if (unlikely(err)) { __section__(".error_sect") { /* put error code here */ } }And have gcc in the error section (if it is big enough perhaps) do:
Quoted 8 lines
jmp .L123 .L124 [...] [...] jmp .L124We could do the same for trace points. That is, any part of code that really would happen once in a while (error handling for one) we can move off to its own section and keep hot paths hot.
This is called -freorder-blocks or -freorder-blocks-and-partition (depending on how far you would like gcc to move unlikely blocks).
- FChE
Steven Rostedt
maintainerRe: [PATCH 2/8] tracing: create automated trace defines
[ removed [email protected] due to mail errors ]
Quoted 22 lines · Frank Ch. Eigler
Hi -
Quoted 3 lines · Steven Rostedt
[...] Perhaps we should fork off gcc and ship Linux with its own compiler. This way we can optimize it for the kernel and not worry about any userland optimizations.
In this regard, kernel land does not seem that unlike user land.
Quoted 11 lines
if (unlikely(err)) { __section__(".error_sect") { /* put error code here */ } }And have gcc in the error section (if it is big enough perhaps) do:
jmp .L123 .L124 [...] [...] jmp .L124
Quoted 6 lines
Quoted 3 lines
We could do the same for trace points. That is, any part of code that really would happen once in a while (error handling for one) we can move off to its own section and keep hot paths hot.
This is called -freorder-blocks or -freorder-blocks-and-partition (depending on how far you would like gcc to move unlikely blocks).
That does not let us pick and choose what and where to put the code.
But still, a fork of gcc would let us optimize it for the kernel, and not for generic programs.
/me has been sitting too close to the furnace and must have been taking up some of those fumes, to be considering a fork of gcc a good idea ;-)
-- Steve
Re: [PATCH 2/8] tracing: create automated trace defines
Quoted 34 lines · * Steven Rostedt ([email protected]) wrote:
[ removed [email protected] due to mail errors ]
Quoted 22 lines · Frank Ch. Eigler
Hi -
Quoted 3 lines · Steven Rostedt
[...] Perhaps we should fork off gcc and ship Linux with its own compiler. This way we can optimize it for the kernel and not worry about any userland optimizations.
In this regard, kernel land does not seem that unlike user land.
Quoted 11 lines
if (unlikely(err)) { __section__(".error_sect") { /* put error code here */ } }And have gcc in the error section (if it is big enough perhaps) do:
jmp .L123 .L124 [...] [...] jmp .L124Quoted 6 lines
Quoted 3 lines
We could do the same for trace points. That is, any part of code that really would happen once in a while (error handling for one) we can move off to its own section and keep hot paths hot.
This is called -freorder-blocks or -freorder-blocks-and-partition (depending on how far you would like gcc to move unlikely blocks).
Quoted 8 lines
That does not let us pick and choose what and where to put the code.
But still, a fork of gcc would let us optimize it for the kernel, and not for generic programs.
/me has been sitting too close to the furnace and must have been taking up some of those fumes, to be considering a fork of gcc a good idea ;-)
I guess we should have been sitting near the same furnace then. I'm unsure how different from the current gcc this can go, but it could be a very interesting exercise. Just removing unneeded front ends could probably help adding features much faster than if we have to support Fortran, Java, etc.
Mathieu
Quoted 2 lines
-- Steve
Signature · 2 lines
Mathieu Desnoyers OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
Re: [PATCH 2/8] tracing: create automated trace defines
In reply to Steven RostedtQuoted 10 lines
I think it was Ingo that let out the idea, and I'm starting to like it.
Perhaps we should fork off gcc and ship Linux with its own compiler. This way we can optimize it for the kernel and not worry about any userland optimizations.
I would like to do something like:
if (unlikely(err)) { __section__(".error_sect") {
gcc already supports that, you don't need to fork anything. It's called hot/cold partitioning. Basically it splits functions into hot and cold and unlikely parts and all the cold/unlikely parts go into a separate sections.
I think it's normally not enabled by default on x86 though, probably because it doesn't help too much.
By default (unless you specify -fno-reorder-blocks) it does the same without sections, just moving unlikely code out of line.
-Andi
Signature · 1 line
[email protected] -- Speaking for myself only.
Steven Rostedt
maintainerRe: [PATCH 2/8] tracing: create automated trace defines
Quoted 17 lines · Andi Kleen
Quoted 10 lines
I think it was Ingo that let out the idea, and I'm starting to like it.
Perhaps we should fork off gcc and ship Linux with its own compiler. This way we can optimize it for the kernel and not worry about any userland optimizations.
I would like to do something like:
if (unlikely(err)) { __section__(".error_sect") {gcc already supports that, you don't need to fork anything. It's called hot/cold partitioning. Basically it splits functions into hot and cold and unlikely parts and all the cold/unlikely parts go into a separate sections.
Quoted 5 lines
I think it's normally not enabled by default on x86 though, probably because it doesn't help too much.
By default (unless you specify -fno-reorder-blocks) it does the same without sections, just moving unlikely code out of line.
The unlikely code does not always get moved out that far. It still sits inside a function, and looking at the tracepoint code it did not move it far enough.
If you have a bunch of functions that each with an unlikely statement, those unlikely sections will still be interleaved within the function code.
In the case of tracepoints, it would be nice to move all the code that sets up the function call out of the hot paths. If we could move it to its own section, that would be much better.
Having all "unlikely"s go into a separate section would not help much, since according to the branch profiler there are a lot of "unlikely"s in the kernel that are not too unlikely.
If gcc can indeed move "unlikely" code completely out of the fast path, and put it into its own sections, then I think we should go through the kernel and start removing all "likely" and "unlikely"s that are not 99% accurate. Then we can enable the separate section cold paths and perhaps see a performance benefit.
-- Steve
Re: [PATCH 2/8] tracing: create automated trace defines
Quoted 23 lines · Steven Rostedt
Quoted 20 lines · Andi Kleen
Quoted 10 lines
I think it was Ingo that let out the idea, and I'm starting to like it.
Perhaps we should fork off gcc and ship Linux with its own compiler. This way we can optimize it for the kernel and not worry about any userland optimizations.
I would like to do something like:
if (unlikely(err)) { __section__(".error_sect") {gcc already supports that, you don't need to fork anything. It's called hot/cold partitioning. Basically it splits functions into hot and cold and unlikely parts and all the cold/unlikely parts go into a separate sections.
I think it's normally not enabled by default on x86 though, probably because it doesn't help too much.
Quoted 6 lines
Quoted 2 lines
By default (unless you specify -fno-reorder-blocks) it does the same without sections, just moving unlikely code out of line.
The unlikely code does not always get moved out that far. It still sits inside a function, and looking at the tracepoint code it did not move it far enough.
That's because you didn't enable the hot/cold partioning as I wrote. These are separate options. By default it doesn't use partitions on x86, but it can.
Quoted 5 lines
If gcc can indeed move "unlikely" code completely out of the fast path, and put it into its own sections, then I think we should go through the kernel and start removing all "likely" and "unlikely"s that are not 99% accurate. Then we can enable the separate section cold paths and perhaps see a performance benefit.
iirc there wasn't much for using separate partitions with the usual user space benchmarks (SpecCPU etc.) on x86. It helped a bit on POWER apparently though.
-Andi
Signature · 1 line
[email protected] -- Speaking for myself only.
Re: [PATCH 2/8] tracing: create automated trace defines
In reply to Steven RostedtQuoted 115 lines · Steven Rostedt
From: Steven Rostedt <[email protected]>
This patch lowers the number of places a developer must modify to add new tracepoints. The current method to add a new tracepoint into an existing system is to write the trace point macro in the trace header with one of the macros
TRACE_EVENT,TRACE_FORMATorDECLARE_TRACE, then they must add the same named item into the C file with the macroDEFINE_TRACE(name)and then add the trace point.This change cuts out the needing to add the
DEFINE_TRACE(name). Every file that uses the tracepoint must still include the trace/<type>.h file, but the one C file must also add a define before the including of that file.#define
CREATE_TRACE_POINTS
#include <trace/mytrace.h>This will cause the
trace/mytrace.hfile to also produce the C code necessary to implement the trace point.Note, if more than one trace/<type>.h is used to create the C code it is best to list them all together.
#define
CREATE_TRACE_POINTS
#include <trace/foo.h>
#include <trace/bar.h>
#include <trace/fido.h>Thanks to Mathieu Desnoyers and Christoph Hellwig for coming up with the cleaner solution of the define above the includes over my first design to have the C code include a "special" header.
This patch converts sched, irq and lockdep and skb to use this new method.
Cc Peter Zijlstra <[email protected]>Cc Thomas Gleixner <[email protected]>Cc Neil Horman <[email protected]>Cc Zhao Lei <[email protected]>Cc Eduard - Gabriel Munteanu <[email protected]>Cc Pekka Enberg <[email protected]>Signed-off-by Steven Rostedt <[email protected]>--- include/trace/define_trace.h | 75 ++++++++++++++++++++++++++++++++++++++++++ include/trace/irq.h | 5 ++- include/trace/kmem.h | 4 ++- include/trace/lockdep.h | 3 ++ include/trace/sched.h | 3 ++ include/trace/skb.h | 3 ++ kernel/exit.c | 4 -- kernel/fork.c | 2 - kernel/irq/handle.c | 7 ++-- kernel/kthread.c | 3 -- kernel/lockdep.c | 12 ++----- kernel/sched.c | 10 ++---- kernel/signal.c | 2 - kernel/softirq.c | 3 -- mm/util.c | 11 ++---- net/core/net-traces.c | 4 +- 16 files changed, 105 insertions(+), 46 deletions(-) create mode 100644 include/trace/define_trace.hinclude/trace/define_trace.h new file +47
-0@@ -0,0 +1,75 @@ +/* +* Trace files that want to automate creationg of all tracepoints defined +* in their file should include this file. The following are macros that the +* trace file may define: +* +* TRACE_SYSTEM defines the system the tracepoint is for +* +* TRACE_INCLUDE_FILE if the file name is something other than TRACE_SYSTEM.h +* This macro may be defined to tell define_trace.h what file to include. +* Note, leave off the ".h". +* +* TRACE_INCLUDE_PATH if the path is something other than core kernel include/trace +* then this macro can define the path to use. Note, the path is relative to +* define_trace.h, not the file including it. Full path names for out of tree +* modules must be used. +*/ + +#ifdef CREATE_TRACE_POINTS + +/* Prevent recursion */ +#undef CREATE_TRACE_POINTS + +#include <linux/stringify.h> + +#undef TRACE_EVENT +#define TRACE_EVENT (name, proto, args, tstruct, assign, print) \ + DEFINE_TRACE(name) + +#undef TRACE_FORMAT +#define TRACE_FORMAT (name, proto, args, print) \ + DEFINE_TRACE(name) + +#undef DECLARE_TRACE +#define DECLARE_TRACE (name, proto, args) \ + DEFINE_TRACE(name) + +#undef TRACE_INCLUDE +#undef __TRACE_INCLUDE + +#ifndef TRACE_INCLUDE_FILE +# define TRACE_INCLUDE_FILE TRACE_SYSTEM +# define UNDEF_TRACE_INCLUDE_FILE +#endif + +#ifndef TRACE_INCLUDE_PATH +# define __TRACE_INCLUDE (system) <trace/system.h> +# define UNDEF_TRACE_INCLUDE_FILE
include/trace/define_trace.h line 57
Quoted 10 lines
include/trace/define_trace.h new file +10
-0+#else +# define __TRACE_INCLUDE (system) __stringify(TRACE_INCLUDE_PATH/system.h) +#endif + +# define TRACE_INCLUDE (system) __TRACE_INCLUDE(system) + +/* Let the trace headers be reread */ +#define TRACE_HEADER_MULTI_READ + +#include TRACE_INCLUDE (TRACE_INCLUDE_FILE )
Hello, Steven
Include header file again is a power trap full of imagination. It is great... but maybe we can choose a stupid way if we have. And, TRACE_SYSTEM must be same as header file name if we use current way.
How about just
#define TRACE_EVENT(name, proto, args, fmt) \
DECLARE_TRACE(name, PARAMS(proto), PARAMS(args)) \
DEFINE_TRACE(name)
in tracepoint.h?
It means we always define both whether for tracepoint provider or for tracepoint user.(and make compiler a bit slow)
Thanks
Zhaolei
Quoted 312 lines
include/trace/define_trace.h new file +18
-0+ +#undef TRACE_HEADER_MULTI_READ + +/* Only undef what we defined in this file */ +#ifdef UNDEF_TRACE_INCLUDE_FILE +# undef TRACE_INCLUDE_PATH +# undef UNDEF_TRACE_INCLUDE_FILE +#endif + +#ifdef UNDEF_TRACE_INCLUDE_FILE +# undef TRACE_INCLUDE_PATH +# undef UNDEF_TRACE_INCLUDE_FILE +#endif + +/* We may be processing more files */ +#define CREATE_TRACE_POINTS + +#endif /* CREATE_TRACE_POINTS */ include/trace/irq.h +4
-1@@ -51,4 +51,7 @@ TRACE_FORMAT(softirq_exit,TP_FMT ("softirq=%d action=%s" , (int )(h - vec), softirq_to_name[h-vec]) ); -#endif +#endif /* _TRACE_IRQ_H */ + +/* This part must be outside protection */ +#include <trace/define_trace.h> include/trace/kmem.h +3
-1@@ -188,5 +188,7 @@ TRACE_EVENT(kmem_cache_free,TP_printk ("call_site=%lx ptr=%p" , __entry->call_site, __entry->ptr) ); +#endif /* _TRACE_KMEM_H */ -#endif +/* This part must be outside protection */ +#include <trace/define_trace.h> include/trace/lockdep.h +3
-0@@ -55,3 +55,6 @@ TRACE_EVENT(lock_acquired,#endif #endif /* _TRACE_LOCKDEP_H */ + +/* This part must be outside protection */ +#include <trace/define_trace.h> include/trace/sched.h +3
-0@@ -334,3 +334,6 @@ TRACE_EVENT(sched_signal_send, );#endif /* _TRACE_SCHED_H */ + +/* This part must be outside protection */ +#include <trace/define_trace.h> include/trace/skb.h +3
-0@@ -35,3 +35,6 @@ TRACE_EVENT(kfree_skb, );#endif /* _TRACE_SKB_H */ + +/* This part must be outside protection */ +#include <trace/define_trace.h> kernel/exit.c +0
-4@@ -56,10 +56,6 @@#include <asm/mmu_context.h> #include "cred-internals.h" -DEFINE_TRACE (sched_process_free); -DEFINE_TRACE (sched_process_exit); -DEFINE_TRACE (sched_process_wait); -static void exit_mm (struct task_struct * tsk);static void __unhash_process (struct task_struct *p)kernel/fork.c +0
-2@@ -83,8 +83,6 @@ DEFINE_PER_CPU(unsigned long, process_counts) = 0;__cacheline_aligned DEFINE_RWLOCK (tasklist_lock );/* outer */ -DEFINE_TRACE (sched_process_fork); -int nr_processes (void ) {int cpu;kernel/irq/handle.c +3
-4@@ -17,9 +17,11 @@#include <linux/kernel_stat.h> #include <linux/rculist.h> #include <linux/hash.h> -#include <trace/irq.h> #include <linux/bootmem.h> +#define CREATE_TRACE_POINTS +#include <trace/irq.h> +#include "internals.h" /* @@ -348,9 +350,6 @@ static void warn_no_thread(unsigned int irq, struct irqaction *action) "but no thread function available.", irq, action->name); } -DEFINE_TRACE (irq_handler_entry); -DEFINE_TRACE (irq_handler_exit); -/** * handle_IRQ_event - irq action chain handler * @irq: the interrupt number kernel/kthread.c +0
-3@@ -21,9 +21,6 @@ static DEFINE_SPINLOCK(kthread_create_lock);static LIST_HEAD (kthread_create_list);struct task_struct *kthreadd_task; -DEFINE_TRACE (sched_kthread_stop); -DEFINE_TRACE (sched_kthread_stop_ret); -struct kthread_create_info {/* Information passed to kthread() from kthreadd. */ kernel/lockdep.c +3
-9@@ -42,12 +42,14 @@#include <linux/hash.h> #include <linux/ftrace.h> #include <linux/stringify.h> -#include <trace/lockdep.h> #include <asm/sections.h> #include "lockdep_internals.h" +#define CREATE_TRACE_POINTS +#include <trace/lockdep.h> +#ifdef CONFIG_PROVE_LOCKING int prove_locking =1 ;module_param (prove_locking, int,0644 );@@ -2929,8 +2931,6 @@ void lock_set_class(struct lockdep_map *lock, const char *name, }EXPORT_SYMBOL_GPL (lock_set_class); -DEFINE_TRACE (lock_acquire); -/* * We are not always called with irqs disabled - do that here, * and also avoid lockdep recursion: @@ -2957,8 +2957,6 @@ void lock_acquire(struct lockdep_map *lock, unsigned int subclass, }EXPORT_SYMBOL_GPL (lock_acquire); -DEFINE_TRACE (lock_release); -void lock_release (struct lockdep_map *lock,int nested,unsigned long ip) {@@ -3061,8 +3059,6 @@ found_it:put_lock_stats (stats); } -DEFINE_TRACE (lock_acquired); -static void __lock_acquired (struct lockdep_map *lock,unsigned long ip) {@@ -3118,8 +3114,6 @@ found_it: lock->ip = ip; } -DEFINE_TRACE (lock_contended); -void lock_contended (struct lockdep_map *lock,unsigned long ip) {unsigned long flags;kernel/sched.c +3
-7@@ -72,13 +72,15 @@#include <linux/debugfs.h> #include <linux/ctype.h> #include <linux/ftrace.h> -#include <trace/sched.h> #include <asm/tlb.h> #include <asm/irq_regs.h> #include "sched_cpupri.h" +#define CREATE_TRACE_POINTS +#include <trace/sched.h> +/* * Convert user-nice values [ -20 ... 0 ... 19 ] * to static priority [ MAX_RT_PRIO..MAX_PRIO-1 ], @@ -118,12 +120,6 @@*/ #define RUNTIME_INF ((u64)~0ULL) -DEFINE_TRACE (sched_wait_task); -DEFINE_TRACE (sched_wakeup); -DEFINE_TRACE (sched_wakeup_new); -DEFINE_TRACE (sched_switch); -DEFINE_TRACE (sched_migrate_task); -#ifdef CONFIG_SMP static void double_rq_lock (struct rq *rq1,struct rq *rq2);kernel/signal.c +0
-2@@ -41,8 +41,6 @@static struct kmem_cache *sigqueue_cachep; -DEFINE_TRACE (sched_signal_send); -static void __user *sig_handler (struct task_struct *t,int sig) {return t->sighand->action[sig -1 ].sa.sa_handler;kernel/softirq.c +0
-3@@ -186,9 +186,6 @@ EXPORT_SYMBOL(local_bh_enable_ip);*/ #define MAX_SOFTIRQ_RESTART 10 -DEFINE_TRACE (softirq_entry); -DEFINE_TRACE (softirq_exit); - asmlinkage void __do_softirq(void) {struct softirq_action *h;mm/util.c +3
-8@@ -4,9 +4,11 @@#include <linux/module.h> #include <linux/err.h> #include <linux/sched.h> -#include <linux/tracepoint.h> #include <asm/uaccess.h> +#define CREATE_TRACE_POINTS +#include <trace/kmem.h> +/** * kstrdup - allocate space for and copy an existing string * @s: the string to duplicate @@ -239,13 +241,6 @@ int __attribute__((weak)) get_user_pages_fast(unsigned long start,EXPORT_SYMBOL_GPL (get_user_pages_fast);/* Tracepoints definitions. */ -DEFINE_TRACE (kmalloc); -DEFINE_TRACE (kmem_cache_alloc); -DEFINE_TRACE (kmalloc_node); -DEFINE_TRACE (kmem_cache_alloc_node); -DEFINE_TRACE (kfree); -DEFINE_TRACE (kmem_cache_free); -EXPORT_TRACEPOINT_SYMBOL (kmalloc);EXPORT_TRACEPOINT_SYMBOL (kmem_cache_alloc);EXPORT_TRACEPOINT_SYMBOL (kmalloc_node);net/core/net-traces.c +2
-2@@ -19,11 +19,11 @@#include <linux/workqueue.h> #include <linux/netlink.h> #include <linux/net_dropmon.h> -#include <trace/skb.h> #include <asm/unaligned.h> #include <asm/bitops.h> +#define CREATE_TRACE_POINTS +#include <trace/skb.h> -DEFINE_TRACE (kfree_skb);EXPORT_TRACEPOINT_SYMBOL_GPL (kfree_skb);
Steven Rostedt
maintainerPATCH 3/8 tracing: make trace_seq operations available for core kernel
In reply to Steven RostedtFrom: Steven Rostedt <[email protected]>
In the process to make TRACE_EVENT macro work for modules, the trace_seq operations must be available for core kernel code.
These operations are quite useful and can be used for other implementations.
The main idea is that we create a trace_seq handle that acts very much like the seq_file handle.
struct trace_seq *s = kmalloc(sizeof(*s, GFP_KERNEL);
trace_seq_init(s);
trace_seq_printf(s, "some data %d\n", variable);
printk("%s", s->buffer);The main use is to allow a top level function call several other functions that may store printf like data into the buffer. Then at the end, the top level function can process all the data with any method it would like to. It could be passed to userspace, output via printk or even use seq_file:
trace_seq_to_user(s, ubuf, cnt); seq_puts(m, s->buffer);
--- include/linux/trace_seq.h | 89 +++++++++++++++++++++++++++++++++++++++++++ kernel/trace/trace.h | 15 +------ kernel/trace/trace_output.h | 16 +------- 3 files changed, 92 insertions(+), 28 deletions(-) create mode 100644 include/linux/trace_seq.h
include/linux/trace_seq.h new file +89 -0
@@ -0,0 +1,89 @@ +#ifndef _LINUX_TRACE_SEQ_H +#define _LINUX_TRACE_SEQ_H + +/* +* Trace sequences are used to allow a function to call several other functions +* to create a string of data to use (up to a max of PAGE_SIZE. +*/ + +struct trace_seq { +unsigned char buffer[PAGE_SIZE ]; +unsigned int len; +unsigned int readpos; +}; + +static inline void +trace_seq_init (struct trace_seq *s) +{ + s->len =0 ; + s->readpos =0 ; +} + +/* +* Currently only defined when tracing is enabled. +*/ +#ifdef CONFIG_TRACING +extern int trace_seq_printf (struct trace_seq *s,const char *fmt, ...) + __attribute__ ((format (printf,2 ,3 ))); +extern int +trace_seq_bprintf (struct trace_seq *s,const char *fmt,const u32 *binary); +extern void trace_print_seq (struct seq_file *m,struct trace_seq *s); +extern ssize_t trace_seq_to_user (struct trace_seq *s,char __user *ubuf, +size_t cnt); +extern int trace_seq_puts (struct trace_seq *s,const char *str); +extern int trace_seq_putc (struct trace_seq *s,unsigned char c); +extern int trace_seq_putmem (struct trace_seq *s,const void *mem,size_t len); +extern int trace_seq_putmem_hex (struct trace_seq *s,const void *mem, +size_t len); +extern void *trace_seq_reserve (struct trace_seq *s,size_t len); +extern int trace_seq_path (struct trace_seq *s,struct path *path); + +#else /* CONFIG_TRACING */ +static inline int trace_seq_printf (struct trace_seq *s,const char *fmt, ...) + __attribute__ ((format (printf,2 ,3 ))) +{ +return 0 ; +} +static inline int +trace_seq_bprintf (struct trace_seq *s,const char *fmt,const u32 *binary) +{ +return 0 ; +} + +static inline void trace_print_seq (struct seq_file *m,struct trace_seq *s) +{ +} +static inline ssize_t trace_seq_to_user (struct trace_seq *s,char __user *ubuf, +size_t cnt) +{ +return 0 ; +} +static inline int trace_seq_puts (struct trace_seq *s,const char *str) +{ +return 0 ; +} +static inline int trace_seq_putc (struct trace_seq *s,unsigned char c); +{ +return 0 ; +} +static inline int +trace_seq_putmem (struct trace_seq *s,const void *mem,size_t len) +{ +return 0 ; +} +static inline int trace_seq_putmem_hex (struct trace_seq *s,const void *mem, +size_t len) +{ +return 0 ; +} +static inline void *trace_seq_reserve (struct trace_seq *s,size_t len) +{ +return NULL ; +} +static inline int trace_seq_path (struct trace_seq *s,struct path *path) +{ +return 0 ; +} +#endif /* CONFIG_TRACING */ + +#endif /* _LINUX_TRACE_SEQ_H */
kernel/trace/trace.h +2 -13
@@ -12,6 +12,8 @@#include <linux/kmemtrace.h> #include <trace/power.h> +#include <linux/trace_seq.h> +enum trace_type { __TRACE_FIRST_TYPE =0 ,
@@ -423,19 +425,6 @@ struct tracer {struct tracer_stat *stats; }; -struct trace_seq { -unsigned char buffer[PAGE_SIZE ]; -unsigned int len; -unsigned int readpos; -}; - -static inline void -trace_seq_init (struct trace_seq *s) -{ - s->len =0 ; - s->readpos =0 ; -} -#define TRACE_PIPE_ALL_CPU -1
kernel/trace/trace_output.h +1 -15
@@ -1,6 +1,7 @@#ifndef __TRACE_EVENTS_H#define __TRACE_EVENTS_H +#include <linux/trace_seq.h> #include "trace.h" typedef enum print_line_t (*trace_print_func)(struct trace_iterator *iter,
@@ -20,24 +21,9 @@ trace_print_bprintk_msg_only(struct trace_iterator *iter);extern enum print_line_t trace_print_printk_msg_only (struct trace_iterator *iter); -extern void trace_print_seq (struct seq_file *m,struct trace_seq *s); - -extern int trace_seq_printf (struct trace_seq *s,const char *fmt, ...) - __attribute__ ((format (printf,2 ,3 ))); -extern int -trace_seq_bprintf (struct trace_seq *s,const char *fmt,const u32 *binary);extern int seq_print_ip_sym (struct trace_seq *s,unsigned long ip,unsigned long sym_flags); -extern ssize_t trace_seq_to_user (struct trace_seq *s,char __user *ubuf, -size_t cnt); -extern int trace_seq_puts (struct trace_seq *s,const char *str); -extern int trace_seq_putc (struct trace_seq *s,unsigned char c); -extern int trace_seq_putmem (struct trace_seq *s,const void *mem,size_t len); -extern int trace_seq_putmem_hex (struct trace_seq *s,const void *mem, -size_t len); -extern void *trace_seq_reserve (struct trace_seq *s,size_t len); -extern int trace_seq_path (struct trace_seq *s,struct path *path);extern int seq_print_userip_objs (const struct userstack_entry *entry,struct trace_seq *s,unsigned long sym_flags); extern int seq_print_user_ip(struct trace_seq *s, struct mm_struct *mm,
Signature · 3 lines
1.6.2.1 --
Peter Zijlstra
maintainerRe: [PATCH 3/8] tracing: make trace_seq operations available for core kernel
include/linux/trace_seq.h line 13
Quoted 5 lines · Steven Rostedt
include/linux/trace_seq.h new file +5
-0+struct trace_seq { +unsigned char buffer[PAGE_SIZE ]; +unsigned int len; +unsigned int readpos; +};
Would not PAGE_SIZE-2*sizeof(int) be enough? That would make the struct fit into a single page and avoid an order-1 allocation.
Steven Rostedt
maintainerRe: [PATCH 3/8] tracing: make trace_seq operations available for core kernel
Quoted 9 lines · Peter Zijlstra
include/linux/trace_seq.h line 13
Quoted 5 lines · Steven Rostedt
include/linux/trace_seq.h new file +5
-0+struct trace_seq { +unsigned char buffer[PAGE_SIZE ]; +unsigned int len; +unsigned int readpos; +};Would not PAGE_SIZE-2*sizeof(int) be enough? That would make the struct fit into a single page and avoid an order-1 allocation.
That may be an option. I've even thought about doing that before. Not sure why I did not. But we could give it a try.
-- Steve
Steven Rostedt
maintainerPATCH 4/8 tracing/events: move declarations from trace directory to core include
In reply to Steven RostedtFrom: Steven Rostedt <[email protected]>
In preparation to allowing trace events to happen in modules, we need to move some of the local declarations in the kernel/trace directory into include/linux.
This patch simply moves the declarations and performs no context changes.
--- include/linux/ftrace_event.h | 146 ++++++++++++++++++++++++++++++++++++++++++ kernel/trace/trace.h | 120 +---------------------------------- kernel/trace/trace_output.h | 14 ---- 3 files changed, 147 insertions(+), 133 deletions(-) create mode 100644 include/linux/ftrace_event.h
include/linux/ftrace_event.h new file +146 -0
@@ -0,0 +1,146 @@ +#ifndef _LINUX_FTRACE_EVENT_H +#define _LINUX_FTRACE_EVENT_H + +#include <linux/trace_seq.h> +#include <linux/ring_buffer.h> + + +struct trace_array ; +struct tracer ; + +/* +* The trace entry - the most basic unit of tracing. This is what +* is printed in the end as a single line in the trace output, such as: +* +* bash-15816 [01] 235.197585: idle_cpu <- irq_enter +*/ +struct trace_entry { +unsigned char type; +unsigned char flags; +unsigned char preempt_count; +int pid; +int tgid; +}; + +/* +* Trace iterator - used by printout routines who present trace +* results to users and which routines might sleep, etc: +*/ +struct trace_iterator { +struct trace_array *tr; +struct tracer *trace; +void *private; +int cpu_file; +struct mutex mutex; +struct ring_buffer_iter *buffer_iter[NR_CPUS ]; + +/* The below is zeroed out in pipe_read */ +struct trace_seq seq; +struct trace_entry *ent; +int cpu; +u64 ts; + +unsigned long iter_flags; +loff_t pos; +long idx; + +cpumask_var_t started; +}; + + +typedef enum print_line_t (*trace_print_func )(struct trace_iterator *iter, +int flags); +struct trace_event { +struct hlist_node node; +int type; +trace_print_func trace; +trace_print_func raw; +trace_print_func hex; +trace_print_func binary; +}; + +extern int register_ftrace_event (struct trace_event *event); +extern int unregister_ftrace_event (struct trace_event *event); + +/* Return values for print_line callback */ +enum print_line_t { +TRACE_TYPE_PARTIAL_LINE =0 ,/* Retry after flushing the seq */ +TRACE_TYPE_HANDLED =1 , +TRACE_TYPE_UNHANDLED =2 ,/* Relay to other output functions */ +TRACE_TYPE_NO_CONSUME =3 /* Handled but ask to not consume */ +}; + + +struct ring_buffer_event * +trace_current_buffer_lock_reserve (unsigned char type,unsigned long len, +unsigned long flags,int pc); +void trace_current_buffer_unlock_commit (struct ring_buffer_event *event, +unsigned long flags,int pc); +void trace_nowake_buffer_unlock_commit (struct ring_buffer_event *event, +unsigned long flags,int pc); +void trace_current_buffer_discard_commit (struct ring_buffer_event *event); + +void tracing_record_cmdline (struct task_struct *tsk); + +struct ftrace_event_call { +char *name; +char *system; +struct dentry *dir; +int enabled; +int (*regfunc)(void ); +void (*unregfunc)(void ); +int id; +int (*raw_init)(void ); +int (*show_format)(struct trace_seq *s); +int (*define_fields)(void ); +struct list_head fields; +int n_preds; +struct filter_pred **preds; + +#ifdef CONFIG_EVENT_PROFILE +atomic_t profile_count; +int (*profile_enable)(struct ftrace_event_call *); +void (*profile_disable)(struct ftrace_event_call *); +#endif +}; + +#define MAX_FILTER_PRED 8 +#define MAX_FILTER_STR_VAL 128 + +extern int init_preds (struct ftrace_event_call *call); +extern int filter_match_preds (struct ftrace_event_call *call,void *rec); +extern int filter_current_check_discard (struct ftrace_event_call *call, +void *rec, +struct ring_buffer_event *event); + +extern int trace_define_field (struct ftrace_event_call *call,char *type, +char *name,int offset,int size); + + +/* +* The double __builtin_constant_p is because gcc will give us an error +* if we try to allocate the static variable to fmt if it is not a +* constant. Even with the outer if statement optimizing out. +*/ +#define event_trace_printk(ip, fmt, args...) \ +do { \ + __trace_printk_check_format(fmt, ##args); \ + tracing_record_cmdline(current); \ + if (__builtin_constant_p(fmt)) { \ + static const char *trace_printk_fmt \ + __attribute__((section("__trace_printk_fmt"))) = \ + __builtin_constant_p(fmt) ? fmt : NULL; \ + \ + __trace_bprintk(ip, trace_printk_fmt, ##args); \ + } else \ + __trace_printk(ip, fmt, ##args); \ +} while (0) + +#define __common_field (type, item) \ + ret = trace_define_field(event_call, #type, "common_" #item, \ + offsetof(typeof(field.ent), item), \ + sizeof(field.ent.item)); \ + if (ret) \ + return ret; + +#endif /* _LINUX_FTRACE_EVENT_H */
kernel/trace/trace.h +1 -119
201 lines not on this page · raw message
kernel/trace/trace_output.h +0 -14
@@ -4,18 +4,6 @@#include <linux/trace_seq.h> #include "trace.h" -typedef enum print_line_t (*trace_print_func )(struct trace_iterator *iter, -int flags); - -struct trace_event { -struct hlist_node node; -int type; -trace_print_func trace; -trace_print_func raw; -trace_print_func hex; -trace_print_func binary; -}; -extern enum print_line_t trace_print_bprintk_msg_only (struct trace_iterator *iter); extern enum print_line_t
@@ -33,8 +21,6 @@ extern int trace_print_context(struct trace_iterator *iter);extern int trace_print_lat_context (struct trace_iterator *iter);extern struct trace_event *ftrace_find_event (int type); -extern int register_ftrace_event (struct trace_event *event); -extern int unregister_ftrace_event (struct trace_event *event);extern enum print_line_t trace_nop_print (struct trace_iterator *iter,int flags);
Signature · 3 lines
1.6.2.1 --
Steven Rostedt
maintainerPATCH 5/8 tracing/events: move the ftrace event tracing code to core
In reply to Steven RostedtFrom: Steven Rostedt <[email protected]>
This patch moves the ftrace creation into include/trace/ftrace.h and simplifies the work of developers in adding new tracepoints. Just the act of creating the trace points in include/trace and including define_trace.h will create the events in the debugfs/tracing/events directory.
This patch removes the need of include/trace/trace_events.h
--- include/trace/define_trace.h | 4 + include/trace/ftrace.h | 492 +++++++++++++++++++++++++++++++++++ include/trace/trace_events.h | 7 - kernel/trace/Makefile | 1 - kernel/trace/events.c | 15 - kernel/trace/trace_events_stage_1.h | 39 --- kernel/trace/trace_events_stage_2.h | 170 ------------ kernel/trace/trace_events_stage_3.h | 279 -------------------- 8 files changed, 496 insertions(+), 511 deletions(-) create mode 100644 include/trace/ftrace.h delete mode 100644 include/trace/trace_events.h delete mode 100644 kernel/trace/events.c delete mode 100644 kernel/trace/trace_events_stage_1.h delete mode 100644 kernel/trace/trace_events_stage_2.h delete mode 100644 kernel/trace/trace_events_stage_3.h
include/trace/define_trace.h +4 -0
@@ -56,6 +56,10 @@#include TRACE_INCLUDE (TRACE_INCLUDE_FILE ) +#ifdef CONFIG_EVENT_TRACER +#include <trace/ftrace.h> +#endif +#undef TRACE_HEADER_MULTI_READ/* Only undef what we defined in this file */
include/trace/ftrace.h new file +492 -0
492 lines not on this page · raw message
include/trace/trace_events.h deleted +0 -7
@@ -1,7 +0,0 @@ -/* trace/<type>.h here */ - -#include <trace/sched.h> -#include <trace/irq.h> -#include <trace/lockdep.h> -#include <trace/skb.h> -#include <trace/kmem.h>
kernel/trace/Makefile +0 -1
@@ -41,7 +41,6 @@ obj-$(CONFIG_KMEMTRACE) += kmemtrace.o obj-$(CONFIG_WORKQUEUE_TRACER) += trace_workqueue.o obj-$(CONFIG_BLK_DEV_IO_TRACE) += blktrace.o obj-$(CONFIG_EVENT_TRACING) += trace_events.o -obj-$(CONFIG_EVENT_TRACER) += events.o obj-$(CONFIG_EVENT_TRACING) += trace_export.o obj-$(CONFIG_FTRACE_SYSCALLS) += trace_syscalls.o obj-$(CONFIG_EVENT_PROFILE) += trace_event_profile.o
kernel/trace/events.c deleted +0 -15
@@ -1,15 +0,0 @@ -/* -* This is the place to register all trace points as events. -*/ - -#include <linux/stringify.h> - -#include <trace/trace_events.h> - -#include "trace_output.h" - -#define TRACE_HEADER_MULTI_READ -#include "trace_events_stage_1.h" -#include "trace_events_stage_2.h" -#include "trace_events_stage_3.h" -
kernel/trace/trace_events_stage_1.h deleted +0 -39
@@ -1,39 +0,0 @@ -/* -* Stage 1 of the trace events. -* -* Override the macros in <trace/trace_events.h> to include the following: -* -* struct ftrace_raw_<call> { -* struct trace_entry ent; -* <type> <item>; -* <type2> <item2>[<len>]; -* [...] -* }; -* -* The <type> <item> is created by the __field(type, item) macro or -* the __array(type2, item2, len) macro. -* We simply do "type item;", and that will create the fields -* in the structure. -*/ - -#undef TRACE_FORMAT -#define TRACE_FORMAT (call, proto, args, fmt) - -#undef __array -#define __array (type, item, len) type item[len]; - -#undef __field -#define __field (type, item) type item; - -#undef TP_STRUCT__entry -#define TP_STRUCT__entry(args...) args - -#undef TRACE_EVENT -#define TRACE_EVENT (name, proto, args, tstruct, assign, print) \ - struct ftrace_raw_##name { \ - struct trace_entry ent; \ - tstruct \ - }; \ - static struct ftrace_event_call event_##name - -#include <trace/trace_events.h>
kernel/trace/trace_events_stage_2.h deleted +0 -170
170 lines not on this page · raw message
kernel/trace/trace_events_stage_3.h deleted +0 -279
279 lines not on this page · raw message
Signature · 3 lines
1.6.2.1 --
Peter Zijlstra
maintainerRe: [PATCH 5/8] tracing/events: move the ftrace event tracing code to core
Quoted 7 lines · Steven Rostedt
+ * static struct
trace_eventftrace_event_type_<call> = {
+ * .trace = ftrace_raw_output_<call>, <-- stage 2
+ * };+ * static struct
ftrace_event_call__used
+ * __attribute__((__aligned__(4)))
+ * __attribute__((section("_ftrace_events"))) event_<call> = {
Quoted 7 lines
+ * .name = "<call>", + * .system = "<system>", + * .raw_init = ftrace_raw_init_event_<call>, + * .regfunc = ftrace_reg_event_<call>, + * .unregfunc = ftrace_unreg_event_<call>, + * .show_format = ftrace_format_<call>,+ * }
Is there a good reason these are two different structs?
I've always wondered about that, it seems natural to unify them and to generalize the reverse lookup hash that is now private to trace_output.
The trace_event_profile code could use that reverse lookup, that linear search it currently does it really lame.
Steven Rostedt
maintainerRe: [PATCH 5/8] tracing/events: move the ftrace event tracing code to core
Quoted 16 lines · Peter Zijlstra
Quoted 7 lines · Steven Rostedt
+ * static struct
trace_eventftrace_event_type_<call> = {
+ * .trace = ftrace_raw_output_<call>, <-- stage 2
+ * };+ * static struct
ftrace_event_call__used
+ * __attribute__((__aligned__(4)))
+ * __attribute__((section("_ftrace_events"))) event_<call> = {Quoted 7 lines
+ * .name = "<call>", + * .system = "<system>", + * .raw_init = ftrace_raw_init_event_<call>, + * .regfunc = ftrace_reg_event_<call>, + * .unregfunc = ftrace_unreg_event_<call>, + * .show_format = ftrace_format_<call>,+ * }
Quoted 7 lines
Is there a good reason these are two different structs?
I've always wondered about that, it seems natural to unify them and to generalize the reverse lookup hash that is now private to
trace_output.The
trace_event_profilecode could use that reverse lookup, that linear search it currently does it really lame.
Hmm, I'll have to look at that. Of course that means touching these crazy macros again ;-)
-- Steve
Re: [PATCH 5/8] tracing/events: move the ftrace event tracing code to core
I think merging these structures together can also allow you to move certain parts of code to the general functions in kernel/trace/trace_events.c so you don't need to define those functions for individual events.
Jiaying
Quoted 33 lines · Steven Rostedt
Quoted 16 lines · Peter Zijlstra
Quoted 7 lines · Steven Rostedt
+ * static struct
trace_eventftrace_event_type_<call> = {
+ * .trace = ftrace_raw_output_<call>, <-- stage 2
+ * };+ * static struct
ftrace_event_call__used
+ * __attribute__((__aligned__(4)))
+ * __attribute__((section("_ftrace_events"))) event_<call> = {Quoted 7 lines
+ * .name = "<call>", + * .system = "<system>", + * .raw_init = ftrace_raw_init_event_<call>, + * .regfunc = ftrace_reg_event_<call>, + * .unregfunc = ftrace_unreg_event_<call>, + * .show_format = ftrace_format_<call>,+ * }
Quoted 7 lines
Is there a good reason these are two different structs?
I've always wondered about that, it seems natural to unify them and to generalize the reverse lookup hash that is now private to
trace_output.The
trace_event_profilecode could use that reverse lookup, that linear search it currently does it really lame.Hmm, I'll have to look at that. Of course that means touching these crazy macros again ;-)
-- Steve
Steven Rostedt
maintainerPATCH 6/8 tracing/events: convert event call sites to use a link list
In reply to Steven RostedtFrom: Steven Rostedt <[email protected]>
Impact: makes it possible to define events in modules
The events are created by reading down the section that they are linked in by the macros. But this is not scalable to modules. This patch converts the manipulations to use a global link list, and on boot up it adds the items in the section to the list.
This change will allow modules to add their tracing events to the list as well.
Note, this change alone does not permit modules to use the TRACE_EVENT macros, but the change is needed for them to eventually do so.
--- include/linux/ftrace_event.h | 1 + kernel/trace/trace.h | 13 +-------- kernel/trace/trace_event_profile.c | 4 +- kernel/trace/trace_events.c | 51 ++++++++++++++++++++++-------------- kernel/trace/trace_events_filter.c | 8 +++--- 5 files changed, 39 insertions(+), 38 deletions(-)
include/linux/ftrace_event.h +1 -0
@@ -83,6 +83,7 @@ void trace_current_buffer_discard_commit(struct ring_buffer_event *event);void tracing_record_cmdline (struct task_struct *tsk);struct ftrace_event_call { +struct list_head list;char *name;char *system;struct dentry *dir;
kernel/trace/trace.h +1 -12
@@ -739,11 +739,6 @@ struct event_subsystem {struct filter_pred **preds; }; -#define events_for_each (event) \ - for (event = __start_ftrace_events; \ - (unsigned long)event < (unsigned long)__stop_ftrace_events; \ - event++) -struct filter_pred ;typedef int (*filter_pred_fn_t ) (struct filter_pred *pred,void *event);
@@ -785,13 +780,7 @@ filter_check_discard(struct ftrace_event_call *call, void *rec,return 0 ; } -extern struct ftrace_event_call __start_ftrace_events[]; -extern struct ftrace_event_call __stop_ftrace_events[]; - -#define for_each_event (event) \ - for (event = __start_ftrace_events; \ - (unsigned long)event < (unsigned long)__stop_ftrace_events; \ - event++) +extern struct list_head ftrace_events;extern const char *__start___trace_bprintk_fmt[];extern const char *__stop___trace_bprintk_fmt[];
kernel/trace/trace_event_profile.c +2 -2
@@ -11,7 +11,7 @@ int ftrace_profile_enable(int event_id) {struct ftrace_event_call *event; -for_each_event (event) { +list_for_each_entry (event, &ftrace_events, list) {if (event->id == event_id)return event->profile_enable (event); }
@@ -23,7 +23,7 @@ void ftrace_profile_disable(int event_id) {struct ftrace_event_call *event; -for_each_event (event) { +list_for_each_entry (event, &ftrace_events, list) {if (event->id == event_id)return event->profile_disable (event); }
kernel/trace/trace_events.c +31 -20
137 lines not on this page · raw message
kernel/trace/trace_events_filter.c +4 -4
@@ -223,7 +223,7 @@ oom:void filter_free_subsystem_preds (struct event_subsystem *system) { -struct ftrace_event_call *call = __start_ftrace_events; +struct ftrace_event_call *call;int i;if (system->n_preds) {
@@ -234,7 +234,7 @@ void filter_free_subsystem_preds(struct event_subsystem *system) system->n_preds =0 ; } -events_for_each (call) { +list_for_each_entry (call, &ftrace_events, list) {if (!call->define_fields)continue ;
@@ -320,7 +320,7 @@ int filter_add_pred(struct ftrace_event_call *call, struct filter_pred *pred)int filter_add_subsystem_pred (struct event_subsystem *system,struct filter_pred *pred) { -struct ftrace_event_call *call = __start_ftrace_events; +struct ftrace_event_call *call;if (system->n_preds && !pred->compound)filter_free_subsystem_preds (system);
@@ -337,7 +337,7 @@ int filter_add_subsystem_pred(struct event_subsystem *system, system->preds[system->n_preds] = pred; -events_for_each (call) { +list_for_each_entry (call, &ftrace_events, list) {int err;if (!call->define_fields)
Signature · 3 lines
1.6.2.1 --
Steven Rostedt
maintainerPATCH 7/8 tracing/events: add export symbols for trace events in modules
In reply to Steven RostedtFrom: Steven Rostedt <[email protected]>
Impact: let modules add trace events
The trace event code requires some functions to be exported to allow modules to use TRACE_EVENT. This patch adds EXPORT_SYMBOL_GPL to the necessary functions.
--- kernel/trace/trace.c | 3 +++ kernel/trace/trace_events.c | 1 + kernel/trace/trace_events_filter.c | 2 ++ kernel/trace/trace_output.c | 3 +++ 4 files changed, 9 insertions(+), 0 deletions(-)
kernel/trace/trace.c +3 -0
@@ -176,6 +176,7 @@ int filter_current_check_discard(struct ftrace_event_call *call, void *rec, {return filter_check_discard (call, rec, global_trace.buffer, event); } +EXPORT_SYMBOL_GPL (filter_current_check_discard);cycle_t ftrace_now (int cpu) {
@@ -886,6 +887,7 @@ trace_current_buffer_lock_reserve(unsigned char type, unsigned long len,return trace_buffer_lock_reserve (&global_trace, type, len, flags, pc); } +EXPORT_SYMBOL (trace_current_buffer_lock_reserve);void trace_current_buffer_unlock_commit (struct ring_buffer_event *event,unsigned long flags,int pc)
@@ -903,6 +905,7 @@ void trace_current_buffer_discard_commit(struct ring_buffer_event *event) {ring_buffer_discard_commit (global_trace.buffer, event); } +EXPORT_SYMBOL_GPL (trace_nowake_buffer_unlock_commit); void trace_function(struct trace_array *tr,
kernel/trace/trace_events.c +1 -0
@@ -53,6 +53,7 @@ err:return -ENOMEM ; } +EXPORT_SYMBOL_GPL (trace_define_field);static void ftrace_clear_events (void ) {
kernel/trace/trace_events_filter.c +2 -0
@@ -110,6 +110,7 @@ int filter_match_preds(struct ftrace_event_call *call, void *rec)return 1 ; } +EXPORT_SYMBOL_GPL (filter_match_preds);void filter_print_preds (struct filter_pred **preds,int n_preds,struct trace_seq *s)
@@ -220,6 +221,7 @@ oom:return -ENOMEM ; } +EXPORT_SYMBOL_GPL (init_preds);void filter_free_subsystem_preds (struct event_subsystem *system) {
kernel/trace/trace_output.c +3 -0
@@ -94,6 +94,7 @@ trace_seq_printf(struct trace_seq *s, const char *fmt, ...)return len; } +EXPORT_SYMBOL_GPL (trace_seq_printf);int trace_seq_bprintf (struct trace_seq *s,const char *fmt,const u32 *binary) {
@@ -538,6 +539,7 @@ int register_ftrace_event(struct trace_event *event)return ret; } +EXPORT_SYMBOL_GPL (register_ftrace_event);/** * unregister_ftrace_event - remove a no longer used event
@@ -551,6 +553,7 @@ int unregister_ftrace_event(struct trace_event *event)return 0 ; } +EXPORT_SYMBOL_GPL (unregister_ftrace_event);/* * Standard events
Signature · 3 lines
1.6.2.1 --
Steven Rostedt
maintainerPATCH 8/8 tracing/events: add support for modules to TRACE_EVENT
In reply to Steven RostedtFrom: Steven Rostedt <[email protected]>
Impact: allow modules to add TRACE_EVENTS on load
This patch adds the final hooks to allow modules to use the TRACE_EVENT macro. A notifier and a data structure are used to link the TRACE_EVENTs defined in the module to connect them with the ftrace event tracing system.
It also adds the necessary automated clean ups to the trace events when a module is removed.
--- include/linux/ftrace_event.h | 3 + include/linux/module.h | 4 + include/linux/trace_seq.h | 2 + include/trace/ftrace.h | 1 + kernel/module.c | 7 ++ kernel/trace/trace_events.c | 128 +++++++++++++++++++++++++++++++----------- 6 files changed, 113 insertions(+), 32 deletions(-)
include/linux/ftrace_event.h +3 -0
@@ -7,6 +7,7 @@struct trace_array ;struct tracer ; +struct dentry ;/* * The trace entry - the most basic unit of tracing. This is what
@@ -87,6 +88,7 @@ struct ftrace_event_call {char *name;char *system;struct dentry *dir; +struct trace_event *event;int enabled;int (*regfunc)(void );void (*unregfunc)(void );
@@ -97,6 +99,7 @@ struct ftrace_event_call {struct list_head fields;int n_preds;struct filter_pred **preds; +void *mod;#ifdef CONFIG_EVENT_PROFILE atomic_t profile_count;
include/linux/module.h +4 -0
@@ -337,6 +337,10 @@ struct moduleconst char **trace_bprintk_fmt_start;unsigned int num_trace_bprintk_fmt;#endif +#ifdef CONFIG_EVENT_TRACING +struct ftrace_event_call *trace_events; +unsigned int num_trace_events; +#endif #ifdef CONFIG_MODULE_UNLOAD /* What modules depend on me? */
include/linux/trace_seq.h +2 -0
@@ -1,6 +1,8 @@#ifndef _LINUX_TRACE_SEQ_H#define _LINUX_TRACE_SEQ_H +#include <linux/fs.h> +/* * Trace sequences are used to allow a function to call several other functions * to create a string of data to use (up to a max of PAGE_SIZE.
include/trace/ftrace.h +1 -0
@@ -477,6 +477,7 @@ __attribute__((__aligned__(4))) \ __attribute__((section("_ftrace_events"))) event_##call = { \ .name = #call, \ .system = __stringify(TRACE_SYSTEM), \ + .event = &ftrace_event_type_##call, \ .raw_init = ftrace_raw_init_event_##call, \ .regfunc = ftrace_raw_reg_event_##call, \ .unregfunc = ftrace_raw_unreg_event_##call, \
kernel/module.c +7 -0
@@ -18,6 +18,7 @@*/ #include <linux/module.h> #include <linux/moduleloader.h> +#include <linux/ftrace_event.h> #include <linux/init.h> #include <linux/kallsyms.h> #include <linux/fs.h>
@@ -2172,6 +2173,12 @@ static noinline struct module *load_module(void __user *umod,sizeof (*mod->tracepoints), &mod->num_tracepoints);#endif +#ifdef CONFIG_EVENT_TRACING + mod->trace_events =section_objs (hdr, sechdrs, secstrings, +"_ftrace_events" , +sizeof (*mod->trace_events), + &mod->num_trace_events); +#endif #ifdef CONFIG_MODVERSIONS if ((mod->num_syms && !mod->crcs)
kernel/trace/trace_events.c +96 -32
184 lines not on this page · raw message
Signature · 3 lines
1.6.2.1 --
Re: [PATCH 8/8] tracing/events: add support for modules to TRACE_EVENT
Quoted 3 lines · Steven Rostedt
From: Steven Rostedt <[email protected]>
Impact: allow modules to add
TRACE_EVENTSon load
Thanks!
Rusty.
Quoted 7 lines · Steven Rostedt
Ingo,
This is the long awaited
TRACE_EVENTfor modules patch series.Not only does it allow for modules to use the
TRACE_EVENTinfrastructure, but it also cleans up the wayTRACE_EVENTSare used in core kernel code.
Really impressive!
I've got a small testing hickup with it:
In file included from include/trace/lockdep.h:60,
from kernel/lockdep.c:51:
include/trace/define_trace.h:57:43: error: trace/lock.h: No such file or directory
The patch below fixes it.
Ingo
include/trace/lockdep.h +1 -1
@@ -5,7 +5,7 @@#include <linux/tracepoint.h> #undef TRACE_SYSTEM -#define TRACE_SYSTEM lock +#define TRACE_SYSTEM lockdep#ifdef CONFIG_LOCKDEP
there's another build failure as well:
kernel/trace/trace_events.c: In function ‘trace_module_add_events’:kernel/trace/trace_events.c:805: error: dereferencing pointer to incomplete type kernel/trace/trace_events.c:806: error: dereferencing pointer to incomplete type kernel/trace/trace_events.c:806: error: dereferencing pointer to incomplete type kernel/trace/trace_events.c: In function ‘trace_module_notify’:kernel/trace/trace_events.c:850: error: ‘MODULE_STATE_COMING’ undeclared (first use in this function) kernel/trace/trace_events.c:850: error: (Each undeclared identifier is reported only once kernel/trace/trace_events.c:850: error: for each function it appears in.) kernel/trace/trace_events.c:853: error: ‘MODULE_STATE_GOING’ undeclared (first use in this function)
config attached. The key bit is:
# CONFIG_MODULES is not set
I suspect you mainly concentrated on getting modular kernels right. Fixing it for non-modular kernels should be no big deal.
Ingo
#
# Automatically generated make config: don't edit # Linux kernel version: 2.6.30-rc1
# Tue Apr 14 21:21:21 2009
#CONFIG_64BIT=y
# CONFIG_X86_32 is not setCONFIG_X86_64=yCONFIG_X86=y CONFIG_ARCH_DEFCONFIG="arch/x86/configs/x86_64_defconfig" CONFIG_GENERIC_TIME=yCONFIG_GENERIC_CMOS_UPDATE=y CONFIG_CLOCKSOURCE_WATCHDOG=y CONFIG_GENERIC_CLOCKEVENTS=y CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y CONFIG_LOCKDEP_SUPPORT=y CONFIG_STACKTRACE_SUPPORT=y CONFIG_HAVE_LATENCYTOP_SUPPORT=y CONFIG_FAST_CMPXCHG_LOCAL=yCONFIG_MMU=yCONFIG_ZONE_DMA=yCONFIG_GENERIC_ISA_DMA=yCONFIG_GENERIC_IOMAP=yCONFIG_GENERIC_BUG=y CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y CONFIG_GENERIC_HWEIGHT=y CONFIG_ARCH_MAY_HAVE_PC_FDC=y CONFIG_RWSEM_GENERIC_SPINLOCK=y
# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_GENERIC_TIME_VSYSCALL=y CONFIG_ARCH_HAS_CPU_RELAX=y CONFIG_ARCH_HAS_DEFAULT_IDLE=y CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y CONFIG_HAVE_SETUP_PER_CPU_AREA=y CONFIG_HAVE_DYNAMIC_PER_CPU_AREA=y CONFIG_HAVE_CPUMASK_OF_CPU_MAP=y CONFIG_ARCH_HIBERNATION_POSSIBLE=y CONFIG_ARCH_SUSPEND_POSSIBLE=yCONFIG_ZONE_DMA32=y CONFIG_ARCH_POPULATES_NODE_MAP=y CONFIG_AUDIT_ARCH=y CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y CONFIG_GENERIC_HARDIRQS=y CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y CONFIG_GENERIC_IRQ_PROBE=y CONFIG_GENERIC_PENDING_IRQ=y CONFIG_USE_GENERIC_SMP_HELPERS=y CONFIG_X86_64_SMP=yCONFIG_X86_HT=yCONFIG_X86_TRAMPOLINE=y
# CONFIG_KTIME_SCALAR is not set
# CONFIG_BOOTPARAM_SUPPORT_NOT_WANTED is not set
# CONFIG_BOOTPARAM_SUPPORT is not set CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
#
# General setup
#
# CONFIG_EXPERIMENTAL is not setCONFIG_BROKEN_BOOT_ALLOWED4=yCONFIG_BROKEN_BOOT_ALLOWED3=yCONFIG_BROKEN_BOOT_ALLOWED2=yCONFIG_BROKEN_BOOT_ALLOWED=yCONFIG_BROKEN_BOOT=yCONFIG_BROKEN_BOOT_EUROPE=yCONFIG_BROKEN_BOOT_TITAN=yCONFIG_LOCK_KERNEL=yCONFIG_INIT_ENV_ARG_LIMIT=32CONFIG_LOCALVERSION=""CONFIG_LOCALVERSION_AUTO=yCONFIG_HAVE_KERNEL_GZIP=yCONFIG_HAVE_KERNEL_BZIP2=yCONFIG_HAVE_KERNEL_LZMA=yCONFIG_KERNEL_GZIP=y
# CONFIG_KERNEL_BZIP2 is not set
# CONFIG_KERNEL_LZMA is not set
# CONFIG_SWAP is not set
# CONFIG_SYSVIPC is not set
# CONFIG_BSD_PROCESS_ACCT is not setCONFIG_TASKSTATS=yCONFIG_TASK_DELAY_ACCT=yCONFIG_TASK_XACCT=yCONFIG_TASK_IO_ACCOUNTING=yCONFIG_AUDIT=yCONFIG_AUDITSYSCALL=yCONFIG_AUDIT_TREE=y
#
# RCU Subsystem
#
# CONFIG_CLASSIC_RCU is not setCONFIG_TREE_RCU=y
# CONFIG_PREEMPT_RCU is not setCONFIG_RCU_TRACE=yCONFIG_RCU_FANOUT=64CONFIG_RCU_FANOUT_EXACT=yCONFIG_TREE_RCU_TRACE=y
# CONFIG_PREEMPT_RCU_TRACE is not setCONFIG_IKCONFIG=yCONFIG_LOG_BUF_SHIFT=20CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=yCONFIG_CGROUPS=yCONFIG_CGROUP_DEBUG=yCONFIG_CGROUP_NS=yCONFIG_CGROUP_FREEZER=y
# CONFIG_CPUSETS is not set
# CONFIG_CGROUP_CPUACCT is not set
# CONFIG_RESOURCE_COUNTERS is not setCONFIG_SYSFS_DEPRECATED=yCONFIG_SYSFS_DEPRECATED_V2=yCONFIG_RELAY=y
# CONFIG_NAMESPACES is not setCONFIG_BLK_DEV_INITRD=yCONFIG_INITRAMFS_SOURCE=""
# CONFIG_RD_GZIP is not setCONFIG_RD_BZIP2=y
# CONFIG_RD_LZMA is not setCONFIG_CC_OPTIMIZE_FOR_SIZE=yCONFIG_ANON_INODES=yCONFIG_EMBEDDED=y
# CONFIG_SYSCTL_SYSCALL is not setCONFIG_KALLSYMS=yCONFIG_KALLSYMS_ALL=yCONFIG_KALLSYMS_EXTRA_PASS=y
# CONFIG_STRIP_ASM_SYMS is not set
# CONFIG_HOTPLUG is not set
# CONFIG_PRINTK is not setCONFIG_BUG=y
# CONFIG_ELF_CORE is not setCONFIG_PCSPKR_PLATFORM=yCONFIG_BASE_FULL=yCONFIG_FUTEX=yCONFIG_EPOLL=yCONFIG_SIGNALFD=yCONFIG_TIMERFD=y
# CONFIG_EVENTFD is not setCONFIG_SHMEM=y
# CONFIG_AIO is not setCONFIG_HAVE_PERF_COUNTERS=y
#
# Performance Counters
#CONFIG_PERF_COUNTERS=yCONFIG_EVENT_PROFILE=y
# CONFIG_VM_EVENT_COUNTERS is not set
# CONFIG_PCI_QUIRKS is not setCONFIG_SLUB_DEBUG=y
# CONFIG_COMPAT_BRK is not set
# CONFIG_SLAB is not setCONFIG_SLUB=y
# CONFIG_SLOB is not set
# CONFIG_PROFILING is not setCONFIG_TRACEPOINTS=yCONFIG_MARKERS=yCONFIG_HAVE_OPROFILE=yCONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=yCONFIG_HAVE_IOREMAP_PROT=yCONFIG_HAVE_KPROBES=yCONFIG_HAVE_KRETPROBES=yCONFIG_HAVE_ARCH_TRACEHOOK=yCONFIG_HAVE_DMA_API_DEBUG=y
# CONFIG_SLOW_WORK is not set
# CONFIG_HAVE_GENERIC_DMA_COHERENT is not setCONFIG_RT_MUTEXES=yCONFIG_BASE_SMALL=0
# CONFIG_MODULES is not setCONFIG_BLOCK=y
# CONFIG_BLK_DEV_INTEGRITY is not set
#
# IO Schedulers
#CONFIG_IOSCHED_NOOP=yCONFIG_IOSCHED_AS=y
# CONFIG_IOSCHED_DEADLINE is not setCONFIG_IOSCHED_CFQ=yCONFIG_DEFAULT_AS=y
# CONFIG_DEFAULT_DEADLINE is not set
# CONFIG_DEFAULT_CFQ is not set
# CONFIG_DEFAULT_NOOP is not setCONFIG_DEFAULT_IOSCHED="anticipatory"CONFIG_PREEMPT_NOTIFIERS=yCONFIG_FREEZER=y
#
# Processor type and features
#CONFIG_TICK_ONESHOT=yCONFIG_NO_HZ=yCONFIG_HIGH_RES_TIMERS=yCONFIG_GENERIC_CLOCKEVENTS_BUILD=yCONFIG_SMP_SUPPORT=yCONFIG_SPARSE_IRQ=yCONFIG_X86_MPPARSE=yCONFIG_X86_EXTENDED_PLATFORM=yCONFIG_X86_VSMP=yCONFIG_SCHED_OMIT_FRAME_POINTER=yCONFIG_PARAVIRT_GUEST=yCONFIG_XEN=yCONFIG_XEN_MAX_DOMAIN_MEMORY=32CONFIG_XEN_DEBUG_FS=yCONFIG_KVM_CLOCK=yCONFIG_KVM_GUEST=yCONFIG_PARAVIRT=yCONFIG_PARAVIRT_CLOCK=yCONFIG_PARAVIRT_DEBUG=yCONFIG_MEMTEST=y
# CONFIG_M386 is not set
# CONFIG_M486 is not set
# CONFIG_M586 is not set
# CONFIG_M586TSC is not set
# CONFIG_M586MMX is not set
# CONFIG_M686 is not set
# CONFIG_MPENTIUMII is not set
# CONFIG_MPENTIUMIII is not set
# CONFIG_MPENTIUMM is not set
# CONFIG_MPENTIUM4 is not set
# CONFIG_MK6 is not set
# CONFIG_MK7 is not set
# CONFIG_MK8 is not set
# CONFIG_MCRUSOE is not set
# CONFIG_MEFFICEON is not set
# CONFIG_MWINCHIPC6 is not set
# CONFIG_MWINCHIP3D is not set
# CONFIG_MGEODEGX1 is not set
# CONFIG_MGEODE_LX is not set
# CONFIG_MCYRIXIII is not set
# CONFIG_MVIAC3_2 is not set
# CONFIG_MVIAC7 is not set
# CONFIG_MPSC is not set
# CONFIG_MCORE2 is not setCONFIG_GENERIC_CPU=yCONFIG_X86_CPU=yCONFIG_X86_L1_CACHE_BYTES=64CONFIG_X86_INTERNODE_CACHE_BYTES=4096CONFIG_X86_CMPXCHG=yCONFIG_X86_L1_CACHE_SHIFT=6CONFIG_X86_WP_WORKS_OK=yCONFIG_X86_TSC=yCONFIG_X86_CMPXCHG64=yCONFIG_X86_CMOV=yCONFIG_X86_MINIMUM_CPU_FAMILY=64CONFIG_X86_DEBUGCTLMSR=y
# CONFIG_PROCESSOR_SELECT is not setCONFIG_CPU_SUP_INTEL=yCONFIG_CPU_SUP_AMD=yCONFIG_CPU_SUP_CENTAUR=yCONFIG_X86_DS=yCONFIG_X86_PTRACE_BTS=yCONFIG_HPET_TIMER=yCONFIG_HPET_EMULATE_RTC=y
# CONFIG_DMI is not setCONFIG_GART_IOMMU=yCONFIG_SWIOTLB=yCONFIG_IOMMU_HELPER=y
# CONFIG_IOMMU_API is not setCONFIG_NR_CPUS=8CONFIG_SCHED_SMT=y
# CONFIG_SCHED_MC is not set
# CONFIG_PREEMPT_NONE is not setCONFIG_PREEMPT_VOLUNTARY=y
# CONFIG_PREEMPT is not setCONFIG_X86_LOCAL_APIC=yCONFIG_X86_IO_APIC=yCONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS=yCONFIG_X86_MCE=yCONFIG_X86_MCE_INTEL=yCONFIG_X86_MCE_AMD=yCONFIG_X86_MCE_THRESHOLD=yCONFIG_I8K=y
# CONFIG_MICROCODE is not setCONFIG_X86_MSR=yCONFIG_X86_CPUID=yCONFIG_X86_CPU_DEBUG=yCONFIG_UP_WANTED_1=y
# CONFIG_UP_WANTED_2 is not setCONFIG_SMP=yCONFIG_ARCH_PHYS_ADDR_T_64BIT=yCONFIG_DIRECT_GBPAGES=y
# CONFIG_NUMA is not setCONFIG_ARCH_SPARSEMEM_DEFAULT=yCONFIG_ARCH_SPARSEMEM_ENABLE=yCONFIG_ARCH_SELECT_MEMORY_MODEL=yCONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000CONFIG_SELECT_MEMORY_MODEL=y
# CONFIG_FLATMEM_MANUAL is not set
# CONFIG_DISCONTIGMEM_MANUAL is not setCONFIG_SPARSEMEM_MANUAL=yCONFIG_SPARSEMEM=yCONFIG_HAVE_MEMORY_PRESENT=yCONFIG_SPARSEMEM_EXTREME=yCONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
# CONFIG_SPARSEMEM_VMEMMAP is not setCONFIG_PAGEFLAGS_EXTENDED=yCONFIG_SPLIT_PTLOCK_CPUS=4CONFIG_PHYS_ADDR_T_64BIT=yCONFIG_ZONE_DMA_FLAG=1CONFIG_BOUNCE=yCONFIG_VIRT_TO_BUS=yCONFIG_UNEVICTABLE_LRU=yCONFIG_HAVE_MLOCK=yCONFIG_HAVE_MLOCKED_PAGE_BIT=yCONFIG_MMU_NOTIFIER=yCONFIG_X86_CHECK_BIOS_CORRUPTION=yCONFIG_X86_BOOTPARAM_MEMORY_CORRUPTION_CHECK=yCONFIG_X86_RESERVE_LOW_64K=y
# CONFIG_MTRR is not setCONFIG_SECCOMP=y
# CONFIG_CC_STACKPROTECTOR is not set
# CONFIG_HZ_100 is not set
# CONFIG_HZ_250 is not set
# CONFIG_HZ_300 is not setCONFIG_HZ_1000=yCONFIG_HZ=1000CONFIG_SCHED_HRTICK=yCONFIG_KEXEC=y
# CONFIG_CRASH_DUMP is not setCONFIG_PHYSICAL_START=0x200000CONFIG_PHYSICAL_ALIGN=0x200000
# CONFIG_CMDLINE_BOOL is not setCONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
#
# Power management and ACPI options
#
# CONFIG_PM is not set
#
# CPU Frequency scaling
#CONFIG_CPU_FREQ=yCONFIG_CPU_FREQ_TABLE=y CONFIG_CPU_FREQ_DEBUG=y
# CONFIG_CPU_FREQ_STAT is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set # CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set # CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set CONFIG_CPU_FREQ_GOV_PERFORMANCE=y CONFIG_CPU_FREQ_GOV_POWERSAVE=y
# CONFIG_CPU_FREQ_GOV_USERSPACE is not set
# CONFIG_CPU_FREQ_GOV_ONDEMAND is not set CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
#
# CPUFreq processor drivers
#CONFIG_X86_P4_CLOCKMOD=y
#
# shared options # CONFIG_X86_SPEEDSTEP_LIB=y CONFIG_CPU_IDLE=y CONFIG_CPU_IDLE_GOV_LADDER=y CONFIG_CPU_IDLE_GOV_MENU=y
#
# Memory power savings
#
#
# Bus options (PCI etc.)
#CONFIG_PCI=yCONFIG_PCI_DIRECT=yCONFIG_PCI_DOMAINS=yCONFIG_PCIEPORTBUS=yCONFIG_PCIEAER=yCONFIG_ARCH_SUPPORTS_MSI=yCONFIG_PCI_MSI=y
# CONFIG_PCI_LEGACY is not setCONFIG_PCI_DEBUG=yCONFIG_PCI_STUB=yCONFIG_HT_IRQ=yCONFIG_PCI_IOV=yCONFIG_ISA_DMA_API=yCONFIG_K8_NB=y
#
# Executable file formats / Emulations
#CONFIG_BINFMT_ELF=y
# CONFIG_HAVE_AOUT is not setCONFIG_BINFMT_MISC=y
# CONFIG_IA32_EMULATION is not set
# CONFIG_COMPAT_FOR_U64_ALIGNMENT is not setCONFIG_NET=y
#
# Networking options
#CONFIG_PACKET=y
# CONFIG_PACKET_MMAP is not setCONFIG_UNIX=yCONFIG_XFRM=yCONFIG_XFRM_USER=yCONFIG_XFRM_IPCOMP=yCONFIG_NET_KEY=yCONFIG_INET=y
# CONFIG_IP_MULTICAST is not setCONFIG_IP_ADVANCED_ROUTER=y
# CONFIG_ASK_IP_FIB_HASH is not setCONFIG_IP_FIB_TRIE=y
# CONFIG_IP_FIB_HASH is not set
# CONFIG_IP_FIB_TRIE_STATS is not setCONFIG_IP_MULTIPLE_TABLES=y
# CONFIG_IP_ROUTE_MULTIPATH is not setCONFIG_IP_ROUTE_VERBOSE=y
# CONFIG_IP_PNP is not setCONFIG_NET_IPIP=yCONFIG_NET_IPGRE=yCONFIG_SYN_COOKIES=yCONFIG_INET_AH=yCONFIG_INET_ESP=yCONFIG_INET_IPCOMP=yCONFIG_INET_XFRM_TUNNEL=yCONFIG_INET_TUNNEL=yCONFIG_INET_XFRM_MODE_TRANSPORT=yCONFIG_INET_XFRM_MODE_TUNNEL=yCONFIG_INET_XFRM_MODE_BEET=y
# CONFIG_INET_LRO is not setCONFIG_INET_DIAG=yCONFIG_INET_TCP_DIAG=yCONFIG_TCP_CONG_ADVANCED=yCONFIG_TCP_CONG_BIC=yCONFIG_TCP_CONG_CUBIC=yCONFIG_TCP_CONG_WESTWOOD=y
# CONFIG_TCP_CONG_HTCP is not setCONFIG_DEFAULT_BIC=y
# CONFIG_DEFAULT_CUBIC is not set
# CONFIG_DEFAULT_HTCP is not set
# CONFIG_DEFAULT_VEGAS is not set
# CONFIG_DEFAULT_WESTWOOD is not set
# CONFIG_DEFAULT_RENO is not setCONFIG_DEFAULT_TCP_CONG="bic"CONFIG_IPV6=y
# CONFIG_IPV6_PRIVACY is not setCONFIG_IPV6_ROUTER_PREF=yCONFIG_INET6_AH=yCONFIG_INET6_ESP=y
# CONFIG_INET6_IPCOMP is not set
# CONFIG_INET6_XFRM_TUNNEL is not set
# CONFIG_INET6_TUNNEL is not setCONFIG_INET6_XFRM_MODE_TRANSPORT=yCONFIG_INET6_XFRM_MODE_TUNNEL=yCONFIG_INET6_XFRM_MODE_BEET=y
# CONFIG_IPV6_SIT is not set
# CONFIG_IPV6_TUNNEL is not setCONFIG_NETLABEL=yCONFIG_NETWORK_SECMARK=y
# CONFIG_NETFILTER is not set
# CONFIG_ATM is not setCONFIG_STP=yCONFIG_BRIDGE=yCONFIG_VLAN_8021Q=y
# CONFIG_VLAN_8021Q_GVRP is not set
# CONFIG_DECNET is not setCONFIG_LLC=yCONFIG_LLC2=y
# CONFIG_IPX is not setCONFIG_ATALK=yCONFIG_DEV_APPLETALK=y
# CONFIG_IPDDP is not setCONFIG_PHONET=yCONFIG_NET_SCHED=y
#
# Queueing/Scheduling
#CONFIG_NET_SCH_CBQ=yCONFIG_NET_SCH_HTB=yCONFIG_NET_SCH_HFSC=y
# CONFIG_NET_SCH_PRIO is not setCONFIG_NET_SCH_MULTIQ=y
# CONFIG_NET_SCH_RED is not setCONFIG_NET_SCH_SFQ=y
# CONFIG_NET_SCH_TEQL is not setCONFIG_NET_SCH_TBF=yCONFIG_NET_SCH_GRED=yCONFIG_NET_SCH_DSMARK=yCONFIG_NET_SCH_NETEM=yCONFIG_NET_SCH_DRR=y
#
# Classification
#CONFIG_NET_CLS=y
# CONFIG_NET_CLS_BASIC is not set
# CONFIG_NET_CLS_TCINDEX is not setCONFIG_NET_CLS_ROUTE4=yCONFIG_NET_CLS_ROUTE=y
# CONFIG_NET_CLS_FW is not set
# CONFIG_NET_CLS_U32 is not set
# CONFIG_NET_CLS_RSVP is not setCONFIG_NET_CLS_RSVP6=yCONFIG_NET_CLS_FLOW=yCONFIG_NET_CLS_CGROUP=yCONFIG_NET_EMATCH=yCONFIG_NET_EMATCH_STACK=32CONFIG_NET_EMATCH_CMP=y
# CONFIG_NET_EMATCH_NBYTE is not setCONFIG_NET_EMATCH_U32=yCONFIG_NET_EMATCH_META=y
# CONFIG_NET_EMATCH_TEXT is not set
# CONFIG_NET_CLS_ACT is not setCONFIG_NET_SCH_FIFO=yCONFIG_DCB=y
#
# Network testing
#
# CONFIG_HAMRADIO is not setCONFIG_CAN=yCONFIG_CAN_RAW=yCONFIG_CAN_BCM=y
#
# CAN Device Drivers
#
# CONFIG_CAN_VCAN is not set
# CONFIG_CAN_DEBUG_DEVICES is not set
# CONFIG_IRDA is not setCONFIG_BT=yCONFIG_BT_L2CAP=y
# CONFIG_BT_SCO is not set
# CONFIG_BT_RFCOMM is not setCONFIG_BT_BNEP=y
# CONFIG_BT_BNEP_MC_FILTER is not set
# CONFIG_BT_BNEP_PROTO_FILTER is not set
#
# Bluetooth device drivers
#
# CONFIG_BT_HCIBTSDIO is not setCONFIG_BT_HCIUART=yCONFIG_BT_HCIUART_H4=y
# CONFIG_BT_HCIUART_BCSP is not setCONFIG_BT_HCIUART_LL=yCONFIG_BT_HCIVHCI=yCONFIG_FIB_RULES=yCONFIG_WIRELESS=yCONFIG_CFG80211=yCONFIG_CFG80211_REG_DEBUG=yCONFIG_WIRELESS_OLD_REGULATORY=yCONFIG_WIRELESS_EXT=y
# CONFIG_WIRELESS_EXT_SYSFS is not set
# CONFIG_LIB80211 is not setCONFIG_MAC80211=y
#
# Rate control algorithm selection
#CONFIG_MAC80211_RC_PID=y CONFIG_MAC80211_RC_MINSTREL=y CONFIG_MAC80211_RC_DEFAULT_PID=y
# CONFIG_MAC80211_RC_DEFAULT_MINSTREL is not set CONFIG_MAC80211_RC_DEFAULT="pid" CONFIG_MAC80211_LEDS=y
# CONFIG_MAC80211_DEBUGFS is not set CONFIG_MAC80211_DEBUG_MENU=y
# CONFIG_MAC80211_DEBUG_PACKET_ALIGNMENT is not set CONFIG_MAC80211_NOINLINE=y CONFIG_MAC80211_VERBOSE_DEBUG=y CONFIG_MAC80211_HT_DEBUG=y CONFIG_MAC80211_TKIP_DEBUG=y CONFIG_MAC80211_IBSS_DEBUG=y CONFIG_MAC80211_VERBOSE_PS_DEBUG=y CONFIG_MAC80211_VERBOSE_SPECT_MGMT_DEBUG=y CONFIG_WIMAX=yCONFIG_WIMAX_DEBUG_LEVEL=8
# CONFIG_RFKILL is not set
#
# Device Drivers
#
#
# Generic Driver Options
#CONFIG_STANDALONE=yCONFIG_PREVENT_FIRMWARE_BUILD=yCONFIG_FW_LOADER=yCONFIG_FIRMWARE_IN_KERNEL=yCONFIG_EXTRA_FIRMWARE=""CONFIG_DEBUG_DRIVER=yCONFIG_DEBUG_DEVRES=yCONFIG_SYS_HYPERVISOR=yCONFIG_CONNECTOR=y
# CONFIG_PROC_EVENTS is not set
# CONFIG_MTD is not set
# CONFIG_PARPORT is not set
# CONFIG_BLK_DEV is not setCONFIG_MISC_DEVICES=yCONFIG_PHANTOM=yCONFIG_SGI_IOC4=yCONFIG_ENCLOSURE_SERVICES=yCONFIG_HP_ILO=yCONFIG_ISL29003=y
#
# EEPROM support
#
# CONFIG_EEPROM_AT24 is not setCONFIG_EEPROM_LEGACY=y
# CONFIG_EEPROM_93CX6 is not setCONFIG_HAVE_IDE=y
# CONFIG_IDE is not set
#
# SCSI device support
#CONFIG_RAID_ATTRS=yCONFIG_SCSI=yCONFIG_SCSI_DMA=yCONFIG_SCSI_NETLINK=y
#
# SCSI support type (disk, tape, CD-ROM)
#
# CONFIG_BLK_DEV_SD is not set
# CONFIG_CHR_DEV_ST is not setCONFIG_CHR_DEV_OSST=yCONFIG_BLK_DEV_SR=yCONFIG_BLK_DEV_SR_VENDOR=yCONFIG_CHR_DEV_SG=y
# CONFIG_CHR_DEV_SCH is not setCONFIG_SCSI_ENCLOSURE=y
#
# Some SCSI devices (e.g. CD jukebox) support multiple LUNs #CONFIG_SCSI_MULTI_LUN=y
# CONFIG_SCSI_CONSTANTS is not set CONFIG_SCSI_LOGGING=yCONFIG_SCSI_SCAN_ASYNC=y
#
# SCSI Transports
#CONFIG_SCSI_SPI_ATTRS=yCONFIG_SCSI_FC_ATTRS=yCONFIG_SCSI_ISCSI_ATTRS=yCONFIG_SCSI_SRP_ATTRS=y
# CONFIG_SCSI_LOWLEVEL is not set
# CONFIG_SCSI_DH is not setCONFIG_SCSI_OSD_INITIATOR=yCONFIG_SCSI_OSD_ULD=yCONFIG_SCSI_OSD_DPRINT_SENSE=1CONFIG_SCSI_OSD_DEBUG=yCONFIG_ATA=y
# CONFIG_ATA_NONSTANDARD is not setCONFIG_SATA_PMP=yCONFIG_SATA_AHCI=yCONFIG_SATA_SIL24=y
# CONFIG_ATA_SFF is not setCONFIG_MD=yCONFIG_BLK_DEV_MD=y
# CONFIG_MD_AUTODETECT is not set
# CONFIG_MD_LINEAR is not set
# CONFIG_MD_RAID0 is not set
# CONFIG_MD_RAID1 is not setCONFIG_MD_RAID456=yCONFIG_MD_RAID6_PQ=yCONFIG_MD_MULTIPATH=yCONFIG_MD_FAULTY=yCONFIG_BLK_DEV_DM=yCONFIG_DM_DEBUG=yCONFIG_DM_CRYPT=y
# CONFIG_DM_SNAPSHOT is not set
# CONFIG_DM_MIRROR is not set
# CONFIG_DM_ZERO is not set
# CONFIG_DM_MULTIPATH is not setCONFIG_FUSION=y
# CONFIG_FUSION_SPI is not setCONFIG_FUSION_FC=y
# CONFIG_FUSION_SAS is not setCONFIG_FUSION_MAX_SGE=128
# CONFIG_FUSION_CTL is not setCONFIG_FUSION_LOGGING=y
#
# IEEE 1394 (FireWire) support
#
#
# A new alternative FireWire stack is available with EXPERIMENTAL=y #CONFIG_IEEE1394=yCONFIG_IEEE1394_OHCI1394=y
# CONFIG_IEEE1394_PCILYNX is not set CONFIG_IEEE1394_SBP2=y
# CONFIG_IEEE1394_ETH1394_ROM_ENTRY is not set
# CONFIG_IEEE1394_RAWIO is not set CONFIG_IEEE1394_VIDEO1394=yCONFIG_IEEE1394_DV1394=yCONFIG_IEEE1394_VERBOSEDEBUG=yCONFIG_I2O=y
# CONFIG_I2O_LCT_NOTIFY_ON_CHANGES is not set
# CONFIG_I2O_EXT_ADAPTEC is not setCONFIG_I2O_BUS=y
# CONFIG_I2O_BLOCK is not setCONFIG_I2O_SCSI=yCONFIG_I2O_PROC=y
# CONFIG_MACINTOSH_DRIVERS is not set
# CONFIG_NETDEVICES is not setCONFIG_ISDN=y
# CONFIG_ISDN_I4L is not set
# CONFIG_ISDN_CAPI is not setCONFIG_PHONE=y
#
# Input device support
#
# CONFIG_INPUT is not set
#
# Hardware I/O ports
#
# CONFIG_SERIO is not setCONFIG_GAMEPORT=yCONFIG_GAMEPORT_NS558=y
# CONFIG_GAMEPORT_L4 is not setCONFIG_GAMEPORT_EMU10K1=yCONFIG_GAMEPORT_FM801=y
#
# Character devices
#
# CONFIG_VT is not setCONFIG_DEVKMEM=y
# CONFIG_SERIAL_NONSTANDARD is not set
#
# Serial drivers
#CONFIG_SERIAL_8250=y
# CONFIG_SERIAL_8250_CONSOLE is not setCONFIG_FIX_EARLYCON_MEM=yCONFIG_SERIAL_8250_PCI=yCONFIG_SERIAL_8250_NR_UARTS=4CONFIG_SERIAL_8250_RUNTIME_UARTS=4
# CONFIG_SERIAL_8250_EXTENDED is not set
#
# Non-8250 serial port support
#CONFIG_SERIAL_CORE=yCONFIG_SERIAL_JSM=y
# CONFIG_UNIX98_PTYS is not setCONFIG_LEGACY_PTYS=yCONFIG_LEGACY_PTY_COUNT=256CONFIG_HVC_DRIVER=yCONFIG_HVC_IRQ=yCONFIG_HVC_XEN=yCONFIG_VIRTIO_CONSOLE=y
# CONFIG_IPMI_HANDLER is not setCONFIG_HW_RANDOM=yCONFIG_HW_RANDOM_TIMERIOMEM=y
# CONFIG_HW_RANDOM_INTEL is not setCONFIG_HW_RANDOM_AMD=yCONFIG_HW_RANDOM_VIRTIO=y
# CONFIG_NVRAM is not set
# CONFIG_R3964 is not setCONFIG_APPLICOM=yCONFIG_MWAVE=y
CONFIG_PC8736x_GPIO=yCONFIG_NSC_GPIO=y
# CONFIG_RAW_DRIVER is not setCONFIG_HANGCHECK_TIMER=yCONFIG_DEVPORT=yCONFIG_I2C=yCONFIG_I2C_BOARDINFO=yCONFIG_I2C_CHARDEV=y
# CONFIG_I2C_HELPER_AUTO is not set
#
# I2C Algorithms
#CONFIG_I2C_ALGOBIT=yCONFIG_I2C_ALGOPCF=yCONFIG_I2C_ALGOPCA=y
#
# I2C Hardware Bus support
#
#
# PC SMBus host controller drivers
#CONFIG_I2C_ALI1535=yCONFIG_I2C_ALI15X3=y
# CONFIG_I2C_AMD756 is not set
# CONFIG_I2C_AMD8111 is not set
# CONFIG_I2C_I801 is not setCONFIG_I2C_ISCH=yCONFIG_I2C_PIIX4=yCONFIG_I2C_NFORCE2=yCONFIG_I2C_SIS5595=y
# CONFIG_I2C_SIS630 is not setCONFIG_I2C_SIS96X=y
# CONFIG_I2C_VIAPRO is not set
#
# I2C system bus drivers (mostly embedded / system-on-chip) #CONFIG_I2C_SIMTEC=y
#
# External I2C/SMBus adapter drivers
#CONFIG_I2C_PARPORT_LIGHT=y
#
# Graphics adapter I2C/DDC channel drivers
#CONFIG_I2C_VOODOO3=y
#
# Other I2C/SMBus bus drivers
#CONFIG_I2C_PCA_PLATFORM=y
#
# Miscellaneous I2C Chip support
#CONFIG_PCF8575=yCONFIG_I2C_DEBUG_CORE=yCONFIG_I2C_DEBUG_ALGO=yCONFIG_I2C_DEBUG_BUS=y
# CONFIG_I2C_DEBUG_CHIP is not set
# CONFIG_SPI is not setCONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
# CONFIG_GPIOLIB is not setCONFIG_W1=y
# CONFIG_W1_CON is not set
#
# 1-wire Bus Masters
#CONFIG_W1_MASTER_MATROX=y
#
# 1-wire Slaves
#CONFIG_W1_SLAVE_THERM=yCONFIG_W1_SLAVE_SMEM=yCONFIG_W1_SLAVE_DS2431=yCONFIG_W1_SLAVE_DS2433=y
# CONFIG_W1_SLAVE_DS2433_CRC is not setCONFIG_W1_SLAVE_DS2760=yCONFIG_W1_SLAVE_BQ27000=y
# CONFIG_POWER_SUPPLY is not setCONFIG_HWMON=yCONFIG_HWMON_VID=yCONFIG_SENSORS_ADM1021=yCONFIG_SENSORS_ADM1025=yCONFIG_SENSORS_ADM9240=yCONFIG_SENSORS_DS1621=y
# CONFIG_SENSORS_FSCHER is not setCONFIG_SENSORS_FSCPOS=y
# CONFIG_SENSORS_FSCHMD is not setCONFIG_SENSORS_G760A=yCONFIG_SENSORS_GL518SM=yCONFIG_SENSORS_GL520SM=yCONFIG_SENSORS_IT87=yCONFIG_SENSORS_LM63=y
# CONFIG_SENSORS_LM75 is not setCONFIG_SENSORS_LM77=y
# CONFIG_SENSORS_LM78 is not set
# CONFIG_SENSORS_LM83 is not setCONFIG_SENSORS_LM87=yCONFIG_SENSORS_LM90=y
# CONFIG_SENSORS_LM92 is not setCONFIG_SENSORS_LM93=yCONFIG_SENSORS_LM95241=yCONFIG_SENSORS_MAX1619=y
# CONFIG_SENSORS_PC87360 is not setCONFIG_SENSORS_PCF8591=y
# CONFIG_SENSORS_SIS5595 is not setCONFIG_SENSORS_SMSC47M1=yCONFIG_SENSORS_ADS7828=yCONFIG_SENSORS_VIA686A=y
# CONFIG_SENSORS_VT8231 is not set
# CONFIG_SENSORS_W83781D is not setCONFIG_SENSORS_W83627HF=y
# CONFIG_SENSORS_W83627EHF is not setCONFIG_HWMON_DEBUG_CHIP=y
# CONFIG_THERMAL is not setCONFIG_THERMAL_HWMON=yCONFIG_WATCHDOG=y
# CONFIG_WATCHDOG_NOWAYOUT is not set
#
# Watchdog Device Drivers
#
# CONFIG_SOFT_WATCHDOG is not set
# CONFIG_ACQUIRE_WDT is not set
# CONFIG_ADVANTECH_WDT is not setCONFIG_ALIM1535_WDT=y
# CONFIG_ALIM7101_WDT is not set
# CONFIG_SC520_WDT is not set
# CONFIG_EUROTECH_WDT is not setCONFIG_IB700_WDT=y
# CONFIG_IBMASR is not set
# CONFIG_WAFER_WDT is not set
# CONFIG_I6300ESB_WDT is not setCONFIG_ITCO_WDT=yCONFIG_ITCO_VENDOR_SUPPORT=yCONFIG_IT8712F_WDT=yCONFIG_HP_WATCHDOG=y
# CONFIG_SC1200_WDT is not setCONFIG_PC87413_WDT=yCONFIG_60XX_WDT=yCONFIG_SBC8360_WDT=yCONFIG_CPU5_WDT=y
# CONFIG_SMSC_SCH311X_WDT is not setCONFIG_SMSC37B787_WDT=yCONFIG_W83627HF_WDT=yCONFIG_W83697HF_WDT=y
# CONFIG_W83697UG_WDT is not setCONFIG_W83877F_WDT=yCONFIG_W83977F_WDT=yCONFIG_MACHZ_WDT=yCONFIG_SBC_EPX_C3_WATCHDOG=y
#
# PCI-based Watchdog Cards
#
# CONFIG_PCIPCWATCHDOG is not setCONFIG_WDTPCI=yCONFIG_WDT_501_PCI=yCONFIG_SSB_POSSIBLE=y
#
# Sonics Silicon Backplane
#CONFIG_SSB=yCONFIG_SSB_PCIHOST_POSSIBLE=y
# CONFIG_SSB_PCIHOST is not setCONFIG_SSB_SILENT=y
#
# Multifunction device drivers
#CONFIG_MFD_CORE=yCONFIG_MFD_SM501=yCONFIG_HTC_PASIC3=yCONFIG_TWL4030_CORE=y
# CONFIG_MFD_TMIO is not setCONFIG_PMIC_DA903X=yCONFIG_MFD_WM8400=yCONFIG_MFD_PCF50633=yCONFIG_PCF50633_ADC=yCONFIG_PCF50633_GPIO=yCONFIG_REGULATOR=yCONFIG_REGULATOR_DEBUG=yCONFIG_REGULATOR_FIXED_VOLTAGE=yCONFIG_REGULATOR_VIRTUAL_CONSUMER=y
# CONFIG_REGULATOR_BQ24022 is not setCONFIG_REGULATOR_TWL4030=y
# CONFIG_REGULATOR_WM8400 is not set
# CONFIG_REGULATOR_DA903X is not set
# CONFIG_REGULATOR_PCF50633 is not set
#
# Multimedia devices
#
#
# Multimedia core support
#
# CONFIG_VIDEO_DEV is not setCONFIG_DVB_CORE=yCONFIG_VIDEO_MEDIA=y
#
# Multimedia drivers
#CONFIG_MEDIA_TUNER=y
# CONFIG_MEDIA_TUNER_CUSTOMISE is not setCONFIG_MEDIA_TUNER_SIMPLE=yCONFIG_MEDIA_TUNER_TDA8290=yCONFIG_MEDIA_TUNER_TDA9887=yCONFIG_MEDIA_TUNER_TEA5761=yCONFIG_MEDIA_TUNER_TEA5767=yCONFIG_MEDIA_TUNER_MT20XX=yCONFIG_MEDIA_TUNER_XC2028=yCONFIG_MEDIA_TUNER_XC5000=yCONFIG_MEDIA_TUNER_MC44S803=yCONFIG_DVB_DYNAMIC_MINORS=y
# CONFIG_DVB_CAPTURE_DRIVERS is not set
# CONFIG_DAB is not set
#
# Graphics support
#CONFIG_AGP=yCONFIG_AGP_AMD64=yCONFIG_AGP_INTEL=yCONFIG_AGP_SIS=yCONFIG_AGP_VIA=y
# CONFIG_DRM is not set
# CONFIG_VGASTATE is not setCONFIG_VIDEO_OUTPUT_CONTROL=y
# CONFIG_FB is not setCONFIG_BACKLIGHT_LCD_SUPPORT=yCONFIG_LCD_CLASS_DEVICE=y
# CONFIG_LCD_ILI9320 is not setCONFIG_LCD_PLATFORM=yCONFIG_BACKLIGHT_CLASS_DEVICE=yCONFIG_BACKLIGHT_GENERIC=yCONFIG_BACKLIGHT_PROGEAR=yCONFIG_BACKLIGHT_DA903X=y
# CONFIG_BACKLIGHT_MBP_NVIDIA is not setCONFIG_BACKLIGHT_SAHARA=y
#
# Display device support
#CONFIG_DISPLAY_SUPPORT=y
#
# Display hardware drivers
#CONFIG_SOUND=yCONFIG_SOUND_OSS_CORE=yCONFIG_SND=yCONFIG_SND_TIMER=yCONFIG_SND_PCM=yCONFIG_SND_RAWMIDI=y
# CONFIG_SND_SEQUENCER is not setCONFIG_SND_OSSEMUL=yCONFIG_SND_MIXER_OSS=yCONFIG_SND_PCM_OSS=yCONFIG_SND_PCM_OSS_PLUGINS=yCONFIG_SND_HRTIMER=y
# CONFIG_SND_DYNAMIC_MINORS is not setCONFIG_SND_SUPPORT_OLD_API=y
# CONFIG_SND_VERBOSE_PRINTK is not setCONFIG_SND_DEBUG=y
# CONFIG_SND_DEBUG_VERBOSE is not setCONFIG_SND_MPU401_UART=yCONFIG_SND_DRIVERS=y
# CONFIG_SND_DUMMY is not setCONFIG_SND_SERIAL_U16550=yCONFIG_SND_MPU401=y
# CONFIG_SND_PCI is not set
# CONFIG_SND_SOC is not setCONFIG_SOUND_PRIME=yCONFIG_SOUND_OSS=y
# CONFIG_SOUND_TRACEINIT is not setCONFIG_SOUND_DMAP=y
# CONFIG_SOUND_SSCAPE is not set
# CONFIG_SOUND_VMIDI is not setCONFIG_SOUND_TRIX=yCONFIG_SOUND_MSS=yCONFIG_SOUND_MPU401=yCONFIG_SOUND_PAS=y
# CONFIG_PAS_JOYSTICK is not setCONFIG_SOUND_PSS=yCONFIG_PSS_MIXER=yCONFIG_SOUND_SB=yCONFIG_SOUND_YM3812=yCONFIG_SOUND_UART6850=y
# CONFIG_SOUND_AEDSP16 is not set
# CONFIG_SOUND_KAHLUA is not set
# CONFIG_USB_SUPPORT is not setCONFIG_MMC=yCONFIG_MMC_DEBUG=yCONFIG_MMC_UNSAFE_RESUME=y
#
# MMC/SD/SDIO Card Drivers
#
# CONFIG_MMC_BLOCK is not setCONFIG_SDIO_UART=yCONFIG_MMC_TEST=y
#
# MMC/SD/SDIO Host Controller Drivers
#CONFIG_MMC_SDHCI=yCONFIG_MMC_SDHCI_PCI=yCONFIG_MMC_RICOH_MMC=y
# CONFIG_MMC_WBSD is not setCONFIG_MEMSTICK=yCONFIG_MEMSTICK_DEBUG=y
#
# MemoryStick drivers
#CONFIG_MEMSTICK_UNSAFE_RESUME=yCONFIG_MSPRO_BLOCK=y
#
# MemoryStick Host Controller Drivers
#CONFIG_NEW_LEDS=y
# CONFIG_LEDS_CLASS is not set
#
# LED drivers
#
#
# LED Triggers
#CONFIG_LEDS_TRIGGERS=yCONFIG_LEDS_TRIGGER_TIMER=yCONFIG_LEDS_TRIGGER_HEARTBEAT=y
# CONFIG_LEDS_TRIGGER_BACKLIGHT is not setCONFIG_LEDS_TRIGGER_DEFAULT_ON=y
#
# iptables trigger is under Netfilter config (LED target) # CONFIG_ACCESSIBILITY=y CONFIG_EDAC=y
#
# Reporting subsystems
#
# CONFIG_EDAC_DEBUG is not setCONFIG_EDAC_MM_EDAC=yCONFIG_EDAC_I82975X=yCONFIG_EDAC_I3000=yCONFIG_EDAC_X38=y
# CONFIG_EDAC_I5400 is not setCONFIG_EDAC_I5000=yCONFIG_EDAC_I5100=y
# CONFIG_EDAC_AMD8131 is not setCONFIG_EDAC_AMD8111=yCONFIG_RTC_LIB=yCONFIG_RTC_CLASS=yCONFIG_RTC_HCTOSYS=yCONFIG_RTC_HCTOSYS_DEVICE="rtc0"CONFIG_RTC_DEBUG=y
#
# RTC interfaces
#CONFIG_RTC_INTF_SYSFS=yCONFIG_RTC_INTF_DEV=yCONFIG_RTC_INTF_DEV_UIE_EMUL=yCONFIG_RTC_DRV_TEST=y
#
# I2C RTC drivers
#
# CONFIG_RTC_DRV_DS1307 is not setCONFIG_RTC_DRV_DS1374=yCONFIG_RTC_DRV_DS1672=yCONFIG_RTC_DRV_MAX6900=yCONFIG_RTC_DRV_RS5C372=y
# CONFIG_RTC_DRV_ISL1208 is not setCONFIG_RTC_DRV_X1205=yCONFIG_RTC_DRV_PCF8563=yCONFIG_RTC_DRV_PCF8583=yCONFIG_RTC_DRV_M41T80=yCONFIG_RTC_DRV_M41T80_WDT=yCONFIG_RTC_DRV_TWL4030=yCONFIG_RTC_DRV_S35390A=y
# CONFIG_RTC_DRV_FM3130 is not set
# CONFIG_RTC_DRV_RX8581 is not set
#
# SPI RTC drivers
#
#
# Platform RTC drivers
#CONFIG_RTC_DRV_CMOS=yCONFIG_RTC_DRV_DS1286=yCONFIG_RTC_DRV_DS1511=yCONFIG_RTC_DRV_DS1553=yCONFIG_RTC_DRV_DS1742=yCONFIG_RTC_DRV_STK17TA8=yCONFIG_RTC_DRV_M48T86=yCONFIG_RTC_DRV_M48T35=yCONFIG_RTC_DRV_M48T59=yCONFIG_RTC_DRV_BQ4802=yCONFIG_RTC_DRV_V3020=yCONFIG_RTC_DRV_PCF50633=y
#
# on-CPU RTC drivers
#CONFIG_DMADEVICES=y
#
# DMA Devices
#CONFIG_INTEL_IOATDMA=yCONFIG_DMA_ENGINE=y
#
# DMA Clients
#CONFIG_NET_DMA=yCONFIG_ASYNC_TX_DMA=yCONFIG_DMATEST=yCONFIG_DCA=y
# CONFIG_AUXDISPLAY is not setCONFIG_UIO=yCONFIG_UIO_CIF=yCONFIG_UIO_PDRV=yCONFIG_UIO_PDRV_GENIRQ=y
# CONFIG_UIO_SMX is not setCONFIG_UIO_AEC=yCONFIG_UIO_SERCOS3=yCONFIG_XEN_BALLOON=y
# CONFIG_XEN_SCRUB_PAGES is not setCONFIG_XEN_DEV_EVTCHN=yCONFIG_XENFS=yCONFIG_XEN_COMPAT_XENFS=yCONFIG_XEN_SYS_HYPERVISOR=yCONFIG_X86_PLATFORM_DEVICES=y
#
# Firmware Drivers
#CONFIG_EDD=y
# CONFIG_EDD_OFF is not set
# CONFIG_FIRMWARE_MEMMAP is not setCONFIG_DELL_RBU=y
# CONFIG_DCDBAS is not setCONFIG_ISCSI_IBFT_FIND=yCONFIG_ISCSI_IBFT=y
#
# File systems
#
# CONFIG_EXT2_FS is not set
# CONFIG_EXT3_FS is not set
# CONFIG_EXT4_FS is not setCONFIG_JBD2=yCONFIG_JBD2_DEBUG=y
# CONFIG_REISERFS_FS is not set
# CONFIG_JFS_FS is not setCONFIG_FS_POSIX_ACL=yCONFIG_FILE_LOCKING=yCONFIG_XFS_FS=yCONFIG_XFS_QUOTA=y
# CONFIG_XFS_POSIX_ACL is not setCONFIG_XFS_RT=yCONFIG_OCFS2_FS=yCONFIG_OCFS2_FS_O2CB=yCONFIG_OCFS2_FS_STATS=yCONFIG_OCFS2_DEBUG_MASKLOG=y
# CONFIG_OCFS2_DEBUG_FS is not setCONFIG_OCFS2_FS_POSIX_ACL=y
# CONFIG_DNOTIFY is not setCONFIG_INOTIFY=y
# CONFIG_INOTIFY_USER is not setCONFIG_QUOTA=yCONFIG_QUOTA_NETLINK_INTERFACE=y
# CONFIG_PRINT_QUOTA_WARNING is not setCONFIG_QUOTA_TREE=yCONFIG_QFMT_V1=y
# CONFIG_QFMT_V2 is not setCONFIG_QUOTACTL=yCONFIG_AUTOFS_FS=yCONFIG_AUTOFS4_FS=y
# CONFIG_FUSE_FS is not set
#
# Caches
#
#
# CD-ROM/DVD Filesystems
#CONFIG_ISO9660_FS=yCONFIG_JOLIET=y
# CONFIG_ZISOFS is not set
# CONFIG_UDF_FS is not set
#
# DOS/FAT/NT Filesystems
#
# CONFIG_MSDOS_FS is not set
# CONFIG_VFAT_FS is not setCONFIG_NTFS_FS=yCONFIG_NTFS_DEBUG=yCONFIG_NTFS_RW=y
#
# Pseudo filesystems
#
# CONFIG_PROC_FS is not setCONFIG_SYSFS=yCONFIG_TMPFS=y
# CONFIG_TMPFS_POSIX_ACL is not set
# CONFIG_HUGETLBFS is not set
# CONFIG_HUGETLB_PAGE is not setCONFIG_CONFIGFS_FS=yCONFIG_MISC_FILESYSTEMS=y
# CONFIG_HFSPLUS_FS is not set
# CONFIG_CRAMFS is not set
# CONFIG_SQUASHFS is not set
# CONFIG_VXFS_FS is not setCONFIG_MINIX_FS=yCONFIG_OMFS_FS=yCONFIG_HPFS_FS=yCONFIG_QNX4FS_FS=yCONFIG_ROMFS_FS=yCONFIG_ROMFS_BACKED_BY_BLOCK=y
# CONFIG_ROMFS_BACKED_BY_MTD is not set
# CONFIG_ROMFS_BACKED_BY_BOTH is not setCONFIG_ROMFS_ON_BLOCK=yCONFIG_SYSV_FS=yCONFIG_UFS_FS=yCONFIG_UFS_DEBUG=yCONFIG_EXOFS_FS=y
# CONFIG_EXOFS_DEBUG is not setCONFIG_NETWORK_FILESYSTEMS=yCONFIG_NFS_FS=yCONFIG_NFS_V3=yCONFIG_NFS_V3_ACL=yCONFIG_NFSD=yCONFIG_NFSD_V2_ACL=yCONFIG_NFSD_V3=yCONFIG_NFSD_V3_ACL=yCONFIG_LOCKD=yCONFIG_LOCKD_V4=yCONFIG_EXPORTFS=yCONFIG_NFS_ACL_SUPPORT=yCONFIG_NFS_COMMON=yCONFIG_SUNRPC=yCONFIG_SMB_FS=y
# CONFIG_SMB_NLS_DEFAULT is not setCONFIG_CIFS=yCONFIG_CIFS_STATS=yCONFIG_CIFS_STATS2=yCONFIG_CIFS_WEAK_PW_HASH=y
# CONFIG_CIFS_UPCALL is not setCONFIG_CIFS_XATTR=y
# CONFIG_CIFS_POSIX is not set
# CONFIG_CIFS_DEBUG2 is not setCONFIG_CIFS_DFS_UPCALL=y
# CONFIG_NCP_FS is not setCONFIG_CODA_FS=y
#
# Partition Types
#
# CONFIG_PARTITION_ADVANCED is not setCONFIG_MSDOS_PARTITION=yCONFIG_NLS=yCONFIG_NLS_DEFAULT="iso8859-1"CONFIG_NLS_CODEPAGE_437=y
# CONFIG_NLS_CODEPAGE_737 is not setCONFIG_NLS_CODEPAGE_775=yCONFIG_NLS_CODEPAGE_850=yCONFIG_NLS_CODEPAGE_852=yCONFIG_NLS_CODEPAGE_855=yCONFIG_NLS_CODEPAGE_857=yCONFIG_NLS_CODEPAGE_860=yCONFIG_NLS_CODEPAGE_861=yCONFIG_NLS_CODEPAGE_862=yCONFIG_NLS_CODEPAGE_863=y
# CONFIG_NLS_CODEPAGE_864 is not set
# CONFIG_NLS_CODEPAGE_865 is not set
# CONFIG_NLS_CODEPAGE_866 is not setCONFIG_NLS_CODEPAGE_869=y
# CONFIG_NLS_CODEPAGE_936 is not setCONFIG_NLS_CODEPAGE_950=yCONFIG_NLS_CODEPAGE_932=yCONFIG_NLS_CODEPAGE_949=yCONFIG_NLS_CODEPAGE_874=y
# CONFIG_NLS_ISO8859_8 is not setCONFIG_NLS_CODEPAGE_1250=yCONFIG_NLS_CODEPAGE_1251=yCONFIG_NLS_ASCII=yCONFIG_NLS_ISO8859_1=y
# CONFIG_NLS_ISO8859_2 is not set
# CONFIG_NLS_ISO8859_3 is not setCONFIG_NLS_ISO8859_4=y
# CONFIG_NLS_ISO8859_5 is not setCONFIG_NLS_ISO8859_6=yCONFIG_NLS_ISO8859_7=yCONFIG_NLS_ISO8859_9=y
# CONFIG_NLS_ISO8859_13 is not setCONFIG_NLS_ISO8859_14=yCONFIG_NLS_ISO8859_15=yCONFIG_NLS_KOI8_R=yCONFIG_NLS_KOI8_U=yCONFIG_NLS_UTF8=y
#
# Kernel hacking
#CONFIG_TRACE_IRQFLAGS_SUPPORT=yCONFIG_ALLOW_WARNINGS=yCONFIG_ENABLE_WARN_DEPRECATED=yCONFIG_ENABLE_MUST_CHECK=yCONFIG_FRAME_WARN=2048CONFIG_MAGIC_SYSRQ=yCONFIG_UNUSED_SYMBOLS=yCONFIG_DEBUG_FS=yCONFIG_HEADERS_CHECK=yCONFIG_DEBUG_SECTION_MISMATCH=yCONFIG_DEBUG_KERNEL=yCONFIG_DEBUG_SHIRQ=y
# CONFIG_DETECT_SOFTLOCKUP is not setCONFIG_DETECT_HUNG_TASK=yCONFIG_BOOTPARAM_HUNG_TASK_PANIC=yCONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=1CONFIG_SCHED_DEBUG=yCONFIG_SCHEDSTATS=yCONFIG_DEBUG_OBJECTS=y
# CONFIG_DEBUG_OBJECTS_SELFTEST is not setCONFIG_DEBUG_OBJECTS_FREE=yCONFIG_DEBUG_OBJECTS_TIMERS=yCONFIG_DEBUG_OBJECTS_ENABLE_DEFAULT=1CONFIG_SLUB_DEBUG_ON=yCONFIG_SLUB_STATS=yCONFIG_DEBUG_RT_MUTEXES=yCONFIG_DEBUG_PI_LIST=y
# CONFIG_RT_MUTEX_TESTER is not setCONFIG_DEBUG_SPINLOCK=yCONFIG_DEBUG_MUTEXES=yCONFIG_DEBUG_LOCK_ALLOC=y
# CONFIG_PROVE_LOCKING is not setCONFIG_LOCKDEP=yCONFIG_LOCK_STAT=yCONFIG_DEBUG_LOCKDEP=yCONFIG_TRACE_IRQFLAGS=yCONFIG_DEBUG_SPINLOCK_SLEEP=yCONFIG_DEBUG_LOCKING_API_SELFTESTS=yCONFIG_STACKTRACE=yCONFIG_DEBUG_KOBJECT=y
# CONFIG_DEBUG_BUGVERBOSE is not setCONFIG_DEBUG_VM=yCONFIG_DEBUG_VIRTUAL=yCONFIG_DEBUG_WRITECOUNT=y
# CONFIG_DEBUG_MEMORY_INIT is not setCONFIG_DEBUG_LIST=yCONFIG_DEBUG_SG=yCONFIG_DEBUG_NOTIFIERS=yCONFIG_ARCH_WANT_FRAME_POINTERS=yCONFIG_FRAME_POINTER=yCONFIG_RCU_TORTURE_TEST=yCONFIG_RCU_TORTURE_TEST_RUNNABLE=yCONFIG_RCU_CPU_STALL_DETECTOR=yCONFIG_BACKTRACE_SELF_TEST=yCONFIG_DEBUG_BLOCK_EXT_DEVT=yCONFIG_FAULT_INJECTION=y
# CONFIG_FAILSLAB is not setCONFIG_FAIL_PAGE_ALLOC=yCONFIG_FAIL_MAKE_REQUEST=yCONFIG_FAIL_IO_TIMEOUT=yCONFIG_FAULT_INJECTION_DEBUG_FS=yCONFIG_LATENCYTOP=yCONFIG_DEBUG_PAGEALLOC=yCONFIG_USER_STACKTRACE_SUPPORT=yCONFIG_NOP_TRACER=yCONFIG_HAVE_FUNCTION_TRACER=yCONFIG_HAVE_FUNCTION_GRAPH_TRACER=yCONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=yCONFIG_HAVE_DYNAMIC_FTRACE=yCONFIG_HAVE_FTRACE_MCOUNT_RECORD=yCONFIG_HAVE_HW_BRANCH_TRACER=yCONFIG_HAVE_FTRACE_SYSCALLS=yCONFIG_TRACER_MAX_TRACE=yCONFIG_RING_BUFFER=yCONFIG_EVENT_TRACING=yCONFIG_TRACING=yCONFIG_TRACING_SUPPORT=y
#
# Tracers
#CONFIG_FUNCTION_TRACER=yCONFIG_FUNCTION_GRAPH_TRACER=yCONFIG_IRQSOFF_TRACER=y
# CONFIG_SYSPROF_TRACER is not setCONFIG_SCHED_TRACER=yCONFIG_CONTEXT_SWITCH_TRACER=yCONFIG_EVENT_TRACER=yCONFIG_FTRACE_SYSCALLS=yCONFIG_BOOT_TRACER=yCONFIG_TRACE_BRANCH_PROFILING=yCONFIG_PROFILE_ALL_BRANCHES=yCONFIG_TRACING_BRANCHES=yCONFIG_BRANCH_TRACER=yCONFIG_POWER_TRACER=yCONFIG_STACK_TRACER=y
# CONFIG_HW_BRANCH_TRACER is not setCONFIG_KMEMTRACE=y
# CONFIG_WORKQUEUE_TRACER is not setCONFIG_BLK_DEV_IO_TRACE=y
# CONFIG_DYNAMIC_FTRACE is not set
# CONFIG_FUNCTION_PROFILER is not setCONFIG_FTRACE_SELFTEST=yCONFIG_FTRACE_STARTUP_TEST=y
# CONFIG_MMIOTRACE is not setCONFIG_PROVIDE_OHCI1394_DMA_INIT=yCONFIG_BUILD_DOCSRC=yCONFIG_DMA_API_DEBUG=yCONFIG_SAMPLES=y
# CONFIG_SAMPLE_KOBJECT is not setCONFIG_HAVE_ARCH_KGDB=yCONFIG_HAVE_ARCH_KMEMCHECK=y
# CONFIG_STRICT_DEVMEM is not set
# CONFIG_X86_VERBOSE_BOOTUP is not set
# CONFIG_EARLY_PRINTK is not setCONFIG_DEBUG_STACKOVERFLOW=yCONFIG_DEBUG_STACK_USAGE=y
# CONFIG_DEBUG_PER_CPU_MAPS is not set
# CONFIG_X86_PTDUMP is not setCONFIG_DEBUG_RODATA=y
# CONFIG_DEBUG_RODATA_TEST is not setCONFIG_IOMMU_DEBUG=yCONFIG_IOMMU_LEAK=yCONFIG_X86_DS_SELFTEST=yCONFIG_HAVE_MMIOTRACE_SUPPORT=yCONFIG_IO_DELAY_TYPE_0X80=0CONFIG_IO_DELAY_TYPE_0XED=1CONFIG_IO_DELAY_TYPE_UDELAY=2CONFIG_IO_DELAY_TYPE_NONE=3CONFIG_IO_DELAY_0X80=y
# CONFIG_IO_DELAY_0XED is not set
# CONFIG_IO_DELAY_UDELAY is not set
# CONFIG_IO_DELAY_NONE is not setCONFIG_DEFAULT_IO_DELAY_TYPE=0CONFIG_DEBUG_BOOT_PARAMS=yCONFIG_CPA_DEBUG=yCONFIG_OPTIMIZE_INLINING=y
#
# Security options
#CONFIG_KEYS=yCONFIG_KEYS_DEBUG_PROC_KEYS=y CONFIG_SECURITY=yCONFIG_SECURITYFS=yCONFIG_SECURITY_NETWORK=y CONFIG_SECURITY_NETWORK_XFRM=y CONFIG_SECURITY_PATH=y CONFIG_SECURITY_FILE_CAPABILITIES=y CONFIG_SECURITY_DEFAULT_MMAP_MIN_ADDR=0 CONFIG_SECURITY_SELINUX=y CONFIG_SECURITY_SELINUX_BOOTPARAM=y CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1 CONFIG_SECURITY_SELINUX_DISABLE=y
# CONFIG_SECURITY_SELINUX_DEVELOP is not set CONFIG_SECURITY_SELINUX_AVC_STATS=y CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1 CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX=y CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX_VALUE=19 CONFIG_SECURITY_SMACK=y CONFIG_SECURITY_TOMOYO=yCONFIG_XOR_BLOCKS=yCONFIG_ASYNC_CORE=yCONFIG_ASYNC_MEMCPY=yCONFIG_ASYNC_XOR=yCONFIG_CRYPTO=y
#
# Crypto core or helper
#CONFIG_CRYPTO_FIPS=yCONFIG_CRYPTO_ALGAPI=yCONFIG_CRYPTO_ALGAPI2=yCONFIG_CRYPTO_AEAD=yCONFIG_CRYPTO_AEAD2=yCONFIG_CRYPTO_BLKCIPHER=yCONFIG_CRYPTO_BLKCIPHER2=yCONFIG_CRYPTO_HASH=yCONFIG_CRYPTO_HASH2=yCONFIG_CRYPTO_RNG=yCONFIG_CRYPTO_RNG2=yCONFIG_CRYPTO_PCOMP=yCONFIG_CRYPTO_MANAGER=yCONFIG_CRYPTO_MANAGER2=yCONFIG_CRYPTO_GF128MUL=yCONFIG_CRYPTO_NULL=yCONFIG_CRYPTO_WORKQUEUE=yCONFIG_CRYPTO_CRYPTD=yCONFIG_CRYPTO_AUTHENC=y
#
# Authenticated Encryption with Associated Data
#CONFIG_CRYPTO_CCM=yCONFIG_CRYPTO_GCM=yCONFIG_CRYPTO_SEQIV=y
#
# Block modes
#CONFIG_CRYPTO_CBC=yCONFIG_CRYPTO_CTR=yCONFIG_CRYPTO_CTS=yCONFIG_CRYPTO_ECB=y
# CONFIG_CRYPTO_PCBC is not set
#
# Hash modes
#CONFIG_CRYPTO_HMAC=y
#
# Digest
#
# CONFIG_CRYPTO_CRC32C is not setCONFIG_CRYPTO_CRC32C_INTEL=y
# CONFIG_CRYPTO_MD4 is not setCONFIG_CRYPTO_MD5=yCONFIG_CRYPTO_MICHAEL_MIC=y
# CONFIG_CRYPTO_RMD128 is not setCONFIG_CRYPTO_RMD160=yCONFIG_CRYPTO_RMD256=yCONFIG_CRYPTO_RMD320=yCONFIG_CRYPTO_SHA1=yCONFIG_CRYPTO_SHA256=y
# CONFIG_CRYPTO_SHA512 is not set
# CONFIG_CRYPTO_TGR192 is not setCONFIG_CRYPTO_WP512=y
#
# Ciphers
#CONFIG_CRYPTO_AES=yCONFIG_CRYPTO_AES_X86_64=yCONFIG_CRYPTO_AES_NI_INTEL=yCONFIG_CRYPTO_ANUBIS=yCONFIG_CRYPTO_ARC4=y
# CONFIG_CRYPTO_BLOWFISH is not set
# CONFIG_CRYPTO_CAMELLIA is not set
# CONFIG_CRYPTO_CAST5 is not setCONFIG_CRYPTO_CAST6=yCONFIG_CRYPTO_DES=yCONFIG_CRYPTO_FCRYPT=yCONFIG_CRYPTO_KHAZAD=yCONFIG_CRYPTO_SEED=yCONFIG_CRYPTO_SERPENT=yCONFIG_CRYPTO_TEA=yCONFIG_CRYPTO_TWOFISH=yCONFIG_CRYPTO_TWOFISH_COMMON=y
# CONFIG_CRYPTO_TWOFISH_X86_64 is not set
#
# Compression
#CONFIG_CRYPTO_DEFLATE=y
# CONFIG_CRYPTO_ZLIB is not setCONFIG_CRYPTO_LZO=y
#
# Random Number Generation
#CONFIG_CRYPTO_ANSI_CPRNG=yCONFIG_CRYPTO_HW=y
# CONFIG_CRYPTO_DEV_HIFN_795X is not setCONFIG_HAVE_KVM=yCONFIG_HAVE_KVM_IRQCHIP=yCONFIG_VIRTUALIZATION=yCONFIG_KVM=yCONFIG_KVM_INTEL=yCONFIG_KVM_AMD=y
# CONFIG_KVM_TRACE is not setCONFIG_VIRTIO=yCONFIG_VIRTIO_RING=yCONFIG_VIRTIO_BALLOON=yCONFIG_BINARY_PRINTF=y
#
# Library routines
#CONFIG_BITREVERSE=yCONFIG_GENERIC_FIND_FIRST_BIT=yCONFIG_GENERIC_FIND_NEXT_BIT=yCONFIG_GENERIC_FIND_LAST_BIT=y
# CONFIG_CRC_CCITT is not setCONFIG_CRC16=yCONFIG_CRC_T10DIF=yCONFIG_CRC_ITU_T=yCONFIG_CRC32=yCONFIG_CRC7=y
# CONFIG_LIBCRC32C is not setCONFIG_ZLIB_INFLATE=yCONFIG_ZLIB_DEFLATE=yCONFIG_LZO_COMPRESS=yCONFIG_LZO_DECOMPRESS=yCONFIG_DECOMPRESS_BZIP2=yCONFIG_HAS_IOMEM=yCONFIG_HAS_IOPORT=yCONFIG_HAS_DMA=yCONFIG_NLATTR=yCONFIG_FORCE_SUCCESSFUL_BUILD=y
Quoted 5 lines · Steven Rostedt
include/trace/define_trace.h | 79 ++++++ include/trace/ftrace.h | 493 +++++++++++++++++++++++++++++++++++ include/trace/irq.h | 56 ++++- include/trace/irq_event_types.h | 55 ---- include/trace/kmem.h | 189 +++++++++++++-
Quoted 8 lines
include/trace/lockdep.h | 55 ++++- include/trace/lockdep_event_types.h | 57 ---- include/trace/sched.h | 336 +++++++++++++++++++++++- include/trace/sched_event_types.h | 337 ------------------------ include/trace/skb.h | 39 +++- include/trace/skb_event_types.h | 38 --- include/trace/trace_event_types.h | 7 - include/trace/trace_events.h | 7 -
Detail: we still have include/trace/kmem_event_types.h around - is that intentional? It isnt actually used by anything so we can git-rm it.
Also, we mix tracepoint definition headers with other misc headers such as syscall.h or boot.h.
I think it would be cleaner and better sructured to have these centrally enumerated tracepoint definitions separated in include/trace/events/.
That sub-directory would _only_ include the TRACE_EVENT() definitions - nothing else. Hence it would also be a nice in-situ template collection for anyone adding new tracepoints. The existence of other headers really distracts from that.
What do you think?
Ingo
Steven Rostedt
maintainerQuoted 17 lines · Ingo Molnar
Quoted 5 lines · Steven Rostedt
include/trace/define_trace.h | 79 ++++++ include/trace/ftrace.h | 493 +++++++++++++++++++++++++++++++++++ include/trace/irq.h | 56 ++++- include/trace/irq_event_types.h | 55 ---- include/trace/kmem.h | 189 +++++++++++++-Quoted 8 lines
include/trace/lockdep.h | 55 ++++- include/trace/lockdep_event_types.h | 57 ---- include/trace/sched.h | 336 +++++++++++++++++++++++- include/trace/sched_event_types.h | 337 ------------------------ include/trace/skb.h | 39 +++- include/trace/skb_event_types.h | 38 --- include/trace/trace_event_types.h | 7 - include/trace/trace_events.h | 7 -
Quoted 3 lines
Detail: we still have
include/trace/kmem_event_types.haround - is that intentional? It isnt actually used by anything so we can git-rm it.
I rebased it several times, doing minor tweaks and such. I think I may have missed a git-rm. That file is suppose to be deleted.
Quoted 8 lines
Also, we mix tracepoint definition headers with other misc headers such as
syscall.horboot.h.I think it would be cleaner and better sructured to have these centrally enumerated tracepoint definitions separated in
include/trace/events/.
Quoted 6 lines
That sub-directory would _only_ include the
TRACE_EVENT()definitions - nothing else. Hence it would also be a nice in-situ template collection for anyone adding new tracepoints. The existence of other headers really distracts from that.What do you think?
I'm fine with that. As long as people are fine with doing:
#include <trace/events/sched.h>
and such.
-- Steve
Quoted 40 lines · Steven Rostedt
Quoted 17 lines · Ingo Molnar
Quoted 5 lines · Steven Rostedt
include/trace/define_trace.h | 79 ++++++ include/trace/ftrace.h | 493 +++++++++++++++++++++++++++++++++++ include/trace/irq.h | 56 ++++- include/trace/irq_event_types.h | 55 ---- include/trace/kmem.h | 189 +++++++++++++-Quoted 8 lines
include/trace/lockdep.h | 55 ++++- include/trace/lockdep_event_types.h | 57 ---- include/trace/sched.h | 336 +++++++++++++++++++++++- include/trace/sched_event_types.h | 337 ------------------------ include/trace/skb.h | 39 +++- include/trace/skb_event_types.h | 38 --- include/trace/trace_event_types.h | 7 - include/trace/trace_events.h | 7 -Quoted 3 lines
Detail: we still have
include/trace/kmem_event_types.haround - is that intentional? It isnt actually used by anything so we can git-rm it.I rebased it several times, doing minor tweaks and such. I think I may have missed a git-rm. That file is suppose to be deleted.
Quoted 13 lines
Also, we mix tracepoint definition headers with other misc headers such as
syscall.horboot.h.I think it would be cleaner and better sructured to have these centrally enumerated tracepoint definitions separated in
include/trace/events/.That sub-directory would _only_ include the
TRACE_EVENT()definitions - nothing else. Hence it would also be a nice in-situ template collection for anyone adding new tracepoints. The existence of other headers really distracts from that.
Quoted 7 lines
Quoted 1 line
What do you think?
I'm fine with that. As long as people are fine with doing:
#include <
trace/events/sched.h>and such.
Yes, i think it's very clear that way: trace/events/*.h bits are for tracepoint definitions.
Ingo
Quoted 6 lines · Steven Rostedt
Removal of the two headers per trace system. No need to have
include/trace/sched.handinclude/linux/sched_event_types.hAll the changes go intoinclude/trace/sched.h. But note that how that file is made is important. One could look at thesched.hfile, orskb.h,lockdep.handkmem.has an example.
Hi Steven,
One thing which I would really like is to avoid needing to drop the header file in include/trace/<subsystem.h>.
The problem that I have with this is that for ext4, we need to access private data structures which are defined in header files in fs/ext4/*.h --- which we moved into fs/ext4 a long time ago at the request of those who felt include/linux/* was getting rather cluttered, and if a subsystem had header files which were only needed by files for that particular subsystems, they should be moved out of include/linux.
I supported the above-mentioned cleanup, but it's causing problems given that include/trace/ext4_events_types.h (or include/trace/ext4.h in the new world order) needs access to various structure definitions in fs/ext4/*.h. I could move the required header files into include/linux/ext4_tracing_types.h --- which has the downside that it is a very random collection of data structures --- or I could entirely revert the cleanup we did long ago and move all of the ext4 header files back into include/linux. But better yet would be if there was some way we could tell the tracing subsystem that tracing header file for ext4 could be found in fs/ext4/ext4_trace.h.
Any chance you could support something like this?
Thanks, regards,
- Ted
Steven Rostedt
maintainerQuoted 32 lines · Theodore Tso
Quoted 6 lines · Steven Rostedt
Removal of the two headers per trace system. No need to have
include/trace/sched.handinclude/linux/sched_event_types.hAll the changes go intoinclude/trace/sched.h. But note that how that file is made is important. One could look at thesched.hfile, orskb.h,lockdep.handkmem.has an example.Hi Steven,
One thing which I would really like is to avoid needing to drop the header file in include/trace/<subsystem.h>.
The problem that I have with this is that for ext4, we need to access private data structures which are defined in header files in
fs/ext4/*.h--- which we moved into fs/ext4 a long time ago at the request of those who feltinclude/linux/*was getting rather cluttered, and if a subsystem had header files which were only needed by files for that particular subsystems, they should be moved out ofinclude/linux.I supported the above-mentioned cleanup, but it's causing problems given that
include/trace/ext4_events_types.h(orinclude/trace/ext4.hin the new world order) needs access to various structure definitions infs/ext4/*.h. I could move the required header files intoinclude/linux/ext4_tracing_types.h--- which has the downside that it is a very random collection of data structures --- or I could entirely revert the cleanup we did long ago and move all of the ext4 header files back intoinclude/linux. But better yet would be if there was some way we could tell the tracing subsystem that tracing header file for ext4 could be found infs/ext4/ext4_trace.h.
Quoted 1 line
Any chance you could support something like this?
Yes, at the bottom of your header file, before including define_trace.h, you can simply add:
#undef TRACE_INCLUDE_PATH
#define TRACE_INCLUDE_PATH ../../fs/ext4
#include <trace/define_trace.h>
the TRACE_INCLUDE_PATH is a reference from where trace/define_trace.h is located. It may even be cleaner to do:
#undef TRACE_INCLUDE_PATH
#define TRACE_INCLUDE_PATH EXT4_PATH
and in the Makefile have:
CFLAGS_ext4_jbd2.o := -DEXT4_PATH=$(PWD)
That's something like what I did for my external module test.
-- Steve
Steven Rostedt
maintainerQuoted 13 lines · Steven Rostedt
Yes, at the bottom of your header file, before including
define_trace.h, you can simply add:#undef
TRACE_INCLUDE_PATH
#defineTRACE_INCLUDE_PATH../../fs/ext4#include <
trace/define_trace.h>the
TRACE_INCLUDE_PATHis a reference from wheretrace/define_trace.his located. It may even be cleaner to do:
Quoted 8 lines
#undef
TRACE_INCLUDE_PATH
#defineTRACE_INCLUDE_PATHEXT4_PATHand in the
Makefilehave:CFLAGS_ext4_jbd2.o := -DEXT4_PATH=$(PWD)
That's something like what I did for my external module test.
Note, you only need to add the CFLAGS for the object that performs the:
#define CREATE_TRACE_POINTS
-- Steve
Hi -
Quoted 7 lines · Theodore Tso
[...]
One thing which I would really like is to avoid needing to drop the header file in include/trace/<subsystem.h>.The problem that I have with this is that for ext4, we need to access private data structures which are defined in header files in
fs/ext4/*.h--- which we moved into fs/ext4 a long time ago [...]
If the tracepoints/events expand to code that exposes those private structures, then those structures are perhaps not quite so private any more. That argues for moving those headers back under include/..., or at least those type decls made reachable from the tracepoints.
- FChE
Steven Rostedt
maintainerQuoted 7 lines · Frank Ch. Eigler
Hi -
Quoted 4 lines · Theodore Tso
[...]
One thing which I would really like is to avoid needing to drop the header file in include/trace/<subsystem.h>.
Quoted 8 lines
Quoted 3 lines
The problem that I have with this is that for ext4, we need to access private data structures which are defined in header files in
fs/ext4/*.h--- which we moved into fs/ext4 a long time ago [...]If the tracepoints/events expand to code that exposes those private structures, then those structures are perhaps not quite so private any more. That argues for moving those headers back under
include/..., or at least those type decls made reachable from the tracepoints.
I think those headers are fine. This must also work when ext4 is a module.
-- Steve
Quoted 7 lines · Frank Ch. Eigler
Hi -
Quoted 4 lines · Theodore Tso
[...]
One thing which I would really like is to avoid needing to drop the header file in include/trace/<subsystem.h>.
Quoted 8 lines
Quoted 3 lines
The problem that I have with this is that for ext4, we need to access private data structures which are defined in header files in
fs/ext4/*.h--- which we moved into fs/ext4 a long time ago [...]If the tracepoints/events expand to code that exposes those private structures, then those structures are perhaps not quite so private any more. That argues for moving those headers back under
include/..., or at least those type decls made reachable from the tracepoints.
They expose them to the TRACE_EVENT output format, which then pretty-prints them. They are still as private to the module as it gets.
Quoted 3 lines · Theodore Tso
Any chance you could support something like this?
I think that's already there. I'm defining arch/x86/include/asm/paravirt-trace.h with:
#ifndef _ASM_X86_PARAVIRT_TRACE_H
#define _ASM_X86_PARAVIRT_TRACE_H
#include <linux/tracepoint.h>
#include <asm/paravirt_types.h>
#undef TRACE_SYSTEM
#define TRACE_SYSTEM pvops
#define TRACE_INCLUDE_FILE paravirt-trace
#define TRACE_INCLUDE_PATH asm
[...]
Which ends up including <asm/paravirt-trace.h>
J
Steven Rostedt
maintainerQuoted 17 lines · Jeremy Fitzhardinge
Quoted 3 lines · Theodore Tso
Any chance you could support something like this?
I think that's already there. I'm defining
arch/x86/include/asm/paravirt-trace.hwith:#ifndef
_ASM_X86_PARAVIRT_TRACE_H
#define_ASM_X86_PARAVIRT_TRACE_H#include <
linux/tracepoint.h>
#include <asm/paravirt_types.h>#undef
TRACE_SYSTEM
#defineTRACE_SYSTEMpvops
Quoted 6 lines
#define
TRACE_INCLUDE_FILEparavirt-trace
#defineTRACE_INCLUDE_PATHasm
[...]Which ends up including <
asm/paravirt-trace.h>
Not quite. It ends up looking like
#include "asm/paravirt-trace.h"
As long as there is no "asm" directory in the include/trace directory, I think that is fine.
-- Steve
Quoted 26 lines · Steven Rostedt
Quoted 23 lines · Jeremy Fitzhardinge
Quoted 4 lines · Theodore Tso
Any chance you could support something like this?
I think that's already there. I'm defining
arch/x86/include/asm/paravirt-trace.hwith:#ifndef
_ASM_X86_PARAVIRT_TRACE_H
#define_ASM_X86_PARAVIRT_TRACE_H#include <
linux/tracepoint.h>
#include <asm/paravirt_types.h>#undef
TRACE_SYSTEM
#defineTRACE_SYSTEMpvops#define
TRACE_INCLUDE_FILEparavirt-trace
#defineTRACE_INCLUDE_PATHasm
[...]
Quoted 8 lines
Quoted 2 lines
Which ends up including <
asm/paravirt-trace.h>Not quite. It ends up looking like
#include "
asm/paravirt-trace.h"As long as there is no "asm" directory in the
include/tracedirectory, I think that is fine.
OK.
I'm having a bit of trouble with paravirt-trace.h when I actually include it in paravirt.h. asm/paravirt.h is itself included in lots of places, and so its fairly easy to end up with cyclic include dependencies which are fairly painful. In this case I'm seeing asm/paravirt.h -> linux/tracepoint.h -> linux/rcupate.h -> {lots of stuff}, which gives errors like:
CC arch/x86/kernel/asm-offsets.s
In file included from /home/jeremy/git/linux/include/linux/thread_info.h:55,
from /home/jeremy/git/linux/include/linux/preempt.h:9,
from /home/jeremy/git/linux/include/linux/spinlock.h:50,
from /home/jeremy/git/linux/include/linux/rcupdate.h:37,
from /home/jeremy/git/linux/include/linux/tracepoint.h:18,
from /home/jeremy/git/linux/arch/x86/include/asm/paravirt-trace.h:4,
from /home/jeremy/git/linux/arch/x86/include/asm/paravirt.h:18,
from /home/jeremy/git/linux/arch/x86/include/asm/irqflags.h:55,
from /home/jeremy/git/linux/include/linux/irqflags.h:57,
from /home/jeremy/git/linux/arch/x86/include/asm/system.h:11,
from /home/jeremy/git/linux/arch/x86/include/asm/processor.h:17,
from /home/jeremy/git/linux/include/linux/prefetch.h:14,
from /home/jeremy/git/linux/include/linux/list.h:6,
from /home/jeremy/git/linux/include/linux/module.h:9,
from /home/jeremy/git/linux/include/linux/crypto.h:21,
from /home/jeremy/git/linux/arch/x86/kernel/asm-offsets_64.c:7,
from /home/jeremy/git/linux/arch/x86/kernel/asm-offsets.c:4:/home/jeremy/git/linux/arch/x86/include/asm/thread_info.h:34: error: expected specifier-qualifier-list before 'mm_segment_t'
I'm wondering if there's much downside in making the code __DO_TRACE() out of line so that we can make tracepoint.h have absolutely minimal include dependencies?
J
Quoted 36 lines · Jeremy Fitzhardinge
Quoted 28 lines · Steven Rostedt
Quoted 17 lines · Jeremy Fitzhardinge
Quoted 3 lines · Theodore Tso
Any chance you could support something like this?
I think that's already there. I'm defining
arch/x86/include/asm/paravirt-trace.hwith:#ifndef
_ASM_X86_PARAVIRT_TRACE_H
#define_ASM_X86_PARAVIRT_TRACE_H#include <
linux/tracepoint.h>
#include <asm/paravirt_types.h>#undef
TRACE_SYSTEM
#defineTRACE_SYSTEMpvopsQuoted 7 lines
#define
TRACE_INCLUDE_FILEparavirt-trace
#defineTRACE_INCLUDE_PATHasm
[...]Which ends up including <
asm/paravirt-trace.h>Quoted 6 lines
Not quite. It ends up looking like
#include "
asm/paravirt-trace.h"As long as there is no "asm" directory in the
include/tracedirectory, I think that is fine.
Quoted 8 lines
OK.
I'm having a bit of trouble with
paravirt-trace.hwhen I actually include it inparavirt.h.asm/paravirt.his itself included in lots of places, and so its fairly easy to end up with cyclic include dependencies which are fairly painful. In this case I'm seeingasm/paravirt.h->linux/tracepoint.h->linux/rcupate.h-> {lots of stuff}, which gives errors like:
tracepoint.h should not include any complex headers like rcupdate.h.
Quoted 3 lines
I'm wondering if there's much downside in making the code
__DO_TRACE()out of line so that we can maketracepoint.hhave absolutely minimal include dependencies?
yeah.
And besides, the rcu_read_lock_sched_notrace() there should probably be a preempt_disable_notrace() / preempt_enable_notrace() variant. (it's sligtly faster that way and we better be atomic and self-sufficient in tracepoints anyway)
Ingo
Quoted 54 lines · * Ingo Molnar ([email protected]) wrote:
Quoted 36 lines · Jeremy Fitzhardinge
Quoted 28 lines · Steven Rostedt
Quoted 17 lines · Jeremy Fitzhardinge
Quoted 3 lines · Theodore Tso
Any chance you could support something like this?
I think that's already there. I'm defining
arch/x86/include/asm/paravirt-trace.hwith:#ifndef
_ASM_X86_PARAVIRT_TRACE_H
#define_ASM_X86_PARAVIRT_TRACE_H#include <
linux/tracepoint.h>
#include <asm/paravirt_types.h>#undef
TRACE_SYSTEM
#defineTRACE_SYSTEMpvopsQuoted 7 lines
#define
TRACE_INCLUDE_FILEparavirt-trace
#defineTRACE_INCLUDE_PATHasm
[...]Which ends up including <
asm/paravirt-trace.h>Quoted 6 lines
Not quite. It ends up looking like
#include "
asm/paravirt-trace.h"As long as there is no "asm" directory in the
include/tracedirectory, I think that is fine.Quoted 8 lines
OK.
I'm having a bit of trouble with
paravirt-trace.hwhen I actually include it inparavirt.h.asm/paravirt.his itself included in lots of places, and so its fairly easy to end up with cyclic include dependencies which are fairly painful. In this case I'm seeingasm/paravirt.h->linux/tracepoint.h->linux/rcupate.h-> {lots of stuff}, which gives errors like:
tracepoint.hshould not include any complex headers likercupdate.h.Quoted 3 lines
I'm wondering if there's much downside in making the code
__DO_TRACE()out of line so that we can maketracepoint.hhave absolutely minimal include dependencies?
Quoted 7 lines
yeah.
And besides, the
rcu_read_lock_sched_notrace()there should probably be apreempt_disable_notrace()/preempt_enable_notrace()variant. (it's sligtly faster that way and we better be atomic and self-sufficient in tracepoints anyway)
Yes, rcu_read_(un)lock_sched_notrace maps directly to preempt_(en/dis)able_notrace. But for RCU verifiability's sake, I made sure to create rcu_read_lock versions of these primitives instead of simply using preempt_disable. Maybe we should simply take those low-level primitives out of rcupdate.h and put them in a simpler header?
Mathieu
Quoted 2 lines
Ingo
Signature · 2 lines
Mathieu Desnoyers OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
Quoted 10 lines · Theodore Tso
One thing which I would really like is to avoid needing to drop the header file in include/trace/<subsystem.h>.
The problem that I have with this is that for ext4, we need to access private data structures which are defined in header files in
fs/ext4/*.h--- which we moved into fs/ext4 a long time ago at the request of those who feltinclude/linux/*was getting rather cluttered, and if a subsystem had header files which were only needed by files for that particular subsystems, they should be moved out ofinclude/linux.
Same is true for XFS, or just about any other self-contained in a module subsystem I can think of. My current XFS trace events stuff includes tons of headers in the xfs header in include/trace and adds -Ifs/xfs to kernel/trace/Makefile. The latter should be gone by the new implementation compiling the tracing stubs into the module, but it's still not pretty.