Commit Graph

30 Commits

Author SHA1 Message Date
Jacek Sieka b367db1a2a
disable frame pointer omission optimization (#2189)
* disable frame pointer omission optimization

it breaks the GC

* oops
2020-12-16 14:07:48 +01:00
Ștefan Talpalaru 07ea1cd177
Revert "disableMarchNative: also disable ADX in BLST (#2175)"
This reverts commit 6cfe7de6b0.

It's useless, since "-madx" will not be enabled without "-march=native".
2020-12-11 16:51:09 +01:00
Ștefan Talpalaru 6cfe7de6b0
disableMarchNative: also disable ADX in BLST (#2175) 2020-12-11 08:16:17 +01:00
Ștefan Talpalaru 92750d5313 reduce peak memory usage during build 2020-12-10 17:17:12 +02:00
tersec 1d7fb2ed0c
remove {.inline.} pragmas (#2033)
* remove {.inline.} pragmas

* re-add inline on bitseqs functions and tweak inlining threshold

* remove macOS/LLVM inlining setting; revert non-init/module-local/tests inline pragma removal
2020-11-20 11:00:22 +01:00
Jacek Sieka ab8f8ccaba
clean up dependencies (#2008)
* clean up dependencies

* use non-prce-mode for metrics
* clean up obsolete snappy and gflags deps from manuals

* conditional pcre
2020-11-13 16:00:45 +01:00
Ștefan Talpalaru 2396417581
bump nim-libbacktrace (#1799)
so stack traces work with LTO
2020-10-27 13:09:03 +01:00
Ștefan Talpalaru f1acc0532c
merge "nim.cfg" into "config.nims" (#1820)
to reduce the number of configuration files
2020-10-07 12:02:00 +02:00
Mamy Ratsimbazafy 6f455fb8e4
Revert "ARM64 BLST hotfix - disable BLST on ARM64 (#1753)" (#1775)
This reverts commit feece1382d.
2020-09-29 14:43:32 +02:00
Mamy Ratsimbazafy 98661914f1
Revert "bump nim-libbacktrace (#1769)" (#1773)
This reverts commit de1b3315e8.
2020-09-28 22:37:18 +02:00
Ștefan Talpalaru de1b3315e8
bump nim-libbacktrace (#1769)
* bump nim-libbacktrace

so it works with LTO

* macOS fix
2020-09-28 21:23:53 +02:00
Ștefan Talpalaru ef47782e2e
config.nims: fix the fix 2020-09-26 13:19:01 +02:00
Ștefan Talpalaru fffecbc8fd
Nim define for disabling LTO (#1751) 2020-09-25 18:15:02 +02:00
Mamy Ratsimbazafy feece1382d
ARM64 BLST hotfix - disable BLST on ARM64 (#1753) 2020-09-25 18:14:07 +02:00
Jacek Sieka 1a9e9fc398
use LTO in release builds (#1661)
* use LTO in release builds

This significantly (40%) speeds up block replay and hashing - for example replaying first 1000
blocks, without/with LTO:

```
[arnetheduck@tempus ncli]$ ../env.sh nim c -d:release ncli_db
[arnetheduck@tempus ncli]$ ./ncli_db bench --db:db --network:medalla --slots:1000
Loaded 215006 blocks, head slot 307400
All time are ms
     Average,       StdDev,          Min,          Max,      Samples,         Test
Validation is turned off meaning that no BLS operations are performed
   25468.481,        0.000,    25468.481,    25468.481,            1, Initialize DB
       0.297,        0.516,        0.053,       13.645,          721, Load block from database
      26.458,        0.000,       26.458,       26.458,            1, Load state from database
      20.737,        8.288,       11.096,      199.325,          690, Apply block
     333.069,       62.798,       45.225,      429.452,           31, Apply epoch block
       0.000,        0.000,        0.000,        0.000,            0, Database block store
```

```
[arnetheduck@tempus ncli]$ ../env.sh nim c -d:release --passc:-flto --passl:-flto --stacktrace:off ncli_db
[arnetheduck@tempus ncli]$ ./ncli_db bench --db:db --network:medalla --slots:1000
Loaded 215006 blocks, head slot 307400
All time are ms
     Average,       StdDev,          Min,          Max,      Samples,         Test
Validation is turned off meaning that no BLS operations are performed
   23903.006,        0.000,    23903.006,    23903.006,            1, Initialize DB
       0.253,        0.122,        0.047,        0.731,          721, Load block from database
      24.455,        0.000,       24.455,       24.455,            1, Load state from database
      18.734,        7.062,       10.346,      167.397,          690, Apply block
     194.869,       33.175,       29.311,      226.981,           31, Apply epoch block
```

Epoch processing is heavy on both arithmetics and hash caching, both of which get a
significant boost here.

This makes sense: nim creates lots of small functions spread out over many C files. A much
worse solution is to try to annotate code with `inline` - it copies functions to multiple
C files but still doesn't do intermodule optimizations significantly limiting the
compilers' ability to reason about the code, causing bloat and misrepresenting the usefulness
of a function to the call frequency analysis that drives actual (C-compiler) inlining and many
other optimizations.

In particular, many nim functions are part of `system` or the `C` backend - stack tracing,
memory allocation etc - nim's inlining system is pretty incomplete in that it does not deal
with these and many other cases.

* windows workaround

* skip LTO on windows for now
2020-09-24 18:40:28 +02:00
Mamy Ratsimbazafy 1f5b487fc6
Github Actions CI (#1693)
* Clean up PR + bump nimbus-build-system

* pcre on 32-bit + Improve env variable handling + cache mingw

* Add badge + fix setting env variable

* Auto cancel if commit becomes outdated

* fix shell for deriving env variable

* Add more cancellation points

* Add finalization tests to Github Action

* Fix case

* change cancel actions + fixes for windows and finalization

* have to use matrix variable for cache path/key

* ARCH_OVERRIDE=LATFORM issue rebuild cache

* Update scripts - deactivate workflows with identified issues + reactivate caching

* workaround mac getopt

* Disable all aAVX512f extensions (Error: invalid register for .seh_savexmm in Cygwin)

* Fix cross compile of libminiupmp #1723

* Cache fetch-dlls to avoid being a drag on nim-lang.org

* Fix windows downloading DLLs twice and set CFLAGS env variable for Linux32

* fix silly yaml mistake

* .

* reactivate win32 after https://github.com/status-im/nim-beacon-chain/pull/1726

* Comment out minimal tests for now
2020-09-24 13:45:34 +02:00
Jacek Sieka eaea3dbc94
remove chronos future tracking from default build (#1628)
uses a lot of memory, specially during sync
2020-09-11 17:07:16 +02:00
Mamy Ratsimbazafy 454b9d0724
Bump nim-blscurve (#1491)
* Bump BLSCurve

* Use unified aggregation API

* use new blscurve with unified aggregate API

* bump

* fix toRaw

* replace state_sim combine with AggregateSignature

* Fix 32-bit

* Fix 32-bit for real and test deactivating ccache for fno-tree-lopp-vectorize flag

* change compilation switches to narrow down Linux issue

* Use -fno-tree-vectorize to disable both tree-loop-vectorize and tree-slp-vectorize

* blscurve now disables both Loop and SLP vectorization

* Add tests for the miracl/milagro fallback

* Travis has max log size of 4MB

* Test with Miracl in the finalization test

* fix state_sim log level

* Coment out the slow fallback tests
2020-08-15 19:33:58 +02:00
Ștefan Talpalaru 675eb8bff5
enable Chronos' future tracking (#1473) 2020-08-08 21:24:14 +02:00
Eugene Kabanov 19874969f0
Disable libbacktrace on Windows x64. (#1308) 2020-07-13 16:02:32 +00:00
Zahary Karadjov 4275abbefe Makefile targets for ctail and ntu 2020-06-22 17:30:04 +03:00
Zahary Karadjov 7d3160b0b5 Local sim now includes a prometheus server, a Ganache instance and a simulation dashboard server (in Tmux mode) 2020-06-22 17:30:04 +03:00
Ștefan Talpalaru e072997e97
Nim-1.2.2 2020-06-17 14:42:22 +02:00
Zahary Karadjov 76b44c73f3 Make it easier to turn off the use of libstacktrace 2020-06-11 17:40:08 +03:00
Zahary Karadjov 740b76d152 Spec-compliant implementation of Eth1 monitoring; Eth1-enabled local sim
BEWARE! This commit will trigger a stack overflow during local sim
2020-04-26 13:04:53 +03:00
Ștefan Talpalaru 3239b62904
move "--import:libbacktrace" to config.nims
This simplifies the `./env.sh nim c -r ...` scenario.
2020-03-31 14:53:41 +02:00
Ștefan Talpalaru 1276f346e0
config.nims: --define:nimTypeNames 2020-03-28 23:04:43 +01:00
Ștefan Talpalaru c2c570fcb0
bump submodules
plus a few small modifications
2020-02-26 01:14:20 +01:00
Ștefan Talpalaru ad36808b7d
Make: add USE_LIBBACKTRACE flag 2020-02-20 17:41:10 +01:00
Ștefan Talpalaru 06322385d9
lightweight stack traces
- plus some light test runner refactoring and some Makefile cosmetic changes
- compile tools with LOG_LEVEL=TRACE in CI
- bump a couple of submodules
2020-02-13 17:54:53 +01:00