Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge develop to soon #513

Merged
merged 63 commits into from
Sep 8, 2023
Merged

Merge develop to soon #513

merged 63 commits into from
Sep 8, 2023

Conversation

pkova
Copy link
Collaborator

@pkova pkova commented Sep 8, 2023

No description provided.

mopfel-winrux and others added 28 commits June 16, 2023 12:45
This is a PR to include a new vane called `%lick`. This vane allows
`%gall` agents to open an IPC communication port on urth. This port
speaks in jammed nouns of the form `[=mark =noun]`


The vane has three parts:

1. urbit/urbit modifications: urbit/urbit#6519
2. urbit/vere modifications: This PR
3. userspace example: https://github.com/mopfel-winrux/lick-agent
This adds a macro "vere_library" which supports our concepts of debug and
release builds, and gives finer-grained control over which copts/linkopts are
passed and when.

Takes advantage of bazel's "compilation_mode={dbg,opt}" to control
debug/optimized builds.
Old format: `/vere/~.2.10-9fac623`, new format `/vere/[once, live, soon,
edge]/~.2.10-9fac623`.
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
```
Tested working with a fakezod.
`zlib` 1.3 was [released on August 18, 2023](http://zlib.net/). Fixes
recent CI failures as well.
Otherwise devenv fails to work on newer NixOS'es, looks like because
th glibc is too old.
Otherwise devenv fails to work on newer NixOS'es, looks like because the
glibc is too old
@pkova pkova requested a review from a team as a code owner September 8, 2023 16:05
@pkova pkova merged commit 99aab22 into release Sep 8, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants