You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailscale/cmd/tailscaled
Brad Fitzpatrick f1ded84454 cmd/tailscaled: add disabled debug file to force reflect for binary size experiments
This adds a file that's not compiled by default that exists just to
make it easier to do binary size checks, probing what a binary would
be like if it included reflect methods (as used by html/template, etc).

As an example, once tailscaled uses reflect.Type.MethodByName(non-const-string) anywhere,
the build jumps up by 14.5 MB:

    $ GOOS=linux GOARCH=amd64 ./tool/go build -tags=ts_include_cli,ts_omit_webclient,ts_omit_systray,ts_omit_debugeventbus -o before ./cmd/tailscaled

    $ GOOS=linux GOARCH=amd64 ./tool/go build -tags=ts_include_cli,ts_omit_webclient,ts_omit_systray,ts_omit_debugeventbus,ts_debug_forcereflect -o after ./cmd/tailscaled

    $ ls -l before after
    -rwxr-xr-x@ 1 bradfitz  staff  41011861 Sep  9 07:28 before
    -rwxr-xr-x@ 1 bradfitz  staff  55610948 Sep  9 07:29 after

This is particularly pronounced with large deps like the AWS SDK. If you compare using ts_omit_aws:

    -rwxr-xr-x@ 1 bradfitz  staff  38284771 Sep  9 07:40 no-aws-no-reflect
    -rwxr-xr-x@ 1 bradfitz  staff  45546491 Sep  9 07:41 no-aws-with-reflect

That means adding AWS to a non-reflect binary adds 2.7 MB but adding
AWS to a reflect binary adds 10 MB.

Updates #17063
Updates #12614

Change-Id: I18e9b77c9cf33565ce5bba65ac5584fa9433f7fb
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
3 months ago
..
childproc all: update copyright and license headers 3 years ago
tailscaledhooks feature/taildrop, ipn/ipnlocal: remove leftover dup calls to osshare 7 months ago
debug.go net/netmon: publish events to event bus 8 months ago
debug_forcereflect.go cmd/tailscaled: add disabled debug file to force reflect for binary size experiments 3 months ago
depaware.txt cmd/tailscale/cli, derp: use client/local instead of deprecated client/tailscale (#17061) 3 months ago
deps_test.go cmd/tailscale, ipn/ipnlocal: add ts_omit_webclient 3 months ago
generate.go cmd/mkmanifest, cmd/tailscale, cmd/tailscaled: remove Windows arm32 resources from OSS 3 years ago
install_darwin.go all: update copyright and license headers 3 years ago
install_windows.go cmd/tailscaled: add Dnscache as a service dependency 3 months ago
manifest_windows_386.syso cmd/{tailscale,tailscaled}: embed manifest into Windows binaries 3 years ago
manifest_windows_amd64.syso cmd/{tailscale,tailscaled}: embed manifest into Windows binaries 3 years ago
manifest_windows_arm64.syso cmd/{tailscale,tailscaled}: embed manifest into Windows binaries 3 years ago
proxy.go all: update copyright and license headers 3 years ago
required_version.go all: switch to and require Go 1.23 1 year ago
sigpipe.go all: adjust some build tags for plan9 2 years ago
ssh.go ssh/tailssh: add Plan 9 support for Tailscale SSH 8 months ago
tailscaled.defaults cmd/tailscaled: rename relaynode reference in defaults file comment 6 years ago
tailscaled.go util/syspolicy: finish plumbing policyclient, add feature/syspolicy, move global impl 3 months ago
tailscaled.openrc tstest/integration/vms: use an in-process logcatcher (#2360) 4 years ago
tailscaled.service cmd/tailscaled: move cleanup to an implicit action during startup 2 years ago
tailscaled_bird.go all: update copyright and license headers 3 years ago
tailscaled_notwindows.go all: update copyright and license headers 3 years ago
tailscaled_test.go control/controlclient,tempfork/httprec: don't link httptest, test certs for c2n 10 months ago
tailscaled_windows.go util/syspolicy: finish plumbing policyclient, add feature/syspolicy, move global impl 3 months ago
windows-manifest.xml cmd/{tailscale,tailscaled}: embed manifest into Windows binaries 3 years ago
with_cli.go all: update copyright and license headers 3 years ago