← Index
NYTProf Performance Profile   « line view »
For rbm/rbm
  Run on Wed Feb 12 03:38:15 2020
Reported on Wed Feb 12 04:56:37 2020

Filename/root/tor-browser-build/projects/go/build
StatementsExecuted 20916 statements in 237ms
Subroutines
Calls P F Exclusive
Time
Inclusive
Time
Subroutine
99611167ms224sTemplate::Document::::__ANON__[:90]Template::Document::__ANON__[:90]
Call graph for these subroutines as a Graphviz dot language file.
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
299617.2ms199215.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
319929.62ms9964.79ms$output .= "distdir=/var/tmp/dist/";
# spent 4.79ms making 996 calls to Template::Stash::XS::get, avg 5µs/call
4996687µs#line 3 "/root/tor-browser-build/projects/go/build"
5$output .= $stash->get('project');
6$output .= "\nmkdir -p /var/tmp/dist\n\n";
7996531µs#line 13 "/root/tor-browser-build/projects/go/build"
8996534µsif ($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/";
1399615.0ms19925.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"
179961.05msif (! $stash->get(['c', [ 'var/linux' ]])) {
18$output .= "\n ";
19#line 30 "/root/tor-browser-build/projects/go/build"
2099617.4ms1992116s$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
219961.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";
3499628.6ms199266.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
35if ($stash->get(['c', [ 'var/linux' ]])) {
36$output .= " ./make.bash\n";
379964.95ms}
3899621.5ms1992117selsif ($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
39996548µ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}
47elsif ($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}
59elsif ($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 } };
7499613.5ms199251.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';
779965.69ms }
78
79 return $output;
80}
8199675.3ms5976192s
# 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
829961.51ms
- -
84996608µs
- -
8999611.8ms
- -
919969.95ms