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

Introducing 'debugging' and 'profiling' options in sonic build-infra #1782

Merged
merged 3 commits into from
Jun 19, 2018

Commits on Jun 11, 2018

  1. Introducing 'debugging' and 'profiling' options in sonic build-infra

    With these changes, user can now specify how debian packages will be built in regards to the presence of symbols and compiler-optimizations. I'm simply relying on DEB_BUILD_OPTIONS flags as indicated here: https://www.debian.org/doc/debian-policy/#debian-rules-and-deb-build-options
    
    By default we will continue to build packages as is the case today.
    
    Example after compilation with debugging OFF
    ============================================
    
    rmolina@server04:~/wsp_gitli_Apr_30_2018/sonic-buildimage$ #find src/ -type f -executable -exec file '{}' \; | egrep "executable,.* stripped" > ~/executable_stripped_files_before.txt
    
    rmolina@server04:~/wsp_gitli_Jun_2_2018/sonic-buildimage$ egrep "src\/sonic-*" ~/executable_stripped_files_before.txt | egrep ", stripped"
    src/sonic-swss/debian/swss/usr/bin/swssconfig: ELF 64-bit LSB  executable, x86-64, version 1 (GNU/Linux), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=38a4858d3c9c479e89b0ec4a4d8acbf6f19795c7, stripped
    src/sonic-swss/debian/swss/usr/bin/orchagent: ELF 64-bit LSB  executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=33c611d547817f786942685f8495654b680cfe66, stripped
    src/sonic-swss/debian/swss/usr/bin/teamsyncd: ELF 64-bit LSB  executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=696f44f38f3c2e7acd88acdc51220f210c72ae99, stripped
    src/sonic-swss/debian/swss/usr/bin/neighsyncd: ELF 64-bit LSB  executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=d9bf4097548830a795488db9dbe26dbf4f0e194b, stripped
    src/sonic-swss/debian/swss/usr/bin/intfmgrd: ELF 64-bit LSB  executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=09ef06341bc7748d62ad926479373726a191acf0, stripped
    src/sonic-swss/debian/swss/usr/bin/swssplayer: ELF 64-bit LSB  executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=685c29e90bf4a080ca104da3f11ee4bc8e21dbc1, stripped
    src/sonic-swss/debian/swss/usr/bin/portsyncd: ELF 64-bit LSB  executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=5089a919e03fb842e10e23ef4be77d4add215e32, stripped
    src/sonic-swss/debian/swss/usr/bin/fpmsyncd: ELF 64-bit LSB  executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=4cb4cdebda61921c3367584e965bb5d230466b42, stripped
    src/sonic-swss/debian/swss/usr/bin/routeresync: ELF 64-bit LSB  executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=5a161cfa375e0bba789068e7c661e160b18b8615, stripped
    src/sonic-swss/debian/swss/usr/bin/vlanmgrd: ELF 64-bit LSB  executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=a4c0b8b6ee8984da6827aa15fc305257ca868326, stripped
    src/sonic-swss/debian/swss/usr/bin/buffermgrd: ELF 64-bit LSB  executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=607d8d2cef930ccf89d649c895000c09dda59139, stripped
    src/sonic-swss/debian/swss/usr/bin/intfsyncd: ELF 64-bit LSB  executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=08d323095731fdae0667dd9b155090ecf8ef4804, stripped
    src/sonic-linux-kernel/linux-3.16.51/debian/build/build_amd64_none_amd64/arch/x86/boot/compressed/vmlinux.bin: ELF 64-bit LSB  executable, x86-64, version 1 (SYSV), statically linked, BuildID[sha1]=613f30030d61a0b7e46f6631c76489533ffe5d81, stripped
    src/sonic-sairedis/debian/syncd-rpc/usr/bin/syncd: ELF 64-bit LSB  executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=05b889a134292f7f200352ec90742c72414c880a, stripped
    src/sonic-sairedis/debian/syncd-rpc/usr/bin/syncd_request_shutdown: ELF 64-bit LSB  executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=aa6dd0376c90c8c9fd4da8ba55c464d0bae4e102, stripped
    src/sonic-sairedis/debian/syncd-rpc/usr/bin/saiplayer: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=174554fd3857460d09e3207d65b792f786367c93, stripped
    src/sonic-sairedis/debian/syncd-rpc/usr/bin/saidump: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=36588b3870e7b579fba99101433c397a8f32cd9f, stripped
    src/sonic-sairedis/debian/syncd-rpc/usr/bin/saisdkdump: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=4eaa3369298343a69729228f7aa81a1b6e9c2843, stripped
    src/sonic-swss-common/debian/libswsscommon/usr/bin/swssloglevel: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=82aeca06ad2c54384fd98ce79c6c98d12f7bfec9, stripped
    
    Example after compilation with debugging ON
    ============================================
    
    rmolina@server04:~/wsp_gitli_Jun_2_2018/sonic-buildimage$ find src/ -type f -executable -exec file '{}' \; | egrep "executable,.* stripped" > ~/executable_stripped_files_after.txt
    
    rmolina@server04:~/wsp_gitli_Jun_2_2018/sonic-buildimage$ egrep "src\/sonic-*" ~/executable_stripped_files_after.txt | egrep ", stripped"
    src/sonic-linux-kernel/linux-3.16.51/debian/build/build_amd64_none_amd64/arch/x86/boot/compressed/vmlinux.bin: ELF 64-bit LSB  executable, x86-64, version 1 (SYSV), statically linked,
    Rodny Molina committed Jun 11, 2018
    Configuration menu
    Copy the full SHA
    d37d0da View commit details
    Browse the repository at this point in the history

Commits on Jun 18, 2018

  1. Addressing review comments.

    Just to double-check, I went ahead and activated the new SONIC_INSTALL_DEBUG_TOOLS option (which replaces old SONIC_CONFIG_DEBUG one), and built a new image to verify that everything is working fine (debugging tools are being added to all dockers).
    Rodny Molina committed Jun 18, 2018
    Configuration menu
    Copy the full SHA
    5173b2a View commit details
    Browse the repository at this point in the history
  2. Addressing minor comment.

    Rodny Molina committed Jun 18, 2018
    Configuration menu
    Copy the full SHA
    28493ba View commit details
    Browse the repository at this point in the history