From: Ingo Molnar Date: Thu, 27 Nov 2008 09:56:13 +0000 (+0100) Subject: Merge branches 'tracing/blktrace', 'tracing/ftrace', 'tracing/function-graph-tracer... X-Git-Url: http://git.mmlx.us/?a=commitdiff_plain;h=c7cc77307669336a08928ab8668bdb3f3bcc021b;p=linux-edison.git Merge branches 'tracing/blktrace', 'tracing/ftrace', 'tracing/function-graph-tracer' and 'tracing/power-tracer' into tracing/core --- c7cc77307669336a08928ab8668bdb3f3bcc021b diff --cc include/linux/ftrace.h index 7854d87b97b,7854d87b97b,f9792c0d73f,0df28866620..afba918c623 --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h @@@@@ -311,12 -311,12 -316,19 -311,41 +316,48 @@@@@ 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. */ -- -struct ftrace_retfunc { -- - unsigned long ret; /* Return address */ ++ +struct ftrace_graph_ret { unsigned long func; /* Current function */ unsigned long long calltime; unsigned long long rettime; diff --cc kernel/trace/Makefile index cef4bcb4e82,cef4bcb4e82,08c5fe6ddc0,acaa06553ec..62dc561b667 --- a/kernel/trace/Makefile +++ b/kernel/trace/Makefile @@@@@ -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 diff --cc kernel/trace/trace.h index 3abd645e8af,3abd645e8af,7adacf349ef,4c453778a6a..f96f4e787ff --- a/kernel/trace/trace.h +++ b/kernel/trace/trace.h @@@@@ -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)