Skip to content

Conversation

@davmason
Copy link
Contributor

Fixes #70187

Tested that go to source continues to work with Perfview and VS CPU analysis still works.

@davmason davmason added this to the 7.0.0 milestone Jun 30, 2022
@davmason davmason requested review from a team, jakobbotsch and pharring June 30, 2022 08:50
@davmason davmason self-assigned this Jun 30, 2022
Copy link
Member

@jakobbotsch jakobbotsch left a comment

Choose a reason for hiding this comment

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

I don't think this will be enough for the problem they are trying to solve in #70187 for the reasons I've mentioned in #70187 (comment).

@davmason
Copy link
Contributor Author

@jakobbotsch, yes you are correct. I opened this prematurely, in a bit I will add the native code version too

@jakobbotsch
Copy link
Member

@jakobbotsch, yes you are correct. I opened this prematurely, in a bit I will add the native code version too

Sounds good, though I think it would be better to expose the native code version in the ReJITID field, similar to the MethodLoad events, so that we do not end up with two ReJITIDs that mean different things. Not sure if that ship has sailed at this point, however.

@davmason
Copy link
Contributor Author

The approach I went with was to use the native code version as the ReJITID in the event to match the other uses, then I also created a V1 event and added the IL version too in case anyone needs it in the future

Copy link
Member

@hoyosjs hoyosjs left a comment

Choose a reason for hiding this comment

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

LGTM other than that.

if ((dwEventOptions & ETW::EnumerationLog::EnumerationStructs::JitMethodILToNativeMap) != 0)
{
FireEtwMethodILToNativeMap(
FireEtwMethodILToNativeMap_V1(
Copy link
Member

@hoyosjs hoyosjs Jun 30, 2022

Choose a reason for hiding this comment

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

Is this considered a breaking change? Considering that the payload changes the meaning of ReJITID for this event?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes it is technically a breaking change, I think it is worth the slight risk though. The native code version is much more interesting when looking at IL to native maps, and it's hard to imagine anyone actually takes a dependency on knowing the IL version. The only way you'll see a new IL version is profiler rejit.

Copy link
Member

Choose a reason for hiding this comment

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

I am happy with that, just probably good do document in breaking changes release notes for the release and call it good.

@noahfalk
Copy link
Member

This new version of the code also works properly for VS and PerfView goto source I trust?

@davmason
Copy link
Contributor Author

davmason commented Jul 6, 2022

This new version of the code also works properly for VS and PerfView goto source I trust?

I did some in depth testing with an app where it did a long running operation three ways:

  • All operations in tier 0
  • 50/50 operations in tier 0/1
  • 50/50 operations in original function and a rejitted method

Perfview handles it fine for all, VS handles it fine for tiering.

For the rejit case, VS will show two different method entries with the same name for samples:
image

That doesn't bother me at all given the relative rarity of rejit.

@davmason davmason merged commit 32ca998 into dotnet:main Jul 7, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Aug 6, 2022
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.

ReJITID is always zero in ILToNativeMapDCStart event

4 participants