Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display total build-time #221

Closed
dileks opened this issue Jan 22, 2023 · 6 comments · Fixed by #222
Closed

Display total build-time #221

dileks opened this issue Jan 22, 2023 · 6 comments · Fixed by #222

Comments

@dileks
Copy link
Contributor

dileks commented Jan 22, 2023

After I have built a stage1-only LLVM-15.0.7 toolchain, I did a ThinLTO + PGO optimized (for Linux v6.2-rc4 x86_64-defconfig).

Is it possible to create a timestamp before and after the build to have a total build-time?

Here the durations for the single stages, kernel and tests:

$ egrep '== Building|LLVM build duration:|Testing Time|real' archives/dileks-llvm-toolchain-15.0.7-5-g2c432a3d6ea8-thinlto_pgo_optimized-KCFI/log_tc-build.txt 
522:== Building LLVM stage 1 ==
4425:LLVM build duration: 0:12:41 <--- Rebuild from ccache (stage1-only: LLVM build duration: 4:09:08)
4742:== Building LLVM stage 2 ==
8321:LLVM build duration: 3:11:17
8324:== Building PGO profiles ==
8339:== Building kernels (6.2.0-rc4) ==
8357:real       66m53.470s
8676:== Building LLVM stage 3 ==
12445:Testing Time: 139.26s
12473:Testing Time: 828.88s
12479:LLVM build duration: 11:58:59

Counting together should be approx. 16h30m.

Total time matches:

$ cat start-build.txt dileks     17856   17853  0 21:52 pts/1    00:00:00 python3 ./build-llvm.py --no-update --build-type Release -p clang;lld -t X86;BPF --clang-vendor dileks -B /home/dileks/src/llvm/build -I /opt/llvm --check-targets clang lld --lto thin --pgo kernel-defconfig -L /home/dileks/src/linux/git -D LLVM_PARALLEL_LINK_JOBS=1 --show-build-commands

$ ls -alth /opt/llvm/ | head -3
insgesamt 36K
drwxr-xr-x 2 dileks dileks 4,0K 21. Jan 14:27 bin
-rw-r--r-- 1 dileks dileks    2 21. Jan 14:27 gitignore

Thanks.

nathanchance added a commit to nathanchance/tc-build that referenced this issue Jan 22, 2023
@nathanchance
Copy link
Member

Sure, try out #222.

@dileks
Copy link
Contributor Author

dileks commented Jan 22, 2023

Thanks for the quick patch!

I have a marathon-session of approx. 24 hours with building LLVM-15.0.7 toolchain + Linux-6.2-rc5, so today not really in the mood to do any more builds.
I simply trust you.

Hmm, can I use it to check/see the total build-time of binutils-2.40?
build-binutils.py handles this, don't think so.

nathanchance added a commit to nathanchance/tc-build that referenced this issue Jan 22, 2023
@nathanchance
Copy link
Member

Hmm, can I use it to check/see the total build-time of binutils-2.40?

I have updated the pull request to include this as well, does not make sense to do it for one and not the other.

nathanchance added a commit to nathanchance/tc-build that referenced this issue Jan 22, 2023
@dileks
Copy link
Contributor Author

dileks commented Jan 23, 2023

I applied your patch from [1].

Running:

dileks@iniza:~/src/llvm/git$ LANG=C LC_ALL=C ./build-binutils.py -t x86_64-linux-gnu

========================================
== Building x86_64-linux-gnu binutils ==
========================================
...
/home/dileks/src/llvm/git/binutils-2.40/missing: 81: makeinfo: not found
WARNING: 'makeinfo' is missing on your system.
         You should only need it if you modified a '.texi' file, or
         any other file indirectly affecting the aspect of the manual.
         You might want to install the Texinfo package:
         <http://www.gnu.org/software/texinfo/>
         The spurious makeinfo call might also be the consequence of
         using a buggy 'make' (AIX, DU, IRIX), in which case you might
         want to install GNU make:
         <http://www.gnu.org/software/make/>
make[2]: *** [Makefile:1795: doc/bfd.info] Error 127
make[1]: *** [Makefile:1955: info-recursive] Error 1
make: *** [Makefile:3076: all-bfd] Error 2
make: *** Waiting for unfinished jobs....

Installing makeinfo means install texinfo Debian package.

root# apt-get install -t unstable --no-install-recommends texinfo -y

+ii  libtext-unidecode-perl  1.30-3
+ii  tex-common              6.18
+ii  texinfo                 6.8-6+b1

Total packages size: 1.950 kB

XXX: Wishes: --no-docs option

With this fixed - again a build-error:

Traceback (most recent call last):
  File "/home/dileks/src/llvm/git/./build-binutils.py", line 376, in <module>
    main()
  File "/home/dileks/src/llvm/git/./build-binutils.py", line 372, in main
    print(f"\nTotal script duration: {utils.get_duration(script_start)}")
                                      ^^^^^^^^^^^^^^^^^^
AttributeError: module 'utils' has no attribute 'get_duration'

Anything I missed to install - python-whatever-ships-utils.get_duration Debian package?

[1] https://github.com/nathanchance/tc-build/commit/1a2705cffe4b41302fd5b3ad210e23f5531037ef.patch
[2] https://packages.debian.org/search?suite=default&section=all&arch=any&searchon=contents&keywords=makeinfo

@nathanchance
Copy link
Member

XXX: Wishes: --no-docs option

Please file another issue and I can take a look at it.

Anything I missed to install - python-whatever-ships-utils.get_duration Debian package?

That is provided by the parent commit of that change. Please pull the entire request:

git pull origin pull/222/head

@dileks
Copy link
Contributor Author

dileks commented Jan 23, 2023

Aaargh...

LGTM:

Total script duration: 4m 11s

New issue: build-binutils.py: Do not build texinfo docs
#223

STRK-ND pushed a commit to Rombuilding-X00TD/tc-build that referenced this issue Feb 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants