Re: [RFC 3/3] tracing: set_ftrace_filter support

From: Steven Rostedt
Date: Fri Apr 29 2011 - 11:16:38 EST


On Fri, 2011-04-29 at 16:43 +0200, Jiri Olsa wrote:
> diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h
> index b12f5df..9ce3484 100644
> --- a/include/linux/ftrace.h
> +++ b/include/linux/ftrace.h
> @@ -164,6 +164,9 @@ struct dyn_ftrace {
> unsigned long flags;
> struct dyn_ftrace *newlist;
> };
> + unsigned long filter;
> + unsigned long no_trace;
> + unsigned long addr;
> struct dyn_arch_ftrace arch;
> };
>

Big Fricken NACK!

Absolutely not! The dyn_ftrace structure is allocated for almost every
single function in the kernel. Any function that can be traced has this
structure allocated.

On my box I have:

# cat /debug/tracing/dyn_ftrace_total_info
32605 0 0

That's 32,605 functions that can be traced, which turns to be 32,605
dyn_ftrace structs allocated. Now this number is after all modules have
been loaded. You added 3 longs, on 64 bit boxes that's 24 bytes, you
just increased the function tracer footprint by 782,520 bytes!

I'm working around not touching that structure, and I will continue to
NAK any changes that increases its size. Actually, I did touch that
structure, but I did not increase the size of it.

-- Steve



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/