diff options
author | Oleg Nesterov <[email protected]> | 2012-07-29 20:22:40 +0200 |
---|---|---|
committer | Ingo Molnar <[email protected]> | 2012-07-30 11:27:23 +0200 |
commit | 891c39708144bbe401b4aa151bffd0fe41b1dafd (patch) | |
tree | 4d49f2169a6f1e7051fd1b88a8a0fbe612a9224e /tools/perf/util/scripting-engines/trace-event-python.c | |
parent | 89133786f9408d53361874a8c784fff150fc7f7c (diff) |
uprobes: Teach build_probe_list() to consider the range
Currently build_probe_list() builds the list of all uprobes
attached to the given inode, and the caller should filter out
those who don't fall into the [start,end) range, this is
sub-optimal.
This patch turns find_least_offset_node() into
find_node_in_range() which returns the first node inside the
[min,max] range, and changes build_probe_list() to use this node
as a starting point for rb_prev() and rb_next() to find all
other nodes the caller needs. The resulting list is no longer
sorted but we do not care.
This can speed up both build_probe_list() and the callers, but
there is another reason to introduce find_node_in_range(). It
can be used to figure out whether the given vma has uprobes or
not, this will be needed soon.
While at it, shift INIT_LIST_HEAD(tmp_list) into
build_probe_list().
Signed-off-by: Oleg Nesterov <[email protected]>
Acked-by: Srikar Dronamraju <srikar.vnet.ibm.com>
Cc: Anton Arapov <[email protected]>
Cc: Srikar Dronamraju <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions