https://sourceware.org/bugzilla/show_bug.cgi?id=16886

            Bug ID: 16886
           Summary: setjmp/longjmp in libopcodes would be faster as
                    sigsetjmp w/ save=0
           Product: binutils
           Version: 2.24
            Status: NEW
          Severity: normal
          Priority: P2
         Component: binutils
          Assignee: unassigned at sourceware dot org
          Reporter: rsc at swtch dot com

Created attachment 7568
  --> https://sourceware.org/bugzilla/attachment.cgi?id=7568&action=edit
sample input for objdump

Running objdump -d -z on a large x86 ELF executable on OS X, I find that it
makes many sigaltstack and sigprocmask calls. These are caused by the use of
setjmp/longjmp inside the i386 disassembler, although the pattern is repeated
on other architectures.

The longjmp is not being made out of a signal handler, so it appears that it
would be safe to use sigsetjmp(x, 0) and siglongjmp, avoiding those system
calls.

Command: x86_64-linux-elf-objdump -d -z test.elf >/dev/null
Time Before: 4.78u 0.41s 5.20r
Time After: 4.25u 0.00s 4.26r 

I hacked up the comparison using #defines. I will leave a real fix to you.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

_______________________________________________
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils

Reply via email to