Skip to content

[build_support] Added -sparse option for llvm-profdata if supported #1775

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

Merged
merged 1 commit into from
Apr 7, 2016

Conversation

harlanhaskins
Copy link
Contributor

What's in this pull request?

Adds the -sparse option to invocations of llvm-profdata if it's supported.
Abstracts out the lookup for llvm-profdata such that it can be replaced if/when #1586 is merged.

Resolved bug number: rdar://problem/25072811


Before merging this pull request to apple/swift repository:

  • Test pull request on Swift continuous integration.

Triggering Swift CI

The swift-ci is triggered by writing a comment on this PR addressed to the GitHub user @swift-ci. Different tests will run depending on the specific comment that you use. The currently available comments are:

Smoke Testing

Platform Comment
All supported platforms @swift-ci Please smoke test
OS X platform @swift-ci Please smoke test OS X platform
Linux platform @swift-ci Please smoke test Linux platform

Validation Testing

Platform Comment
All supported platforms @swift-ci Please test
OS X platform @swift-ci Please test OS X platform
Linux platform @swift-ci Please test Linux platform

Note: Only members of the Apple organization can trigger swift-ci.

@harlanhaskins
Copy link
Contributor Author

@vedantk

@vedantk
Copy link
Contributor

vedantk commented Mar 22, 2016

Lgtm!

@harlanhaskins
Copy link
Contributor Author

@gribozavr Mind taking a look? Thanks!

@harlanhaskins
Copy link
Contributor Author

@vedantk Could you kindly ask @swift-ci to please test

@vedantk
Copy link
Contributor

vedantk commented Mar 24, 2016

@harlanhaskins Does the 'please test' path invoke the profile merger?

@harlanhaskins
Copy link
Contributor Author

Nope -- in fact, swift-ci doesn't have a command for that. So this won't be tested by CI...

@harlanhaskins
Copy link
Contributor Author

I'm gonna write some tests for it.

@harlanhaskins
Copy link
Contributor Author

Could I get a @swift-ci please python lint?

@vedantk
Copy link
Contributor

vedantk commented Mar 25, 2016

@swift-ci Please python lint

@harlanhaskins
Copy link
Contributor Author

Looks like that's just not gonna do anything right now. ¯_(ツ)_/¯

@shahmishal
Copy link
Member

@swift-ci Please python lint

@harlanhaskins
Copy link
Contributor Author

@shahmishal Shouldn't you be at home and not working? 😂

@shahmishal
Copy link
Member

@swift-ci Please python lint

@shahmishal
Copy link
Member

@harlanhaskins lol

@shahmishal
Copy link
Member

@swift-ci Please python lint

1 similar comment
@shahmishal
Copy link
Member

@swift-ci Please python lint

@shahmishal
Copy link
Member

--- Python lint ---
./utils/swift-api-dump.py:98:80: W291 trailing whitespace
./utils/swift-api-dump.py:99:80: E501 line too long (82 > 79 characters)

@shahmishal
Copy link
Member

@swift-ci Please python lint

@shahmishal
Copy link
Member

@harlanhaskins Thanks!

@harlanhaskins
Copy link
Contributor Author

Good to merge?

@vedantk
Copy link
Contributor

vedantk commented Mar 30, 2016

I lgtm'd this, but I think the code owner for utils/ should chime in. In particular, I'm not sure what the behavior of this script is on Linux. I see the FIXME saying non-Darwin platforms aren't supported, but it wouldn't be OK to, e.g crash on non-Darwin platforms. There's also the question of whether the import magic is standard (and I'm not the best person to answer that).

@harlanhaskins
Copy link
Contributor Author

Once #1586 is merged, I can merge Linux support. Right now, non-Darwin is guarded inside main.py, but that will be removed once I can lookup llvm-profdata with host_toolchain()

@harlanhaskins
Copy link
Contributor Author

@modocache @gribozavr Think this is good to merge?

@gribozavr
Copy link
Contributor

Hardcoding the xcrun toolchain name is not correct in all cases, but should be a good start. LGTM otherwise.

@harlanhaskins harlanhaskins merged commit 056f4ce into swiftlang:master Apr 7, 2016
@harlanhaskins
Copy link
Contributor Author

Thanks!

@harlanhaskins harlanhaskins deleted the profdata-sparse branch April 7, 2016 21:46
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 this pull request may close these issues.

4 participants