knz / go-binsize-viz

Size visualization of Go executables using D3
GNU Affero General Public License v3.0
470 stars 30 forks source link

Unknown sym formats on macOS / Go 1.13 #8

Closed fgm closed 3 months ago

fgm commented 5 years ago

On macOS Mojave, Go 1.13, when using tab2pydic, I get thousands of errors for unknown formats, like these, selecting only a few from each error type:

unknown B sym format: _runtime/cgo(__DATA/__bss)
unknown B sym format: golang.org/long long/net/html.ErrBufferExceeded
unknown D sym format: _runtime/cgo(__DATA/__data)
unknown D sym format: golang.org/long long/net/html..gobytes.1
unknown R sym format: _crypto/x509(__TEXT/__const)
unknown R sym format: _crypto/x509(__TEXT/__cstring)
unknown R sym format: _runtime/cgo(__TEXT/__const)
unknown R sym format: _runtime/cgo(__TEXT/__cstring)
unknown R sym format: go.func.*
unknown R sym format: go.itab.*bufio.Writer,golang.org/long long/net/html.writer
unknown T sym format: _crypto/x509(__TEXT/__text)
unknown T sym format: _runtime/cgo(__TEXT/__text)
unknown T sym format: golang.org/long long/net/html.(*Node).AppendChild
unknown format:            16781312 U _CFArrayGetCount
unknown format:            16781312 U _CFArrayGetValueAtIndex

The tool seems to work nonetheless, but I wonder whether the results are correct, given all these errors.

BorisKozo commented 4 years ago

I am getting the same errors too on Go 1.13.5 on Windows

knz commented 2 years ago

This is made to work on linux

knz commented 3 months ago

we've improved this in the last version, feel free to try it out

fgm commented 3 months ago

Thanks. There is still a similar quantity of warnings, but one does get some results in the end. Without the names until one clicks on a square, and with a big "unknown" chunk, but at least some info appears

The warnings are mostly like this:

unknown B sym format: _runtime/cgo(__DATA/__bss)
unknown D sym format: _runtime/cgo(__DATA/__common)
unknown R sym format: _runtime/cgo(__TEXT/__const)
unknown R sym format: _type:*
unknown R sym format: crypto/ecdh..dict.nistCurve[*crypto/internal/nistec.P256Point] (tons of those)
unknown T sym format: _go:buildid
unknown T sym format: _runtime/cgo(__TEXT/__text)
unknown T sym format: crypto/ecdsa.hashToNat[go.shape.*uint8] (tons of those)
unknown format:          4294971392 U _CFArrayAppendValue (appears to be darwin-specific)
unknown format:          4294971392 U _ptrace (appears to be standard syscalls)

(FWIW: 4294971392 is actually 2^32 - 2^12)

When first displayed:

Capture d’écran 2024-06-05 à 09 31 55

After clicking:

Capture d’écran 2024-06-05 à 09 34 43