From: Steven Rostedt Date: Sat, 17 Dec 2011 00:27:42 +0000 (-0500) Subject: ftrace: Use bsearch to find record ip X-Git-Tag: v3.3-rc1~51^2~11^2~9 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5855fead9cc358adebd6bdeec202d040c623ae38;p=pandora-kernel.git ftrace: Use bsearch to find record ip Now that each set of pages in the function list are sorted by ip, we can use bsearch to find a record within each set of pages. This speeds up the ftrace_location() function by magnitudes. For archs (like x86) that need to add a breakpoint at every function that will be converted from a nop to a callback and vice versa, the breakpoint callback needs to know if the breakpoint was for ftrace or not. It requires finding the breakpoint ip within the records. Doing a linear search is extremely inefficient. It is a must to be able to do a fast binary search to find these locations. Signed-off-by: Steven Rostedt --- Reading git-diff-tree failed