mirror of https://github.com/tinygo-org/tinygo.git
Tree:
ffeff55706
add-nrfjprog-settings
alpine-static-3
ardnew-usb-common
atsame5x-adc
avr-compiler-rt
avr-gc-precise
aykevl-llvmfix-perf
bdwgc
bitcode-path
block-reading-of-uart-and-usb
boardsimu
build-llvm-image
build-ssa-in-jobs
builder-parallel
builder-real-thinlto
builder-rwmutex
cgo-noescape
cgo-stdint-alias
ch32v003
ci-macos-arm64
cortexm-optimize-HardFault
debug-flag
dependabot/go_modules/golang.org/x/net-0.23.0
dev
device
device-files
dkegel-gc-leaking-noinline
esp32-i2c
espnet
fault-handler
feature/hifive-spi-improvement
file-embed
fix-docker-llvm-build
fix-flash-eraseblock
fix-heap2stack-alignment
fix-samd21-sdi
flash-bounds-api
gc-precise
gen-device-svd
get-default-port
goasm3
i2c-freq-constants
i2c-mimxrt1062
i386-baremetal
improve-msd-flash
interface-type-assert-table
interp-max-depth
interrupts-gba
llvm19
machine-explicit-pins
machine-pinmodes
machinecheck
make-smoketest-faster-make-j
makefile-fix-node-check
mips
nix-buildid
parallel-test
pkgpath-dont-redefine
pr3119
print-all-errors
pybd-sf2
race-debug
race-impossible-stacktrace
readme-update-windows
reflect-AssignableTo
reflect-chan-runtime-mstats
reflect-map-keyflag
release
renesas-repo
revert-1574-floatsat
rp2040-spi-fix-baud
rp2350-add
scheduler-main
serial-none-noop-read
shadowstack
simplify-clang-detect
slog
smoketest-with-go-script
smoketest-with-go-script-org
smoketest-with-go-script-org2
spi-dma
spi-txn-atsamd51
test-new-packages
test-other-architectures
testing-bench-cleanup
tmp-teensy40
tools-svd-parallel
unix-signal
usb-common-samd51-iad
usb-refactor-01-rp2040
vscode
wasip1-no-json
wasm-extension
wasm-js-syscall
wasm-legacy
wasm-malloc-track
wasm-multi-value
wasm-no-malloc
wasm-recover
v0.1
v0.10.0
v0.11.0
v0.12.0
v0.13.0
v0.13.1
v0.14.0
v0.14.1
v0.15.0
v0.16.0
v0.17.0
v0.18.0
v0.19.0
v0.2.0
v0.20.0
v0.21.0
v0.22.0
v0.23.0
v0.24.0
v0.25.0
v0.25.0-beta1
v0.26.0
v0.27.0
v0.28.0
v0.28.1
v0.29.0
v0.3.0
v0.30.0
v0.31.0
v0.31.1
v0.31.2
v0.32.0
v0.33.0
v0.4.0
v0.4.1
v0.5.0
v0.6.0
v0.7.0
v0.7.1
v0.8.0
v0.9.0
${ noResults }
4 Commits (ffeff5570692c019c734e3ca28db85bc48430f7f)
Author | SHA1 | Message | Date |
---|---|---|---|
Ayke van Laethem | fcedf0beaa |
stacksize: deal with DW_CFA_advance_loc1
In some cases this operation is emitted. It appears to be emitted when a switch is lowered to a jump table in the ARM backend. |
4 years ago |
Ayke van Laethem | a21a039ac7 |
arm: automatically determine stack sizes
This is a big change that will determine the stack size for many goroutines automatically. Functions that aren't recursive and don't call function pointers can in many cases have an automatically determined worst case stack size. This is useful, as the stack size is usually much lower than the previous hardcoded default of 1024 bytes: somewhere around 200-500 bytes is common. A side effect of this change is that the default stack sizes (including the stack size for other architectures such as AVR) can now be changed in the config JSON file, making it tunable per application. |
4 years ago |
Ayke van Laethem | 50a677e9b7 |
arm: use CFI directives for stack usage
Call Frame Information is stored in the .debug_frame section and is used by debuggers for unwinding. For assembly, this information is not known. Debuggers will normally use heuristics to figure out the parent function in the absence of call frame information. This usually works fine, but is not enough for determining stack sizes. Instead, I hardcoded the stack size information in stacksize/stacksize.go, which is somewhat fragile. This change uses CFI assembly directives to store this information instead of hardcoding it. This change also fixes the following error message that would appear in GDB: Backtrace stopped: previous frame identical to this frame (corrupt stack?) More information on CFI: * https://sourceware.org/binutils/docs/as/CFI-directives.html * https://www.imperialviolet.org/2017/01/18/cfi.html |
4 years ago |
Ayke van Laethem | d606315515 |
builder: try to determine stack size information at compile time
For now, this is just an extra flag that can be used to print stack frame information, but this is intended to provide a way to determine stack sizes for goroutines at compile time in many cases. Stack sizes are often somewhere around 350 bytes so are in fact not all that big usually. Once this can be determined at compile time in many cases, it is possible to use this information when available and as a result increase the fallback stack size if the size cannot be determined at compile time. This should reduce stack overflows while at the same time reducing RAM consumption in many cases. Interesting output for testdata/channel.go: function stack usage (in bytes) Reset_Handler 332 .Lcommand-line-arguments.fastreceiver 220 .Lcommand-line-arguments.fastsender 192 .Lcommand-line-arguments.iterator 192 .Lcommand-line-arguments.main$1 184 .Lcommand-line-arguments.main$2 200 .Lcommand-line-arguments.main$3 200 .Lcommand-line-arguments.main$4 328 .Lcommand-line-arguments.receive 176 .Lcommand-line-arguments.selectDeadlock 72 .Lcommand-line-arguments.selectNoOp 72 .Lcommand-line-arguments.send 184 .Lcommand-line-arguments.sendComplex 192 .Lcommand-line-arguments.sender 192 .Lruntime.run$1 548 This shows that the stack size (if these numbers are correct) can in fact be determined automatically in many cases, especially for small goroutines. One of the great things about Go is lightweight goroutines, and reducing stack sizes is very important to make goroutines lightweight on microcontrollers. |
4 years ago |