Merge branches 'tracing/blktrace', 'tracing/ftrace', 'tracing/function-graph-tracer...
authorIngo Molnar <mingo@elte.hu>
Thu, 27 Nov 2008 09:56:13 +0000 (10:56 +0100)
committerIngo Molnar <mingo@elte.hu>
Thu, 27 Nov 2008 09:56:13 +0000 (10:56 +0100)
1  2  3  4 
include/linux/ftrace.h
kernel/trace/Kconfig
kernel/trace/Makefile
kernel/trace/trace.h

@@@@@ -311,7 -311,7 -316,15 -311,36 +316,44 @@@@@ ftrace_init_module(struct module *mod
                   unsigned long *start, unsigned long *end) { }
    #endif
    
+++ enum {
+++     POWER_NONE = 0,
+++     POWER_CSTATE = 1,
+++     POWER_PSTATE = 2,
+++ };
+++ 
+++ struct power_trace {
+++ #ifdef CONFIG_POWER_TRACER
+++     ktime_t                 stamp;
+++     ktime_t                 end;
+++     int                     type;
+++     int                     state;
+++ #endif
+++ };
+++ 
+++ #ifdef CONFIG_POWER_TRACER
+++ extern void trace_power_start(struct power_trace *it, unsigned int type,
+++                                     unsigned int state);
+++ extern void trace_power_mark(struct power_trace *it, unsigned int type,
+++                                     unsigned int state);
+++ extern void trace_power_end(struct power_trace *it);
+++ #else
+++ static inline void trace_power_start(struct power_trace *it, unsigned int type,
+++                                     unsigned int state) { }
+++ static inline void trace_power_mark(struct power_trace *it, unsigned int type,
+++                                     unsigned int state) { }
+++ static inline void trace_power_end(struct power_trace *it) { }
+++ #endif
+++ 
++  
++ +/*
++ + * Structure that defines an entry function trace.
++ + */
++ +struct ftrace_graph_ent {
++ +    unsigned long func; /* Current function */
++ +    int depth;
++ +};
   +
    /*
     * Structure that defines a return function trace.
     */
Simple merge
@@@@@ -29,8 -29,8 -29,8 -29,9 +29,9 @@@@@ obj-$(CONFIG_NOP_TRACER) += trace_nop.
    obj-$(CONFIG_STACK_TRACER) += trace_stack.o
    obj-$(CONFIG_MMIOTRACE) += trace_mmiotrace.o
    obj-$(CONFIG_BOOT_TRACER) += trace_boot.o
-- -obj-$(CONFIG_FUNCTION_RET_TRACER) += trace_functions_return.o
++ +obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += trace_functions_graph.o
    obj-$(CONFIG_TRACE_BRANCH_PROFILING) += trace_branch.o
    obj-$(CONFIG_BTS_TRACER) += trace_bts.o
+++ obj-$(CONFIG_POWER_TRACER) += trace_power.o
    
    libftrace-y := ftrace.o
@@@@@ -25,9 -25,9 -25,10 -25,10 +25,11 @@@@@ enum trace_type 
        TRACE_BRANCH,
        TRACE_BOOT_CALL,
        TRACE_BOOT_RET,
-- -    TRACE_FN_RET,
++ +    TRACE_GRAPH_RET,
++ +    TRACE_GRAPH_ENT,
        TRACE_USER_STACK,
        TRACE_BTS,
+++     TRACE_POWER,
    
        __TRACE_LAST_TYPE
    };
@@@@@ -264,8 -264,8 -267,11 -270,9 +273,12 @@@@@ extern void __ftrace_bad_type(void)
                IF_ASSIGN(var, ent, struct trace_boot_call, TRACE_BOOT_CALL);\
                IF_ASSIGN(var, ent, struct trace_boot_ret, TRACE_BOOT_RET);\
                IF_ASSIGN(var, ent, struct trace_branch, TRACE_BRANCH); \
-- -            IF_ASSIGN(var, ent, struct ftrace_ret_entry, TRACE_FN_RET);\
++ +            IF_ASSIGN(var, ent, struct ftrace_graph_ent_entry,      \
++ +                      TRACE_GRAPH_ENT);             \
++ +            IF_ASSIGN(var, ent, struct ftrace_graph_ret_entry,      \
++ +                      TRACE_GRAPH_RET);             \
                IF_ASSIGN(var, ent, struct bts_entry, TRACE_BTS);\
+++             IF_ASSIGN(var, ent, struct trace_power, TRACE_POWER); \
                __ftrace_bad_type();                                    \
        } while (0)