vere/pkg/noun
barter-simsum 50d602ef8b
add -flto=thin to mac aarch64 build cflags for ez 10% gain (#469)
Adds somewhere between 5-10% improvement to wall time.

I've ran all tests, booted several fakeships and comets with this
installed, and all seems to work properly.

Mac x86 is coming, I just don't have access to an intel mac right now
[but soon...].
Linux will come later once I figure out some bugs.

The following is time to boot a fakeship from a brass pill:
```
Without LTO:
________________________________________________________
Executed in  180.46 secs    fish           external
usr time   17.83 secs    0.10 millis   17.83 secs
sys time    0.23 secs    1.86 millis    0.23 secs


With LTO:
________________________________________________________
Executed in  164.87 secs    fish           external
usr time   15.65 secs    0.12 millis   15.65 secs
sys time    0.19 secs    1.94 millis    0.19 secs
```
180/164 -> 1.09

---

~barter-simsum

## Brass pill boot:

x86 linux without lto: ~140s
x86 linux with    lto: ~128s

~ 8.6% improvement - note we may be able to squeeze a bit more out if we
can
apply `-flto` to all dependencies and not just urbit binaries. This is
currently
an issue for x86 linux though due to some weird uninvestigated behavior
with
libsigsegv

## For those curious, the following hints at what was inlined

```
readelf -s ./bazel-bin/pkg/vere/urbit | grep lto_priv
  1233: 000000000042d0f0   361 FUNC    LOCAL  DEFAULT    2 _rebalance.lto_priv.1
  1237: 000000000042d6c0   435 FUNC    LOCAL  DEFAULT    2 _rebalance.lto_priv.0
 13002: 0000000000d24a00   200 OBJECT  GLOBAL HIDDEN    14 u3_Signal.lto_priv.0
 13358: 0000000000d36de0     8 OBJECT  GLOBAL HIDDEN    14 sec_u.lto_priv.0
 13429: 0000000000d24ae0    80 OBJECT  GLOBAL HIDDEN    14 u3V.lto_priv.0
 13785: 00000000004516e0   110 FUNC    GLOBAL HIDDEN     2 _tap_in.lto_priv.0
 14094: 0000000000d3aeb0     4 OBJECT  GLOBAL HIDDEN    14 sag_w.lto_priv.0
 14100: 0000000000469af0   971 FUNC    GLOBAL HIDDEN     2 _lord_stop.lto_priv.0
 14120: 00000000004581f0   393 FUNC    GLOBAL HIDDEN     2 _cj_nail.lto_priv.0
 14178: 0000000000456a30   450 FUNC    GLOBAL HIDDEN     2 _cj_fine.lto_priv.0
 14732: 0000000000463eb0    82 FUNC    GLOBAL HIDDEN     2 _box_free.lto_priv.0
 14849: 000000000044a320   658 FUNC    GLOBAL HIDDEN     2 _n_find.lto_priv.0
 15325: 0000000000478dd0  1487 FUNC    GLOBAL HIDDEN     2 _pier_init.lto_priv.0
 15413: 00000000004674a0   939 FUNC    GLOBAL HIDDEN     2 _ca_willoc.lto_priv.0
 15841: 0000000000477300   394 FUNC    GLOBAL HIDDEN     2 _dawn_fail.lto_priv.0
 16128: 00000000004449d0  1746 FUNC    GLOBAL HIDDEN     2 _cr_sing.lto_priv.0
 16214: 0000000000474c40   500 FUNC    GLOBAL HIDDEN     2 _ttyf_loja.lto_priv.0
 16277: 000000000078fe48     8 OBJECT  GLOBAL HIDDEN     5 ver_hos_c.lto_priv.0
 16887: 0000000000443ab0   460 FUNC    GLOBAL HIDDEN     2 _n_bam.lto_priv.0
 17346: 000000000045cc90   540 FUNC    GLOBAL HIDDEN     2 _cj_minx.lto_priv.0
 17897: 0000000000d249e8     8 OBJECT  GLOBAL HIDDEN    14 _file_u.lto_priv.0
 18325: 00000000004447a0    58 FUNC    GLOBAL HIDDEN     2 _n_feb.lto_priv.0
 18517: 00000000004453e0  3981 FUNC    GLOBAL HIDDEN     2 _n_comp.lto_priv.0
 18739: 0000000000d249f6     1 OBJECT  GLOBAL HIDDEN    14 _ct_lop_o.lto_priv.0
 18880: 000000000044fda0  1650 FUNC    GLOBAL HIDDEN     2 _find_home.lto_priv.0
 19091: 0000000000474e40   500 FUNC    GLOBAL HIDDEN     2 _ttyf_hija.lto_priv.0
 19508: 0000000000450420  1393 FUNC    GLOBAL HIDDEN     2 _pave_home.lto_priv.0
 19595: 000000000042a3d0   687 FUNC    GLOBAL HIDDEN     2 _in_uni.lto_priv.0
 19822: 0000000000430e20  1095 FUNC    GLOBAL HIDDEN     2 _block_rip.lto_priv.0
 20236: 0000000000457030   331 FUNC    GLOBAL HIDDEN     2 _cj_axis.lto_priv.0
 20306: 0000000000457180   514 FUNC    GLOBAL HIDDEN     2 _cj_gust.lto_priv.0
 20866: 0000000000456c00   667 FUNC    GLOBAL HIDDEN     2 _cj_cast.lto_priv.0
 21317: 0000000000446fe0 11412 FUNC    GLOBAL HIDDEN     2 _n_burn.lto_priv.0
 21430: 000000000045c820  1130 FUNC    GLOBAL HIDDEN     2 _cj_spot.lto_priv.0
```
2023-07-18 11:59:43 -04:00
..
jets jets: mint -> moot 2023-06-20 15:27:09 -07:00
platform bazel-based continuous integration flow (#21) 2023-01-09 14:44:23 -05:00
allocate.c Merge branch 'master' into jb/moar-replay-2 2023-05-15 20:37:38 -04:00
allocate.h Merge branch 'master' into jb/moar-replay-2 2023-05-15 20:37:38 -04:00
BUILD.bazel Refactor the way arguments are passed in bazel, add -flto 2023-06-27 11:03:15 -04:00
error.h Move u3_assert() from pkg/c3 to pkg/noun 2023-04-25 11:33:57 -04:00
events.c u3: fix bug in guard page placement calculation (using post instead of page) 2023-06-30 11:04:51 -04:00
events.h u3: adds u3m/u3e_toss, refactors madv_dontneed calls 2023-06-20 17:37:33 -04:00
hashtable_tests.c Rename c3_assert() as u3_assert() 2023-04-25 11:32:21 -04:00
hashtable.c Rename c3_assert() as u3_assert() 2023-04-25 11:32:21 -04:00
hashtable.h loom migration to support compressed pointers 2023-02-28 12:07:37 -05:00
imprison.c Rename c3_assert() as u3_assert() 2023-04-25 11:32:21 -04:00
imprison.h Build with bazel on linux-arm64 (#16) 2023-01-09 13:46:53 -05:00
jets_tests.c u3: adds %uv/%uw printing 2023-02-13 12:31:18 -05:00
jets.c Rename c3_assert() as u3_assert() 2023-04-25 11:32:21 -04:00
jets.h Build with bazel on linux-x86_64 (#10) 2023-01-09 13:46:48 -05:00
log.c vere: remove trailing newlines from u3l_log calls 2023-01-10 21:38:00 +01:00
log.h Build with bazel on linux-x86_64 (#10) 2023-01-09 13:46:48 -05:00
manage.c Revert "TMP: adds printf for previous bogus assertion" 2023-06-30 12:05:18 -04:00
manage.h u3: adds u3m/u3e_toss, refactors madv_dontneed calls 2023-06-20 17:37:33 -04:00
nock_tests.c tests: use u3m_boot_lite() instead of manual init 2023-05-10 15:23:57 -04:00
nock.c Rename c3_assert() as u3_assert() 2023-04-25 11:32:21 -04:00
nock.h Build with bazel on linux-x86_64 (#10) 2023-01-09 13:46:48 -05:00
noun.h Merge tag 'vere-v2.3' into jb/demand 2023-05-09 19:51:44 -04:00
options.c Build with bazel on linux-x86_64 (#10) 2023-01-09 13:46:48 -05:00
options.h vere: adds option to "toss" ephemeral pages after every event 2023-06-20 17:38:28 -04:00
retrieve_tests.c Build with bazel on linux-x86_64 (#10) 2023-01-09 13:46:48 -05:00
retrieve.c Rename c3_assert() as u3_assert() 2023-04-25 11:32:21 -04:00
retrieve.h Build with bazel on linux-arm64 (#16) 2023-01-09 13:46:53 -05:00
serial_tests.c tests: use u3m_boot_lite() instead of manual init 2023-05-10 15:23:57 -04:00
serial.c u3: c3_assert -> u3_assert, missed in merge 2023-05-01 14:15:26 -04:00
serial.h u3: adds %uv/%uw printing 2023-02-13 12:31:18 -05:00
trace.c Rename c3_assert() as u3_assert() 2023-04-25 11:32:21 -04:00
trace.h events.h: fix u3t_trace_open() prototype to remove build warning 2023-06-02 12:00:38 -04:00
types.h Build with bazel on linux-x86_64 (#10) 2023-01-09 13:46:48 -05:00
urth.c u3: documents pack/meld return 2023-06-12 13:57:12 -04:00
urth.h u3: documents pack/meld return 2023-06-12 13:57:12 -04:00
version.h cenums are dumb 2023-02-28 12:07:37 -05:00
vortex.c play: refactors implementation to allow earlier mug checks 2023-06-12 16:14:44 -04:00
vortex.h play: refactors implementation to allow earlier mug checks 2023-06-12 16:14:44 -04:00
xtract.c Build with bazel on linux-x86_64 (#10) 2023-01-09 13:46:48 -05:00
xtract.h Rename c3_assert() as u3_assert() 2023-04-25 11:32:21 -04:00
zave.c Build with bazel on linux-x86_64 (#10) 2023-01-09 13:46:48 -05:00
zave.h Build with bazel on linux-x86_64 (#10) 2023-01-09 13:46:48 -05:00