Skip to content

Conversation

@ahoppen
Copy link
Member

@ahoppen ahoppen commented May 22, 2024

Turns out that some of logging from task scheduler would have been useful to debug a recent test failure. This adds some logging into TaskScheduler again and, most importantly, adds log messages to ClosureTaskDescription in TaskSchedulerTests.

rdar://127474171

@ahoppen ahoppen requested a review from benlangmuir as a code owner May 22, 2024 18:45
@ahoppen ahoppen requested review from bnbarham and hamishknight May 22, 2024 18:45
@ahoppen
Copy link
Member Author

ahoppen commented May 22, 2024

@swift-ci Please test

@ahoppen ahoppen force-pushed the task-scheduler-logging branch from adcccf9 to bdc130b Compare May 23, 2024 00:26
@ahoppen
Copy link
Member Author

ahoppen commented May 23, 2024

@swift-ci Please test

@ahoppen
Copy link
Member Author

ahoppen commented May 23, 2024

@swift-ci Please test Windows

@ahoppen ahoppen force-pushed the task-scheduler-logging branch from bdc130b to d568264 Compare May 23, 2024 06:33
@ahoppen
Copy link
Member Author

ahoppen commented May 23, 2024

@swift-ci Please test

@ahoppen
Copy link
Member Author

ahoppen commented May 23, 2024

@swift-ci Please test Windows

ahoppen added 2 commits May 23, 2024 14:05
Turns out that some of logging from task scheduler would have been useful to debug a recent test failure. This adds some logging into `TaskScheduler` again and, most importantly, adds log messages to `ClosureTaskDescription` in `TaskSchedulerTests`.
…heduler`

We need this function anyway to escalate process priorities when we set `nice`ness values for them. It also simplifies the task scheduler and I’m hoping that it fixes a non-deterministic failure that causes task priority elevation to not work properly.
@ahoppen ahoppen force-pushed the task-scheduler-logging branch from d568264 to ef9cd63 Compare May 23, 2024 21:06
@ahoppen
Copy link
Member Author

ahoppen commented May 23, 2024

@swift-ci Please test

@ahoppen
Copy link
Member Author

ahoppen commented May 23, 2024

@swift-ci Please test Windows

public static func platformSupportsTaskPriorityElevation() throws {
#if os(macOS)
if #available(macOS 14.0, *) {
//
Copy link
Contributor

Choose a reason for hiding this comment

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

Was there meant to be a comment here?

Copy link
Member Author

Choose a reason for hiding this comment

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

It also meant to be negated 😉

Copy link
Member Author

Choose a reason for hiding this comment

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

Added

      // Priority elevation was implemented by https://github.com/apple/swift/pull/63019, which is available in the
      // Swift 5.9 runtime included in macOS 14.0+

… doesn’t support task priority elevation
@ahoppen ahoppen force-pushed the task-scheduler-logging branch from ef9cd63 to cb24ce9 Compare May 24, 2024 04:22
@ahoppen
Copy link
Member Author

ahoppen commented May 24, 2024

@swift-ci Please test

@ahoppen
Copy link
Member Author

ahoppen commented May 24, 2024

@swift-ci Please test Linux

@ahoppen
Copy link
Member Author

ahoppen commented May 24, 2024

@swift-ci Please test Windows

@ahoppen
Copy link
Member Author

ahoppen commented May 24, 2024

@swift-ci Please test Linux

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.

3 participants