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

src: add missing 'inline' keywords #6056

Merged
merged 1 commit into from
Apr 5, 2016
Merged

Conversation

bnoordhuis
Copy link
Member

Pull Request check-list

  • Does make -j8 test (UNIX) or vcbuild test nosign (Windows) pass with
    this change (including linting)?
  • Is the commit message formatted according to [CONTRIBUTING.md][0]?
  • If this change fixes a bug (or a performance problem), is a regression
    test (or a benchmark) included?
  • Is a documentation update included (if this change modifies
    existing APIs, or introduces new ones)?

Affected core subsystem(s)

build, src

Description of change

  • src: add missing 'inline' keywords
  • build: turn on --gc-sections on linux and freebsd

CI: https://ci.nodejs.org/job/node-test-pull-request/2160/

@bnoordhuis bnoordhuis added the build Issues and PRs related to build files or the CI. label Apr 5, 2016
@bnoordhuis
Copy link
Member Author

Apropos --gc-sections, the alternative is to drop the -fdata-sections and -ffunction-sections flags. I'm on a laptop and I didn't feel like recompiling and benchmarking everything to see if it makes a difference. :-)

@bnoordhuis
Copy link
Member Author

Okay, --gc-sections clearly doesn't work reliably on FreeBSD and pLinux. I've dropped that commit and I'll file a new PR that removes -fdata-sections and -ffunction-sections. CI: https://ci.nodejs.org/job/node-test-pull-request/2164/

@cjihrig
Copy link
Contributor

cjihrig commented Apr 5, 2016

LGTM

The BaseObject constructor and destructor should not have external
linkage because BaseObject is a header-only construct.  Add the
necessary 'inline' keywords.

PR-URL: nodejs#6056
Reviewed-By: Colin Ihrig <[email protected]>
@bnoordhuis bnoordhuis closed this Apr 5, 2016
@bnoordhuis bnoordhuis deleted the gc-sections branch April 5, 2016 18:01
@bnoordhuis bnoordhuis merged commit 0d41463 into nodejs:master Apr 5, 2016
@ofrobots ofrobots changed the title build: turn on --gc-sections on linux and freebsd src: add missing 'inline' keywords Apr 6, 2016
bnoordhuis added a commit to bnoordhuis/io.js that referenced this pull request Apr 7, 2016
We don't link with `--gc-sections` because it's unreliable with some
toolchains, so all these flags do is make the compiler generate slightly
worse code.  Drop them.

Refs: nodejs#6056
PR-URL: nodejs#6077
Reviewed-By: Trevor Norris <[email protected]>
@jasnell
Copy link
Member

jasnell commented Apr 7, 2016

@bnoordhuis ... does this need to happen in v4 also?

@bnoordhuis
Copy link
Member Author

It's not critical but yes.

@mscdex
Copy link
Contributor

mscdex commented Apr 8, 2016

A bit late to the party here but what about the possibility of enabling the flags on known working platforms?

@bnoordhuis
Copy link
Member Author

I didn't run extensive tests but I don't think it's really worth the trouble. It trims about 16K from the 20 MB binary (16 MB stripped) and it seems to negatively impact gcc's ability to do intra-procedural optimizations (maybe not when LTO is enabled but we don't do that, and we wouldn't need the flags in that case anyway.)

MylesBorins pushed a commit that referenced this pull request Apr 19, 2016
The BaseObject constructor and destructor should not have external
linkage because BaseObject is a header-only construct.  Add the
necessary 'inline' keywords.

PR-URL: #6056
Reviewed-By: Colin Ihrig <[email protected]>
MylesBorins pushed a commit that referenced this pull request Apr 19, 2016
We don't link with `--gc-sections` because it's unreliable with some
toolchains, so all these flags do is make the compiler generate slightly
worse code.  Drop them.

Refs: #6056
PR-URL: #6077
Reviewed-By: Trevor Norris <[email protected]>
MylesBorins pushed a commit that referenced this pull request Apr 20, 2016
The BaseObject constructor and destructor should not have external
linkage because BaseObject is a header-only construct.  Add the
necessary 'inline' keywords.

PR-URL: #6056
Reviewed-By: Colin Ihrig <[email protected]>
MylesBorins pushed a commit that referenced this pull request Apr 20, 2016
We don't link with `--gc-sections` because it's unreliable with some
toolchains, so all these flags do is make the compiler generate slightly
worse code.  Drop them.

Refs: #6056
PR-URL: #6077
Reviewed-By: Trevor Norris <[email protected]>
@MylesBorins MylesBorins mentioned this pull request Apr 20, 2016
MylesBorins pushed a commit that referenced this pull request Apr 20, 2016
The BaseObject constructor and destructor should not have external
linkage because BaseObject is a header-only construct.  Add the
necessary 'inline' keywords.

PR-URL: #6056
Reviewed-By: Colin Ihrig <[email protected]>
MylesBorins pushed a commit that referenced this pull request Apr 20, 2016
We don't link with `--gc-sections` because it's unreliable with some
toolchains, so all these flags do is make the compiler generate slightly
worse code.  Drop them.

Refs: #6056
PR-URL: #6077
Reviewed-By: Trevor Norris <[email protected]>
This was referenced Apr 21, 2016
MylesBorins pushed a commit that referenced this pull request May 3, 2016
The BaseObject constructor and destructor should not have external
linkage because BaseObject is a header-only construct.  Add the
necessary 'inline' keywords.

PR-URL: #6056
Reviewed-By: Colin Ihrig <[email protected]>
MylesBorins pushed a commit that referenced this pull request May 6, 2016
The BaseObject constructor and destructor should not have external
linkage because BaseObject is a header-only construct.  Add the
necessary 'inline' keywords.

PR-URL: #6056
Reviewed-By: Colin Ihrig <[email protected]>
MylesBorins pushed a commit that referenced this pull request May 18, 2016
The BaseObject constructor and destructor should not have external
linkage because BaseObject is a header-only construct.  Add the
necessary 'inline' keywords.

PR-URL: #6056
Reviewed-By: Colin Ihrig <[email protected]>
@MylesBorins MylesBorins mentioned this pull request May 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues and PRs related to build files or the CI.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants