aboutsummaryrefslogtreecommitdiff
path: root/arch/m32r/oprofile
diff options
context:
space:
mode:
authorCliff Wickman <cpw@sgi.com>2005-10-27 10:29:08 -0500
committerTony Luck <tony.luck@intel.com>2005-10-27 16:15:03 -0700
commit4ac0068f44f192f2de95a7bb36df3e19767a45fb (patch)
tree7971afe201d63657fceeb5770eb8247711ce69aa /arch/m32r/oprofile
parent72ab373a5688a78cbdaf3bf96012e597d5399bb7 (diff)
[IA64] ptrace - find memory sharers on children list
In arch/ia64/kernel/ptrace.c there is a test for a peek or poke of a register image (in register backing storage). The test can be unnecessarily long (and occurs while holding the tasklist_lock). Especially long on a large system with thousands of active tasks. The ptrace caller (presumably a debugger) specifies the pid of its target and an address to peek or poke. But the debugger could be attached to several tasks. The idea of find_thread_for_addr() is to find whether the target address is in the RBS for any of those tasks. Currently it searches the thread-list of the target pid. If that search does not find a match, and the shared mm-struct's user count indicates that there are other tasks sharing this address space (a rare occurrence), a search is made of all the tasks in the system. Another approach can drastically shorten this procedure. It depends upon the fact that in order to peek or poke from/to any task, the debugger must first attach to that task. And when it does, the attached task is made a child of the debugger (is chained to its children list). Therefore we can search just the debugger's children list. Signed-off-by: Cliff Wickman <cpw@sgi.com> Signed-off-by: Tony Luck <tony.luck@intel.com>
Diffstat (limited to 'arch/m32r/oprofile')
0 files changed, 0 insertions, 0 deletions