Skip to content
This repository was archived by the owner on Nov 1, 2020. It is now read-only.

Gc reporting for filter funclets#3401

Merged
jkotas merged 8 commits intomasterfrom
GC-Reporting-for-filter-funclets
Apr 25, 2017
Merged

Gc reporting for filter funclets#3401
jkotas merged 8 commits intomasterfrom
GC-Reporting-for-filter-funclets

Conversation

@PeterSolMS
Copy link
Contributor

No description provided.

I found the problem with filter funclets is that the untracked variables
get reported both by the filter funclet and the enclosing method.

While the compiler makes sure that the lifetimes of other variables get
appropriately split and marked as pinned, this is not the case for
untracked variables - here we simply need to suppress the reporting if
we are indeed in a filter funclet.

My fix simply figures out whether we are indeed in a filter, and if so,
passes an appropriate flag to EnumerateLiveSlots.

I suspect that UnixNativeCodeManager.cpp/.h will need a parallel fix,
but lets first discuss whether my fix for Windows is in fact correct.
ICodeManagerFlags flags = (ICodeManagerFlags)0;
if (pNativeMethodInfo->executionAborted)
flags = ICodeManagerFlags::ExecutionAborted;
if (IsFilter(pMethodInfo))
Copy link
Member

Choose a reason for hiding this comment

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

Could you please make a matching fix in src\Native\Runtime\unix\UnixNativeCodeManager.cpp as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, it seems the fix is exactly the same except for the mechanics of getting the unwind block flags.

using System;

class Program
{
Copy link
Member

Choose a reason for hiding this comment

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

We tend to batch the different test cases that we found to be interesting together in "Simple" tests to make the smoke test runs short. Could you please add this to tests\src\Simple\Exceptions\Exceptions.cs instead?

@jkotas
Copy link
Member

jkotas commented Apr 21, 2017

Also, could you please sign .NET Foundation CLA at https://cla2.dotnetfoundation.org/ ? (It is necessary even if you are Microsoft employee because of .NET Foundation and Microsoft are different entities.)

@dnfclas
Copy link

dnfclas commented Apr 24, 2017

@PeterSolMS, thanks for signing the contribution license agreement. We will now validate the agreement and then the pull request.

Thanks, .NET Foundation Pull Request Bot

I found the problem with filter funclets is that the untracked variables
get reported both by the filter funclet and the enclosing method.

While the compiler makes sure that the lifetimes of other variables get
appropriately split and marked as pinned, this is not the case for
untracked variables - here we simply need to suppress the reporting if
we are indeed in a filter funclet.

My fix simply figures out whether we are indeed in a filter, and if so,
passes an appropriate flag to EnumerateLiveSlots.

I did a parallel fix in UnixNativeCodeManager.cpp/.h.
@jkotas
Copy link
Member

jkotas commented Apr 24, 2017

Precise GC needs more fixes on Unix (#3310 has some). Could you please keep the conservative GC enabled for Unix - #ifdef PLATFORM_UNIX should do it.

@jkotas
Copy link
Member

jkotas commented Apr 24, 2017

Unix builds are failing with use of undeclared identifier 'c_classlibFunctions'. Maybe RhpEnableConservativeStackReporting should be defined unconditionally - there is no harm if it is defined, but not used.

@jkotas
Copy link
Member

jkotas commented Apr 25, 2017

Thanks Peter!

@jkotas jkotas merged commit 36f5f8b into master Apr 25, 2017
@jkotas jkotas deleted the GC-Reporting-for-filter-funclets branch April 25, 2017 00:57
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants