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

Replacing BOOL with bool #52585

Merged
merged 4 commits into from
May 12, 2021
Merged

Replacing BOOL with bool #52585

merged 4 commits into from
May 12, 2021

Conversation

WhiteBlackGoose
Copy link
Contributor

Replaced all Windows' BOOL to bool in RyuJIT except
for WIN API related cases.

Fix #48317

Replaced all Windows' BOOL to bool in RyuJIT except
for WIN API related cases.

Fix dotnet#48317
Replaced `TRUE` with `true` and `FALSE`
with `false` constants in RyuJIT except
Windows-specific cases.
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label May 11, 2021
Formatting patch applied
according to the instruction.
@@ -564,8 +564,7 @@ void Compiler::lvaInitRetBuffArg(InitVarDscInfo* varDscInfo, bool useFixedRetBuf
info.compCompHnd->getMethodSig(info.compMethodHnd, &sigInfo);
assert(JITtype2varType(sigInfo.retType) == info.compRetType); // Else shouldn't have a ret buff.

info.compRetBuffDefStack =
(info.compCompHnd->isStructRequiringStackAllocRetBuf(sigInfo.retTypeClass));
info.compRetBuffDefStack = (info.compCompHnd->isStructRequiringStackAllocRetBuf(sigInfo.retTypeClass));
if (info.compRetBuffDefStack)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Wait, my changes didn't affect this one (it was the suggested patch). CI didn't pass in the main branch, did it? 🦆

Copy link
Contributor

Choose a reason for hiding this comment

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

what do you mean? I do not think that the jit-format job deleted == TRUE); here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ohhh, right, sorry, I'm blind XD. Yes, it's completely alright.

@WhiteBlackGoose WhiteBlackGoose marked this pull request as ready for review May 11, 2021 17:06
@WhiteBlackGoose
Copy link
Contributor Author

Okay, now it's ready for review. Are those failing CIs - my bad?

@hoyosjs
Copy link
Member

hoyosjs commented May 12, 2021

/azp run runtime

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@hoyosjs
Copy link
Member

hoyosjs commented May 12, 2021

@WhiteBlackGoose No, it was a break in the CI orchestrator. I've retriggered the build.

Copy link
Member

@AraHaan AraHaan left a comment

Choose a reason for hiding this comment

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

Looks good (if only constexpr was used though for some of these that only returns booleans and safe checks). I know a lot of things in the stl that uses constexpr and noexcept for things like those on these headers and things known within the functions callstacks to never throw.

As such I think a lot of the runtime that has bits that never throw should mark noexcept and constexpr if possible.

@WhiteBlackGoose
Copy link
Contributor Author

@JulieLeeMSFT could you review, please? I'm not sure if I have to ping someone, but no reaction for this and #51758 PR came from members, so I'm a bit confused 😕

@JulieLeeMSFT
Copy link
Member

@sandreenko PTAL.

@JulieLeeMSFT
Copy link
Member

@JulieLeeMSFT could you review, please? I'm not sure if I have to ping someone, but no reaction for this and #51758 PR came from members, so I'm a bit confused 😕

@WhiteBlackGoose sorry for the delay. Pinged @sandreenko for code review.

@sandreenko
Copy link
Contributor

@JulieLeeMSFT could you review, please? I'm not sure if I have to ping someone, but no reaction for this and #51758 PR came from members, so I'm a bit confused 😕

I recommend you to tag @dotnet/jit-contrib in jit changes when they are ready for review so we get a notification about them. Otherwise, we scroll through all-new PRs from time to time but it would take longer until we notice it.

Copy link
Contributor

@sandreenko sandreenko left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @WhiteBlackGoose!

@@ -564,8 +564,7 @@ void Compiler::lvaInitRetBuffArg(InitVarDscInfo* varDscInfo, bool useFixedRetBuf
info.compCompHnd->getMethodSig(info.compMethodHnd, &sigInfo);
assert(JITtype2varType(sigInfo.retType) == info.compRetType); // Else shouldn't have a ret buff.

info.compRetBuffDefStack =
(info.compCompHnd->isStructRequiringStackAllocRetBuf(sigInfo.retTypeClass));
info.compRetBuffDefStack = (info.compCompHnd->isStructRequiringStackAllocRetBuf(sigInfo.retTypeClass));
if (info.compRetBuffDefStack)
Copy link
Contributor

Choose a reason for hiding this comment

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

what do you mean? I do not think that the jit-format job deleted == TRUE); here.

@SingleAccretion
Copy link
Contributor

Red CI seems to be reporting failures, the tests themselves passed.

Libraries Test Run checked coreclr Linux x64 Debug
   System.Runtime.Tests  Total: 38821, Errors: 0, Failed: 0, Skipped: 12, Time: 123.107s

Libraries Test Run checked coreclr Linux_musl arm64 Release
   System.IO.FileSystem.Tests  Total: 5519, Errors: 0, Failed: 0, Skipped: 16, Time: 113.020s

Libraries Test Run checked coreclr Linux_musl x64 Debug
   System.Xml.RW.ReaderSettings.Tests  Total: 926, Errors: 0, Failed: 0, Skipped: 0, Time: 2.649s

Worker 1: got error: Traceback (most recent call last):
  File "/datadisks/disk1/work/B71D09DC/p/reporter/run.py", line 44, in run
    self.__process(item)
  File "/datadisks/disk1/work/B71D09DC/p/reporter/run.py", line 34, in __process
    self.publisher.upload_batch(batch)
  File "/datadisks/disk1/work/B71D09DC/p/reporter/azure_devops_result_publisher.py", line 35, in upload_batch
    self.publish_results(test_case_results, test_name_order, results_with_attachments)
  File "/datadisks/disk1/work/B71D09DC/p/reporter/azure_devops_result_publisher.py", line 70, in publish_results
    published_results = test_client.add_test_results_to_test_run(list(test_case_results), self.team_project, self.test_run_id)  # type: List[TestCaseResult]
  File "/home/helixbot/.azdo-env/lib/python3.6/site-packages/azure/devops/v5_1/test/test_client.py", line 679, in add_test_results_to_test_run
    content=content)
  File "/home/helixbot/.azdo-env/lib/python3.6/site-packages/azure/devops/client.py", line 104, in _send
    response = self._send_request(request=request, headers=headers, content=content, media_type=media_type)
  File "/home/helixbot/.azdo-env/lib/python3.6/site-packages/azure/devops/client.py", line 68, in _send_request
    self._handle_error(request, response)
  File "/home/helixbot/.azdo-env/lib/python3.6/site-packages/azure/devops/client.py", line 272, in _handle_error
    status_code=response.status_code))
azure.devops.exceptions.AzureDevOpsClientRequestError: Operation returned an invalid status code of 503.

@AraHaan
Copy link
Member

AraHaan commented May 12, 2021

Red CI seems to be reporting failures, the tests themselves passed.

Libraries Test Run checked coreclr Linux x64 Debug
   System.Runtime.Tests  Total: 38821, Errors: 0, Failed: 0, Skipped: 12, Time: 123.107s

Libraries Test Run checked coreclr Linux_musl arm64 Release
   System.IO.FileSystem.Tests  Total: 5519, Errors: 0, Failed: 0, Skipped: 16, Time: 113.020s

Libraries Test Run checked coreclr Linux_musl x64 Debug
   System.Xml.RW.ReaderSettings.Tests  Total: 926, Errors: 0, Failed: 0, Skipped: 0, Time: 2.649s

Worker 1: got error: Traceback (most recent call last):
  File "/datadisks/disk1/work/B71D09DC/p/reporter/run.py", line 44, in run
    self.__process(item)
  File "/datadisks/disk1/work/B71D09DC/p/reporter/run.py", line 34, in __process
    self.publisher.upload_batch(batch)
  File "/datadisks/disk1/work/B71D09DC/p/reporter/azure_devops_result_publisher.py", line 35, in upload_batch
    self.publish_results(test_case_results, test_name_order, results_with_attachments)
  File "/datadisks/disk1/work/B71D09DC/p/reporter/azure_devops_result_publisher.py", line 70, in publish_results
    published_results = test_client.add_test_results_to_test_run(list(test_case_results), self.team_project, self.test_run_id)  # type: List[TestCaseResult]
  File "/home/helixbot/.azdo-env/lib/python3.6/site-packages/azure/devops/v5_1/test/test_client.py", line 679, in add_test_results_to_test_run
    content=content)
  File "/home/helixbot/.azdo-env/lib/python3.6/site-packages/azure/devops/client.py", line 104, in _send
    response = self._send_request(request=request, headers=headers, content=content, media_type=media_type)
  File "/home/helixbot/.azdo-env/lib/python3.6/site-packages/azure/devops/client.py", line 68, in _send_request
    self._handle_error(request, response)
  File "/home/helixbot/.azdo-env/lib/python3.6/site-packages/azure/devops/client.py", line 272, in _handle_error
    status_code=response.status_code))
azure.devops.exceptions.AzureDevOpsClientRequestError: Operation returned an invalid status code of 503.

503 is Unavailable meaning DevOps was offline for some reason. Possibly due to an outage or maintenance.

@hoyosjs
Copy link
Member

hoyosjs commented May 12, 2021

Checked on the failures. There's no failed tests. @sandreenko, if you feel like this is ready to merge please do so.

@MattGal I've seen this issue with 503s starting to cause considerable pain, where we'll fail due to reporting even though all tests passed. Helix log searching in runfo is not very easy for this type of failures and Kusto ingestion happens from AzDO afaik so we can't use it. Is there any tracking issue for this?
cc: @aik-jahoda @ericstj @dotnet/dnceng @dotnet/runtime-infrastructure

@safern
Copy link
Member

safern commented May 12, 2021

@hoyosjs this is the issue tracking that failure: https://github.com/dotnet/core-eng/issues/13026 and they are working on adding retries to the reporter: dotnet/arcade#7371 so maybe consider pinging there to raise their attention that we are being badly impacted?

@MattGal
Copy link
Member

MattGal commented May 12, 2021

Checked on the failures. There's no failed tests. @sandreenko, if you feel like this is ready to merge please do so.

@MattGal I've seen this issue with 503s starting to cause considerable pain, where we'll fail due to reporting even though all tests passed. Helix log searching in runfo is not very easy for this type of failures and Kusto ingestion happens from AzDO afaik so we can't use it. Is there any tracking issue for this?
cc: @aik-jahoda @ericstj @dotnet/dnceng @dotnet/runtime-infrastructure

@hoyosjs nothing's changed about how often the 503s occur, they just now actually report failure starting 4/29. It's a long story, hit me up on Teams for a longer discussion. (Before 4/29, you were just able to merge failing tests if reporting to Azure DevOps failed). There is a simple and very quick fix that also causes failed work items to be logged in the test tab that is undesirable for this reason.

dotnet/arcade#7371 is the FR issue that tracks introducing more retries to the script in the case of Azure Devops failure.

@hoyosjs
Copy link
Member

hoyosjs commented May 12, 2021

Wasn't aware they were getting dropped on the floor. AS always, thanks @MattGal :) And thanks @safern.

@sandreenko sandreenko merged commit f7805ce into dotnet:main May 12, 2021
@JulieLeeMSFT
Copy link
Member

Thanks @sandreenko for merging it.

@ghost ghost locked as resolved and limited conversation to collaborators Jun 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use standard booleans throughout RyuJit
8 participants