1
0
mirror of https://github.com/ilyakooo0/urbit.git synced 2024-12-15 01:52:42 +03:00
urbit/nix/nixcrpkgs/pkgs
Philip Monk 2713083386
libsigsegv: disable stack vma check
This patches libsigsegv to not check the stack vma on Linux, since that
involves reading procfs, and we make very heavy use of sigsegv.  This
eliminates most of urbit's performance discrepancy between Linux and
MacOS.  These are the benchmarks used; note this is a local MBP vs a
cloud Linux server, and the MBP is almost certainly faster hardware.

We take two benchmarks, one of which decrements 10 million times and the
other simply allocates 125MB of memory.  These are the results:

cpu-heavy ==  =/ n 10.000.000 |-(?~(n n $(n (dec n))))
mem-heavy == =a (bex 1.000.000.008)

macos, cpu-heavy: 6 seconds
macos, mem-heavy: 1 second

linux-before, cpu-heavy: 30 seconds
linux-before, mem-heavy: 160 seconds

linux-after, cpu-heavy 9 seconds
linux-after, mem-heavy 1.3 seconds

This represents a 3x speedup for the cpu-heavy operation and a 120x
speedup for the memory-heavy operation.

This check was used to try to distinguish stack overflow from other
forms of segmentation fault.  In the comments in src/handler-unix.c, it
describes three heuristics it uses, depending on what's available from
the OS.  In the linux-i386 case, all three are availble, so we simply
disable the slow one.  This correctly recognizes stack overflow if you
simply alloca(10000000000).
2020-06-26 11:15:01 -07:00
..
angle Finish cc-release cross-compilation. () 2019-04-23 19:50:38 -07:00
at-spi2-headers Finish cc-release cross-compilation. () 2019-04-23 19:50:38 -07:00
avrdude Finish cc-release cross-compilation. () 2019-04-23 19:50:38 -07:00
curl enables TLS in curl cross-compilation derivation 2019-07-11 15:58:52 -07:00
dejavu-fonts Finish cc-release cross-compilation. () 2019-04-23 19:50:38 -07:00
devcon Finish cc-release cross-compilation. () 2019-04-23 19:50:38 -07:00
expat Finish cc-release cross-compilation. () 2019-04-23 19:50:38 -07:00
fixesproto Finish cc-release cross-compilation. () 2019-04-23 19:50:38 -07:00
gdb Finish cc-release cross-compilation. () 2019-04-23 19:50:38 -07:00
hello Finish cc-release cross-compilation. () 2019-04-23 19:50:38 -07:00
hello_cpp Finish cc-release cross-compilation. () 2019-04-23 19:50:38 -07:00
inputproto Finish cc-release cross-compilation. () 2019-04-23 19:50:38 -07:00
ion Finish cc-release cross-compilation. () 2019-04-23 19:50:38 -07:00
kbproto Finish cc-release cross-compilation. () 2019-04-23 19:50:38 -07:00
libgmp Finish cc-release cross-compilation. () 2019-04-23 19:50:38 -07:00
libsigsegv libsigsegv: disable stack vma check 2020-06-26 11:15:01 -07:00
libudev Finish cc-release cross-compilation. () 2019-04-23 19:50:38 -07:00
libusb Finish cc-release cross-compilation. () 2019-04-23 19:50:38 -07:00
libusbp Finish cc-release cross-compilation. () 2019-04-23 19:50:38 -07:00
libx11 Finish cc-release cross-compilation. () 2019-04-23 19:50:38 -07:00
libxall Finish cc-release cross-compilation. () 2019-04-23 19:50:38 -07:00
libxau Finish cc-release cross-compilation. () 2019-04-23 19:50:38 -07:00
libxcb Finish cc-release cross-compilation. () 2019-04-23 19:50:38 -07:00
libxext Finish cc-release cross-compilation. () 2019-04-23 19:50:38 -07:00
libxfixes Finish cc-release cross-compilation. () 2019-04-23 19:50:38 -07:00
libxi Finish cc-release cross-compilation. () 2019-04-23 19:50:38 -07:00
lmdb Get cross-compilation ready for release. () 2019-05-02 13:13:48 -07:00
ncurses Finish cc-release cross-compilation. () 2019-04-23 19:50:38 -07:00
openocd Finish cc-release cross-compilation. () 2019-04-23 19:50:38 -07:00
openssl Finish cc-release cross-compilation. () 2019-04-23 19:50:38 -07:00
p-load Finish cc-release cross-compilation. () 2019-04-23 19:50:38 -07:00
pavr2 Finish cc-release cross-compilation. () 2019-04-23 19:50:38 -07:00
pdcurses Finish cc-release cross-compilation. () 2019-04-23 19:50:38 -07:00
qt Finish cc-release cross-compilation. () 2019-04-23 19:50:38 -07:00
readline Finish cc-release cross-compilation. () 2019-04-23 19:50:38 -07:00
tic Finish cc-release cross-compilation. () 2019-04-23 19:50:38 -07:00
usbview Finish cc-release cross-compilation. () 2019-04-23 19:50:38 -07:00
xcb-proto Finish cc-release cross-compilation. () 2019-04-23 19:50:38 -07:00
xcb-util Finish cc-release cross-compilation. () 2019-04-23 19:50:38 -07:00
xcb-util-image Finish cc-release cross-compilation. () 2019-04-23 19:50:38 -07:00
xcb-util-keysyms Finish cc-release cross-compilation. () 2019-04-23 19:50:38 -07:00
xcb-util-renderutil Finish cc-release cross-compilation. () 2019-04-23 19:50:38 -07:00
xcb-util-wm Finish cc-release cross-compilation. () 2019-04-23 19:50:38 -07:00
xextproto Finish cc-release cross-compilation. () 2019-04-23 19:50:38 -07:00
xorg-macros Finish cc-release cross-compilation. () 2019-04-23 19:50:38 -07:00
xproto Finish cc-release cross-compilation. () 2019-04-23 19:50:38 -07:00
xtrans Finish cc-release cross-compilation. () 2019-04-23 19:50:38 -07:00
zlib Finish cc-release cross-compilation. () 2019-04-23 19:50:38 -07:00