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

Desktop Runtime EnumerateMemoryRegions Never includes JIT Heaps #258

Closed
Zhentar opened this issue Mar 29, 2019 · 4 comments
Closed

Desktop Runtime EnumerateMemoryRegions Never includes JIT Heaps #258

Zhentar opened this issue Mar 29, 2019 · 4 comments

Comments

@Zhentar
Copy link

Zhentar commented Mar 29, 2019

In https://github.com/Microsoft/clrmd/blob/18dd6649d85da782617dd73002cdb39d4940c9db/src/Microsoft.Diagnostics.Runtime/src/Desktop/V45Runtime.cs#L331-L332

Only Unknown heap types will be returned by EnumerateJitHeaps, and EnumerateMemoryRegions ignores unknown heaps. So I'm guessing that's supposed to be ==.

@Zhentar
Copy link
Author

Zhentar commented Mar 29, 2019

Though I guess it doesn't matter much because SOS returns nulls for the heap regions 😩

@Zhentar
Copy link
Author

Zhentar commented Apr 1, 2019

It's because it's returning pointer to the first field of the heap, I guess; subtracting one pointer from the address for loader heap types allows it to correctly return the heap's allocation.

Also this:

https://github.com/Microsoft/clrmd/blob/18dd6649d85da782617dd73002cdb39d4940c9db/src/Microsoft.Diagnostics.Runtime/src/Desktop/V45Runtime.cs#L336-L337

Should be indexing with j

@leculver
Copy link
Contributor

Not a ClrMD bug, but I will investigate fixing this in the CLR runtime in the future. Leaving this issue open to remind me to go take a look.

@leculver
Copy link
Contributor

leculver commented Jun 3, 2020

This is tracked via https://github.com/dotnet/diagnostics/issues/1108.

@leculver leculver closed this as completed Jun 3, 2020
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

No branches or pull requests

2 participants