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

Add profiler ELT test #39550

Merged
merged 4 commits into from
Jul 29, 2020
Merged

Add profiler ELT test #39550

merged 4 commits into from
Jul 29, 2020

Conversation

davmason
Copy link
Member

As mentioned in #39335 we currently have no ELT hook coverage in the runtime repo.

cc @AndyAyersMS

@davmason davmason requested review from noahfalk and a team July 17, 2020 21:29
@davmason davmason self-assigned this Jul 17, 2020
@ghost
Copy link

ghost commented Jul 17, 2020

Tagging subscribers to this area: @tommcdon
Notify danmosemsft if you want to be subscribed.

@AndyAyersMS
Copy link
Member

Thanks! This will be interesting when run conjunction with gc stress. Should happen in our overnight testing, once this is merged.

@davmason davmason force-pushed the elt_tests branch 2 times, most recently from 2c192c2 to d005b1c Compare July 18, 2020 22:23
@davmason
Copy link
Member Author

davmason commented Jul 18, 2020

There are some bugs in the runtime's slow path ELT assembly stubs on linux. Not surprising given that we haven't ever been testing them. I just pushed some changes to add more diagnostics, I am going to go through and root cause them.

@davmason
Copy link
Member Author

@noahfalk the remaining failures are an infrastructure issue, this is ready to review now

@AndyAyersMS do you or anyone else from the jit team want to take a look at the assembly stub changes I made?

I found the following issues:

  • On amd64 linux we didn't save and restore the xmm registers, and didn't handle enregistered 16 bytes structs as return values
  • On arm we didn't save and restore the floating point registers (I made the linux arm helpers match the windows arm helpers)
  • On arm64 we didn't handle 16 byte enregistered structs as return values

If there are other interesting corner cases to test, please let me know.

@AndyAyersMS
Copy link
Member

cc @dotnet/jit-contrib

@davmason
Copy link
Member Author

@jashook this is the PR we talked about in standup, didn't realize you weren't part of the dotnet-diag group

@noahfalk
Copy link
Member

@jashook this is the PR we talked about in standup, didn't realize you weren't part of the dotnet-diag group

That is fixed now right or is there still an issue?

Copy link
Member

@noahfalk noahfalk left a comment

Choose a reason for hiding this comment

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

LGTM, though mostly I am relying on your test cases rather than my ability spot suspicious assembly code : )

As a broader issue if we've had these long standing bugs and nobody is complaining we should keep an eye out for feedback whether these APIs matter to the profiler authors. Its not clear to me that they do.

@@ -144,7 +144,7 @@ Stack for the above call will look as follows (stack growing downwards):
Thread::VirtualUnwindCallFrame(&ctx);

// add the prespill register(r0-r3) size to get the stack pointer of previous function
_ASSERTE(pData->profiledSp == (void*)(ctx.Sp - 4*4));
_ASSERTE(pData->profiledSp == (void*)(ctx.Sp - 4*4) || pData->profiledSp == (void*)(ctx.Sp - 6*4));
Copy link
Member

Choose a reason for hiding this comment

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

The comment above the assert doesn't lead me to expect the 6 dword case, update the comment?

@davmason
Copy link
Member Author

The CI legs marked as in progress are actually complete, going to merge.

@davmason davmason merged commit f0ede2b into dotnet:master Jul 29, 2020
Jacksondr5 pushed a commit to Jacksondr5/runtime that referenced this pull request Aug 10, 2020
Fix the following issues:

    On amd64 linux we didn't save and restore the xmm registers, and didn't handle enregistered 16 bytes structs as return values
    On arm we didn't save and restore the floating point registers (I made the linux arm helpers match the windows arm helpers)
    On arm64 we didn't handle 16 byte enregistered structs as return values

And add tests
@karelz karelz added this to the 5.0.0 milestone Aug 18, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 8, 2020
@davmason davmason deleted the elt_tests branch January 20, 2021 08:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants