[Bug runtime/12781] New: task_finder __stp_utrace_task_finder_target_syscall_entry code a bit fat

fche at redhat dot com sourceware-bugzilla@sourceware.org
Wed May 18 19:04:00 GMT 2011


http://sourceware.org/bugzilla/show_bug.cgi?id=12781

           Summary: task_finder
                    __stp_utrace_task_finder_target_syscall_entry code a
                    bit fat
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: runtime
        AssignedTo: systemtap@sourceware.org
        ReportedBy: fche@redhat.com


>From http://pastebin.com/rVPh7w5V, the code sequence for testing the
syscall number for one of the interesting ones (mmap et al.) is rather
wordy.  The list of syscall numbers should be precomputed or inlined
so that not so many test_ti_thread_flag calls are necessary.



#
        if (syscall_no != MMAP_SYSCALL_NO(tsk)
#
    51cb:       83 f8 01                cmp    $0x1,%eax
#
    51ce:       48 19 c0                sbb    %rax,%rax
#
    51d1:       48 83 e0 af             and    $0xffffffffffffffaf,%rax
#
    51d5:       48 83 c0 5a             add    $0x5a,%rax
#
    51d9:       49 39 c4                cmp    %rax,%r12
#
    51dc:       74 66                   je     5244
<__stp_utrace_task_finder_target_syscall_entry+0xd9>
#
    51de:       48 8b 7b 08             mov    0x8(%rbx),%rdi
#
    51e2:       be 11 00 00 00          mov    $0x11,%esi
#
    51e7:       e8 3e c2 ff ff          callq  142a <test_ti_thread_flag>
#
            && syscall_no != MMAP2_SYSCALL_NO(tsk)
#
    51ec:       83 f8 01                cmp    $0x1,%eax
#
    51ef:       48 19 c0                sbb    %rax,%rax
#
    51f2:       0c c0                   or     $0xc0,%al
#
    51f4:       49 39 c4                cmp    %rax,%r12
#
    51f7:       74 4b                   je     5244
<__stp_utrace_task_finder_target_syscall_entry+0xd9>
#
    51f9:       48 8b 7b 08             mov    0x8(%rbx),%rdi
#
    51fd:       be 11 00 00 00          mov    $0x11,%esi
#
    5202:       e8 23 c2 ff ff          callq  142a <test_ti_thread_flag>
#
            && syscall_no != MPROTECT_SYSCALL_NO(tsk)
#
    5207:       83 f8 01                cmp    $0x1,%eax
#
    520a:       48 19 c0                sbb    %rax,%rax
#
    520d:       48 83 e0 8d             and    $0xffffffffffffff8d,%rax
#
    5211:       48 83 c0 7d             add    $0x7d,%rax
#
    5215:       49 39 c4                cmp    %rax,%r12
#
    5218:       74 2a                   je     5244
<__stp_utrace_task_finder_target_syscall_entry+0xd9>
#
    521a:       48 8b 7b 08             mov    0x8(%rbx),%rdi
#
    521e:       be 11 00 00 00          mov    $0x11,%esi
#
    5223:       e8 02 c2 ff ff          callq  142a <test_ti_thread_flag>
#

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the Systemtap mailing list