Filename | /root/tor-browser-build/projects/go/build |
Statements | Executed 20916 statements in 229ms |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
996 | 1 | 1 | 153ms | 226s | __ANON__[:90] | Template::Document::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | # spent 226s (153ms+226) within Template::Document::__ANON__[/root/tor-browser-build/projects/go/build:90] which was called 996 times, avg 227ms/call:
# 996 times (153ms+226s) by Template::Document::process at line 163 of Template/Document.pm, avg 227ms/call | ||||
2 | 996 | 16.6ms | 1992 | 15.3s | $output .= $stash->get(['c', [ 'var/set_default_env' ]]); # spent 7.66s making 996 calls to Template::Stash::XS::get, avg 7.69ms/call
# spent 7.65s making 996 calls to RBM::__ANON__[rbm/lib/RBM.pm:652], avg 7.68ms/call |
3 | 1992 | 16.3ms | 996 | 4.81ms | $output .= "distdir=/var/tmp/dist/"; # spent 4.81ms making 996 calls to Template::Stash::XS::get, avg 5µs/call |
4 | 996 | 874µ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 | 523µs | #line 13 "/root/tor-browser-build/projects/go/build" | ||
8 | 996 | 617µ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 | 14.5ms | 1992 | 5.34s | #line 20 "/root/tor-browser-build/projects/go/build" # spent 2.67s making 996 calls to Template::Stash::XS::get, avg 2.68ms/call
# spent 2.66s making 996 calls to RBM::__ANON__[rbm/lib/RBM.pm:652], avg 2.67ms/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.14ms | if (! $stash->get(['c', [ 'var/linux' ]])) { | ||
18 | $output .= "\n "; | ||||
19 | #line 30 "/root/tor-browser-build/projects/go/build" | ||||
20 | 996 | 19.4ms | 1992 | 113s | $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 56.5s making 996 calls to Template::Stash::XS::get, avg 56.8ms/call
# spent 56.5s making 996 calls to RBM::__ANON__[rbm/lib/RBM.pm:652], avg 56.7ms/call |
21 | 996 | 1.22ms | $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 | 14.2ms | 1992 | 47.7ms | #line 74 "/root/tor-browser-build/projects/go/build" # spent 27.9ms making 996 calls to Template::Stash::XS::get, avg 28µs/call
# spent 19.8ms making 996 calls to RBM::__ANON__[rbm/lib/RBM.pm:652], avg 20µs/call |
35 | if ($stash->get(['c', [ 'var/linux' ]])) { | ||||
36 | $output .= " ./make.bash\n"; | ||||
37 | 996 | 4.69ms | } | ||
38 | 996 | 14.2ms | 1992 | 113s | elsif ($stash->get(['c', [ 'var/osx' ]])) { # spent 56.6s making 996 calls to Template::Stash::XS::get, avg 56.9ms/call
# spent 56.6s making 996 calls to RBM::__ANON__[rbm/lib/RBM.pm:652], avg 56.9ms/call |
39 | 996 | 566µ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 | 21.1ms | 1992 | 64.6ms | if ($@) { # spent 36.4ms making 996 calls to Template::Stash::XS::get, avg 37µs/call
# spent 28.2ms making 996 calls to RBM::__ANON__[rbm/lib/RBM.pm:652], avg 28µs/call |
75 | $_tt_error = $context->catch($@, \$output); | ||||
76 | die $_tt_error unless $_tt_error->type eq 'return'; | ||||
77 | 996 | 5.63ms | } | ||
78 | |||||
79 | return $output; | ||||
80 | } | ||||
81 | 996 | 66.9ms | 5976 | 205s | # spent 103s making 3984 calls to Template::Stash::XS::get, avg 25.8ms/call
# spent 103s making 1992 calls to RBM::__ANON__[rbm/lib/RBM.pm:652], avg 51.5ms/call |
82 | 996 | 1.51ms | |||
- - | |||||
84 | 996 | 734µs | |||
- - | |||||
89 | 996 | 18.4ms | |||
- - | |||||
91 | 996 | 10.2ms |