Skip to content

[build-script] Allow to tune dsymutil parallelism #34795

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

Conversation

edymtt
Copy link
Contributor

@edymtt edymtt commented Nov 17, 2020

This should enable scaling when using machines with large amount of
RAM.

To better support machines with lower spec, process one binary per
dsymutil invocation (reverting #34149).

Add some (limited) facilities to gather the time taken to execute
dsymutil to better assist in tuning the parameter -- these are printed in
JSON format in the log to allow for easier scraping

{ "command": "dsymutil", "start": "2020-11-18T18:10:47" }
{ "command": "dsymutil", "end": "2020-11-18T18:14:45" }

Addresses rdar://71018443

This should enable scaling when using machines with large amount of
RAM.

To better support machines with lower spec, process one binary per
dsymutil invocation (reverting swiftlang#34149).

Add some (limited) facilities to gather the time taken to execute
dsymutil to better assist in tuning the parameter.

Addresses rdar://71018443
@edymtt
Copy link
Contributor Author

edymtt commented Nov 17, 2020

@swift-ci please smoke test

@edymtt
Copy link
Contributor Author

edymtt commented Nov 17, 2020

@swift-ci please build toolchain

@edymtt
Copy link
Contributor Author

edymtt commented Nov 17, 2020

@swift-ci Please Test Source Compatibility Release

# Run sequentially -- dsymutil is multithreaded and can be memory intensive
# Tweak carefully the amount of parallelism -- dsymutil can be memory intensive and
# as such too many instance can exhaust the memory and slow down/panic the machine
printJSONStartTimestamp dsymutil
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recognize this is not strictly required to add the parameter, but it seemed to make sense given we are now able to tune this in a more direct way

@swift-ci
Copy link
Contributor

Linux Toolchain (Ubuntu 16.04)
Download Toolchain
Git Sha - 572ae53

Install command
tar zxf swift-PR-34795-501-ubuntu16.04.tar.gz
More info

@swift-ci
Copy link
Contributor

macOS Toolchain
Download Toolchain
Git Sha - 572ae53

Install command
tar -zxf swift-PR-34795-776-osx.tar.gz --directory ~/

@edymtt
Copy link
Contributor Author

edymtt commented Nov 18, 2020

@swift-ci please test

@edymtt
Copy link
Contributor Author

edymtt commented Nov 18, 2020

@swift-ci please build toolchain

@edymtt
Copy link
Contributor Author

edymtt commented Nov 18, 2020

@swift-ci Please Test Source Compatibility Release

@swift-ci
Copy link
Contributor

Linux Toolchain (Ubuntu 16.04)
Download Toolchain
Git Sha - 17388de

Install command
tar zxf swift-PR-34795-503-ubuntu16.04.tar.gz
More info

@swift-ci
Copy link
Contributor

macOS Toolchain
Download Toolchain
Git Sha - 17388de

Install command
tar -zxf swift-PR-34795-780-osx.tar.gz --directory ~/

@edymtt
Copy link
Contributor Author

edymtt commented Nov 19, 2020

@swift-ci please smoke test

@edymtt
Copy link
Contributor Author

edymtt commented Nov 19, 2020

@swift-ci please build toolchain

@edymtt
Copy link
Contributor Author

edymtt commented Nov 19, 2020

@swift-ci Please Test Source Compatibility Release

@edymtt edymtt requested a review from porglezomp November 19, 2020 16:45
@edymtt
Copy link
Contributor Author

edymtt commented Nov 19, 2020

@swift-ci please smoke test Linux

@swift-ci
Copy link
Contributor

Linux Toolchain (Ubuntu 16.04)
Download Toolchain
Git Sha - a77ce30

Install command
tar zxf swift-PR-34795-505-ubuntu16.04.tar.gz
More info

@edymtt
Copy link
Contributor Author

edymtt commented Nov 19, 2020

@swift-ci please build toolchain macOS

@edymtt
Copy link
Contributor Author

edymtt commented Nov 19, 2020

@swift-ci please smoke test Linux

@edymtt
Copy link
Contributor Author

edymtt commented Nov 19, 2020

@swift-ci please build toolchain macOS

@edymtt
Copy link
Contributor Author

edymtt commented Nov 20, 2020

@swift-ci please smoke test Linux

@edymtt
Copy link
Contributor Author

edymtt commented Nov 20, 2020

@swift-ci please build toolchain macOS

1 similar comment
@edymtt
Copy link
Contributor Author

edymtt commented Nov 20, 2020

@swift-ci please build toolchain macOS

@edymtt
Copy link
Contributor Author

edymtt commented Nov 20, 2020

@swift-ci Please Test Source Compatibility Release

@swift-ci
Copy link
Contributor

macOS Toolchain
Download Toolchain
Git Sha - a77ce30

Install command
tar -zxf swift-PR-34795-793-osx.tar.gz --directory ~/

@edymtt
Copy link
Contributor Author

edymtt commented Nov 30, 2020

@swift-ci Please Test Source Compatibility Release

1 similar comment
@edymtt
Copy link
Contributor Author

edymtt commented Nov 30, 2020

@swift-ci Please Test Source Compatibility Release

@edymtt edymtt merged commit 8fc2598 into swiftlang:main Dec 1, 2020
@edymtt edymtt deleted the add-parameter-for-dsymutil-parallelism branch December 1, 2020 15:11
ainu-bot pushed a commit to google/swift that referenced this pull request Dec 1, 2020
* 'main' of github.com:apple/swift: (67 commits)
  [build-script] Allow to tune dsymutil parallelism (swiftlang#34795)
  [Testing] Add missing REQUIRES
  [concurrency] SILGen: emit @asyncHandler functions.
  [concurrency] SILGen: allow the Builtin.createAsyncTaskFuture to have a non-generic closure argument.
  [concurrency] stdlib: add a _runAsyncHandler compiler intrinsic.
  Mangling: add support for mangling the body-function of asyncHandlers
  Make sure ~AutoDiffLinearMapContext() is called.
  fix SourceLoc-related crasher and add tests
  [AutoDiff] Bump-pointer allocate pullback structs in loops. (swiftlang#34886)
  update differentiable programming manifesto
  [Async CC] Always add full type metadata to bindings.
  [cxx-interop] Fix assertion to allow variadic members.
  [ome] Remove bad pattern of having a global SILBuilder with a global SILBuilderWithContext and multiple local SILBuilderWithScope.
  [ome] Invoke simplifyInstruction after lowering ownership and use replaceAllSimplifiedUsesAndErase instead of a manual RAUW.
  Partially revert Float16 availability changes (swiftlang#34847)
  Add a field reflection function that constructs keypaths. (swiftlang#34815)
  Allow the creation of a shadow variable when the type is a refcounted pointer (swiftlang#34835)
  [CMake] Extend copy-legacy-layouts dependency to swiftmodules (swiftlang#34846)
  [sil] Remove usage from TypeLowering of SILBuilder::create*AndFold().
  [allocbox-to-stack] Fix an ossa bug in PromotedParamCloner.
  ...
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