]> git.baikalelectronics.ru Git - kernel.git/commit
ftrace: Speed up search by skipping pages by address
authorSteven Rostedt <srostedt@redhat.com>
Wed, 25 Apr 2012 14:14:43 +0000 (10:14 -0400)
committerSteven Rostedt <rostedt@goodmis.org>
Wed, 16 May 2012 23:58:46 +0000 (19:58 -0400)
commitf6f71e63f6a21105c734322245b9fb53930a15a0
tree63695acb86c89f5617820937ed254d9638894eef
parentb7b966d5dc7b7bcbef4816bde6427435425b1b97
ftrace: Speed up search by skipping pages by address

As all records in a page of the ftrace table are sorted, we can
speed up the search algorithm by checking if the address to look for
falls in between the first and last record ip on the page.

This speeds up both the ftrace_location() and ftrace_text_reserved()
algorithms, as it can skip full pages when the search address is
not in them.

Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
kernel/trace/ftrace.c