Filename | /root/tor-browser-build/projects/go/build |
Statements | Executed 20916 statements in 237ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
996 | 1 | 1 | 167ms | 224s | __ANON__[:90] | Template::Document::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | # spent 224s (167ms+224) within Template::Document::__ANON__[/root/tor-browser-build/projects/go/build:90] which was called 996 times, avg 225ms/call:
# 996 times (167ms+224s) by Template::Document::process at line 163 of Template/Document.pm, avg 225ms/call | ||||
2 | 996 | 17.2ms | 1992 | 15.7s | $output .= $stash->get(['c', [ 'var/set_default_env' ]]); # spent 7.85s making 996 calls to Template::Stash::XS::get, avg 7.88ms/call
# spent 7.82s making 996 calls to RBM::__ANON__[rbm/lib/RBM.pm:640], avg 7.85ms/call |
3 | 1992 | 9.62ms | 996 | 4.79ms | $output .= "distdir=/var/tmp/dist/"; # spent 4.79ms making 996 calls to Template::Stash::XS::get, avg 5µs/call |
4 | 996 | 687µs | #line 3 "/root/tor-browser-build/projects/go/build" | ||
5 | $output .= $stash->get('project'); | ||||
6 | $output .= "\nmkdir -p /var/tmp/dist\n\n"; | ||||
7 | 996 | 531µs | #line 13 "/root/tor-browser-build/projects/go/build" | ||
8 | 996 | 534µs | if ($stash->get(['c', [ 'var/linux' ]])) { | ||
9 | $output .= "\n # Config options for hardening-wrapper\n export DEB_BUILD_HARDENING=1\n export DEB_BUILD_HARDENING_STACKPROTECTOR=1\n export DEB_BUILD_HARDENING_FORTIFY=1\n export DEB_BUILD_HARDENING_FORMAT=1\n export DEB_BUILD_HARDENING_PIE=1\n"; | ||||
10 | } | ||||
11 | |||||
12 | $output .= "\n\nmkdir -p /var/tmp/build\n\n# Building go 1.4.x\n# This is needed to bootstrap the go that we actually use\n# https://golang.org/doc/install/source#go14\ntar -C /var/tmp/build --transform='s,^go\\>,go1.4,' -xf \$rootdir/"; | ||||
13 | 996 | 15.0ms | 1992 | 5.68s | #line 20 "/root/tor-browser-build/projects/go/build" # spent 2.85s making 996 calls to Template::Stash::XS::get, avg 2.86ms/call
# spent 2.83s making 996 calls to RBM::__ANON__[rbm/lib/RBM.pm:640], avg 2.84ms/call |
14 | $output .= $stash->get(['c', [ 'input_files_by_name/go14' ]]); | ||||
15 | $output .= "\ncd /var/tmp/build/go1.4/src\n# Disable cgo to avoid conflicts with newer GCC. cgo is not needed for the bootstrap go.\n# https://github.com/golang/go/issues/13114#issuecomment-186922245\n# Disable CC etc. that are set up for cross builds.\nCGO_ENABLED=0 CC= CFLAGS= LDFLAGS= ./make.bash\nexport GOROOT_BOOTSTRAP=\"/var/tmp/build/go1.4\"\n\ncd \$rootdir\n"; | ||||
16 | #line 34 "/root/tor-browser-build/projects/go/build" | ||||
17 | 996 | 1.05ms | if (! $stash->get(['c', [ 'var/linux' ]])) { | ||
18 | $output .= "\n "; | ||||
19 | #line 30 "/root/tor-browser-build/projects/go/build" | ||||
20 | 996 | 17.4ms | 1992 | 116s | $output .= $stash->get(['pc', [ $stash->get(['c', [ 'var/compiler' ]]), 'var/setup', { 'compiler_tarfile' => $stash->get(['c', [ 'input_files_by_name/' . $stash->get(['c', [ 'var/compiler' ]]) ]]) } ]]); # spent 58.2s making 996 calls to Template::Stash::XS::get, avg 58.4ms/call
# spent 58.2s making 996 calls to RBM::__ANON__[rbm/lib/RBM.pm:640], avg 58.4ms/call |
21 | 996 | 1.28ms | $output .= "\n # http://golang.org/doc/install/source#environment\n export GOOS="; | ||
22 | #line 32 "/root/tor-browser-build/projects/go/build" | ||||
23 | $output .= $stash->get(['c', [ 'var/GOOS' ]]); | ||||
24 | $output .= "\n export GOARCH="; | ||||
25 | #line 33 "/root/tor-browser-build/projects/go/build" | ||||
26 | $output .= $stash->get(['c', [ 'var/GOARCH' ]]); | ||||
27 | $output .= "\n"; | ||||
28 | } | ||||
29 | |||||
30 | $output .= "\n\n# Building go\n# http://golang.org/doc/install/source#environment\ntar -C /var/tmp/dist -xf \$rootdir/"; | ||||
31 | #line 38 "/root/tor-browser-build/projects/go/build" | ||||
32 | $output .= $stash->get(['c', [ 'input_files_by_name/go' ]]); | ||||
33 | $output .= "\nexport GOROOT=\"\$distdir\"\ncd /var/tmp/dist/go/src\n"; | ||||
34 | 996 | 28.6ms | 1992 | 66.3ms | #line 74 "/root/tor-browser-build/projects/go/build" # spent 37.1ms making 996 calls to Template::Stash::XS::get, avg 37µs/call
# spent 29.1ms making 996 calls to RBM::__ANON__[rbm/lib/RBM.pm:640], avg 29µs/call |
35 | if ($stash->get(['c', [ 'var/linux' ]])) { | ||||
36 | $output .= " ./make.bash\n"; | ||||
37 | 996 | 4.95ms | } | ||
38 | 996 | 21.5ms | 1992 | 117s | elsif ($stash->get(['c', [ 'var/osx' ]])) { # spent 58.4s making 996 calls to Template::Stash::XS::get, avg 58.6ms/call
# spent 58.3s making 996 calls to RBM::__ANON__[rbm/lib/RBM.pm:640], avg 58.6ms/call |
39 | 996 | 548µs | $output .= " unset LDFLAGS\n rm -Rf \$clangdir/helpers\n export CC=\"\$clangdir/bin/clang "; | ||
40 | #line 46 "/root/tor-browser-build/projects/go/build" | ||||
41 | $output .= $stash->get(['c', [ 'var/FLAGS' ]]); | ||||
42 | $output .= "\"\n # Create a cc-for-target script that closes over CC, CFLAGS, and LDFLAGS.\n # Go's CC_FOR_TARGET only allows a command name, not a command with arguments.\n # https://github.com/golang/go/issues/15457\n CC_FOR_TARGET=\"\$(pwd)/cc-for-target\"\n echo \"#!/bin/sh\" > \"\$CC_FOR_TARGET\"\n echo \"exec \$CC \$CFLAGS \$LDFLAGS \\\"\\\$\@\\\"\" >> \"\$CC_FOR_TARGET\"\n chmod +x \"\$CC_FOR_TARGET\"\n # faketime is needed because clang 3.9.1 on Darwin embeds the timestamps of\n # certain intermediate object files (including those that arise here while\n # compiling the Go runtime itself). Without this, variable timestamps would\n # end up in snowflake-client.\n # https://github.com/golang/go/issues/9206#issuecomment-310476743\n CGO_ENABLED=1 CC_FOR_TARGET=\"\$CC_FOR_TARGET\" CC= CFLAGS= LDFLAGS= "; | ||||
43 | #line 59 "/root/tor-browser-build/projects/go/build" | ||||
44 | $output .= $stash->get(['c', [ 'var/faketime' ]]); | ||||
45 | $output .= " ./make.bash\n"; | ||||
46 | } | ||||
47 | elsif ($stash->get(['c', [ 'var/windows' ]])) { | ||||
48 | $output .= " # Create a cc-for-target script that closes over CC, CFLAGS, and LDFLAGS.\n # Go's CC_FOR_TARGET only allows a command name, not a command with arguments.\n # https://github.com/golang/go/issues/15457\n CC_FOR_TARGET=\"\$(pwd)/cc-for-target\"\n echo \"#!/bin/sh\" > \"\$CC_FOR_TARGET\"\n echo \"exec "; | ||||
49 | #line 66 "/root/tor-browser-build/projects/go/build" | ||||
50 | $output .= $stash->get(['c', [ 'arch' ]]); | ||||
51 | $output .= "-w64-mingw32-gcc "; | ||||
52 | #line 66 "/root/tor-browser-build/projects/go/build" | ||||
53 | $output .= $stash->get(['c', [ 'var/CFLAGS' ]]); | ||||
54 | $output .= " "; | ||||
55 | #line 66 "/root/tor-browser-build/projects/go/build" | ||||
56 | $output .= $stash->get(['c', [ 'var/LDFLAGS' ]]); | ||||
57 | $output .= " \\\"\\\$\@\\\"\" >> \"\$CC_FOR_TARGET\"\n chmod +x \"\$CC_FOR_TARGET\"\n CGO_ENABLED=1 CC_FOR_TARGET=\"\$CC_FOR_TARGET\" CC= CFLAGS= LDFLAGS= ./make.bash\n"; | ||||
58 | } | ||||
59 | elsif ($stash->get(['c', [ 'var/android' ]])) { | ||||
60 | $output .= " patch -p2 < \$rootdir/0001-Use-fixed-go-build-tmp-directory.patch\n # Obfs4 breaks on Android Q without this patch, see: #32303\n patch -p2 < \$rootdir/90a3ce02dc25adcf1598faf11a66b151ada3f637.patch\n CGO_ENABLED=1 CC_FOR_TARGET="; | ||||
61 | #line 73 "/root/tor-browser-build/projects/go/build" | ||||
62 | $output .= $stash->get(['c', [ 'var/CC' ]]); | ||||
63 | $output .= " CGO_CFLAGS='-D__ANDROID_API__="; | ||||
64 | #line 73 "/root/tor-browser-build/projects/go/build" | ||||
65 | $output .= $stash->get(['c', [ 'var/android_min_api' ]]); | ||||
66 | $output .= "' CC= CFLAGS= LDFLAGS= ./make.bash\n"; | ||||
67 | } | ||||
68 | |||||
69 | $output .= "\n# This directory is non-reproducible and doesn't exist in official Go releases,\n# so remove it to preserve reproducibility of the output.\nrm -rf /var/tmp/dist/go/pkg/obj/go-build/\n\ncd /var/tmp/dist\n"; | ||||
70 | #line 81 "/root/tor-browser-build/projects/go/build" | ||||
71 | $output .= $stash->get(['c', [ 'tar', { 'tar_src' => [ $stash->get('project') ], 'tar_args' => '-czf ' . $stash->get('dest_dir') . '/' . $stash->get(['c', [ 'filename' ]]) } ]]); | ||||
72 | $output .= "\n"; | ||||
73 | } }; | ||||
74 | 996 | 13.5ms | 1992 | 51.8ms | if ($@) { # spent 30.5ms making 996 calls to Template::Stash::XS::get, avg 31µs/call
# spent 21.3ms making 996 calls to RBM::__ANON__[rbm/lib/RBM.pm:640], avg 21µs/call |
75 | $_tt_error = $context->catch($@, \$output); | ||||
76 | die $_tt_error unless $_tt_error->type eq 'return'; | ||||
77 | 996 | 5.69ms | } | ||
78 | |||||
79 | return $output; | ||||
80 | } | ||||
81 | 996 | 75.3ms | 5976 | 192s | # spent 96.2s making 3984 calls to Template::Stash::XS::get, avg 24.2ms/call
# spent 96.2s making 1992 calls to RBM::__ANON__[rbm/lib/RBM.pm:640], avg 48.3ms/call |
82 | 996 | 1.51ms | |||
- - | |||||
84 | 996 | 608µs | |||
- - | |||||
89 | 996 | 11.8ms | |||
- - | |||||
91 | 996 | 9.95ms |