Skip to content

Commit

Permalink
ftrace: Separate hash allocation and assignment
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Steven Rostedt authored and Steven Rostedt committed May 18, 2011
1 parent f45948e commit 33dc9b1
Showing 1 changed file with 233 additions and 42 deletions.
Loading

0 comments on commit 33dc9b1

Please sign in to comment.