]> git.baikalelectronics.ru Git - kernel.git/commit
ftrace: Separate hash allocation and assignment
authorSteven Rostedt <srostedt@redhat.com>
Mon, 2 May 2011 21:34:47 +0000 (17:34 -0400)
committerSteven Rostedt <rostedt@goodmis.org>
Wed, 18 May 2011 19:29:46 +0000 (15:29 -0400)
commitf0c577dc0d11b96cc7776e4c50a07aa8c6cc85ea
treed5a3f78a6aabcd33b9848d3bf86b9b53ff6ea2e0
parent1da9161316d9422730950f8fa8dca3b9b39b11f2
ftrace: Separate hash allocation and assignment

When filtering, allocate a hash to insert the function records.
After the filtering is complete, assign it to the ftrace_ops structure.

This allows the ftrace_ops structure to have a much smaller array of
hash buckets instead of wasting a lot of memory.

A read only empty_hash is created to be the minimum size that any ftrace_ops
can point to.

When a new hash is created, it has the following steps:

o Allocate a default hash.
o Walk the function records assigning the filtered records to the hash
o Allocate a new hash with the appropriate size buckets
o Move the entries from the default hash to the new hash.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/ftrace.c