You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "James Peach (JIRA)" <ji...@apache.org> on 2017/12/20 02:19:00 UTC
[jira] [Comment Edited] (MESOS-8348) Enable function sections in
the build.
[ https://issues.apache.org/jira/browse/MESOS-8348?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16297792#comment-16297792 ]
James Peach edited comment on MESOS-8348 at 12/20/17 2:18 AM:
--------------------------------------------------------------
Tested on a 4CPU/8G VM, building without cache, {{GTEST_FILTER="" time make -j2 check}}.
Without any settings:
{noformat}
11517.45user 1028.58system 1:51:31elapsed 187%CPU (0avgtext+0avgdata 4823956maxresident)k
8710392inputs+83178080outputs (10126major+275942791minor)pagefaults 0swaps
{noformat}
With CXXFLAGS={{\-ffunction-sections \-fdata-sections}} and LDFLAGS={{\-Wl,\--gc-sections}}:
{noformat}
9962.13user 893.62system 1:35:17elapsed 189%CPU (0avgtext+0avgdata 3923732maxresident)k
1994920inputs+38351264outputs (3577major+239138696minor)pagefaults 0swaps
{noformat}
The build time is improved, and the final linked objects are significantly smaller:
|| Artifact || Normal || GC sections ||
| src/.libs/libmesos-1.5.0.so | 766M | 274M|
| src/mesos-agent | 6.5M | 1.6M|
| src/mesos-cni-port-mapper | 1.8M | 65K|
| src/mesos-containerizer | 2.7M | 477K|
| src/mesos-default-executor | 13M | 4.6M|
| src/mesos-docker-executor | 9.6M | 3.6M|
| src/mesos-execute | 7.5M | 2.6M|
| src/mesos-executor | 7.5M | 2.6M|
| src/mesos-fetcher | 6.1M | 1.9M|
| src/mesos-io-switchboard | 3.7M | 874K|
| src/mesos-local | 4.8M | 1.4M|
| src/mesos-log | 1.8M | 348K|
| src/mesos-logrotate-logger | 4.7M | 1.6M|
| src/mesos-master | 6.3M | 1.6M|
| src/mesos-network-helper | 4.2M | 1.2M|
| src/mesos-resolve | 2.7M | 642K|
| src/mesos-tcp-connect | 2.3M | 630K|
| src/mesos-tests | 557M | 89M|
| src/mesos-usage | 3.0M | 955K|
was (Author: jamespeach):
Tested on a 4CPU/8G VM, building without cache, {{GTEST_FILTER="" time make -j2 check}}.
Without any settings:
{noformat}
11517.45user 1028.58system 1:51:31elapsed 187%CPU (0avgtext+0avgdata 4823956maxresident)k
8710392inputs+83178080outputs (10126major+275942791minor)pagefaults 0swaps
{noformat}
With CXXFLAGS={{-ffunction-sections -fdata-sections}} and LDFLAGS={{-Wl,--gc-sections}}:
{noformat}
9962.13user 893.62system 1:35:17elapsed 189%CPU (0avgtext+0avgdata 3923732maxresident)k
1994920inputs+38351264outputs (3577major+239138696minor)pagefaults 0swaps
{noformat}
The build time is improved, and the final linked objects are significantly smaller:
|| Artifact || Normal || GC sections ||
| src/.libs/libmesos-1.5.0.so | 766M | 274M|
| src/mesos-agent | 6.5M | 1.6M|
| src/mesos-cni-port-mapper | 1.8M | 65K|
| src/mesos-containerizer | 2.7M | 477K|
| src/mesos-default-executor | 13M | 4.6M|
| src/mesos-docker-executor | 9.6M | 3.6M|
| src/mesos-execute | 7.5M | 2.6M|
| src/mesos-executor | 7.5M | 2.6M|
| src/mesos-fetcher | 6.1M | 1.9M|
| src/mesos-io-switchboard | 3.7M | 874K|
| src/mesos-local | 4.8M | 1.4M|
| src/mesos-log | 1.8M | 348K|
| src/mesos-logrotate-logger | 4.7M | 1.6M|
| src/mesos-master | 6.3M | 1.6M|
| src/mesos-network-helper | 4.2M | 1.2M|
| src/mesos-resolve | 2.7M | 642K|
| src/mesos-tcp-connect | 2.3M | 630K|
| src/mesos-tests | 557M | 89M|
| src/mesos-usage | 3.0M | 955K|
> Enable function sections in the build.
> --------------------------------------
>
> Key: MESOS-8348
> URL: https://issues.apache.org/jira/browse/MESOS-8348
> Project: Mesos
> Issue Type: Bug
> Components: build
> Reporter: James Peach
> Assignee: James Peach
>
> Enable {{-ffunction-sections}} to improve the ability of the toolchain to remove unused code.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)