Skip to content

Only output number of executed instructions in swift-parser-cli on macOS #1462

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
Mar 29, 2023

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Mar 28, 2023

libproc.h is not available on iOS and I’m not sure how it behaves on Linux. Since swift-parser-cli is only a testing utility, take the safe approach and only output the number of executed instructions on macOS.

…macOS

`libproc.h` is not available on iOS and I’m not sure how it behaves on Linux. Since `swift-parser-cli` is only a testing utility, take the safe approach and only output the number of executed instructions on macOS.
@ahoppen ahoppen requested a review from bnbarham March 28, 2023 23:39
@ahoppen
Copy link
Member Author

ahoppen commented Mar 28, 2023

@swift-ci Please test

@@ -21,3 +30,8 @@ uint64_t getInstructionsExecuted() {
}
return 0;
}
#else
uint64_t getInstructionsExecuted() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Would be nice to see if we can do something cross platform here, but fine for now I suppose 🤷

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, I agree. But let’s wait to see if a need comes up first since this is just a testing utility anyway.

@ahoppen ahoppen merged commit 9ad7a48 into swiftlang:main Mar 29, 2023
@ahoppen ahoppen deleted the ahoppen/instructions-on-macos-only branch March 29, 2023 22:26
ahoppen added a commit to ahoppen/swift-syntax that referenced this pull request Mar 31, 2023
…n-macos-only

Only output number of executed instructions in `swift-parser-cli` on macOS
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.

2 participants