-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into BumpMaintenancePackagesDependencies
- Loading branch information
Showing
183 changed files
with
5,273 additions
and
5,145 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Contract ReJIT | ||
|
||
This contract encapsulates support for [ReJIT](../features/code-versioning.md) in the runtime. | ||
|
||
## APIs of contract | ||
|
||
```csharp | ||
bool IsEnabled(); | ||
``` | ||
|
||
## Version 1 | ||
|
||
Data descriptors used: | ||
| Data Descriptor Name | Field | Meaning | | ||
| --- | --- | --- | | ||
| ProfControlBlock | GlobalEventMask | an `ICorProfiler` `COR_PRF_MONITOR` value | | ||
|
||
Global variables used: | ||
| Global Name | Type | Purpose | | ||
| --- | --- | --- | | ||
|ProfilerControlBlock | TargetPointer | pointer to the `ProfControlBlock` | | ||
|
||
Contracts used: | ||
| Contract Name | | ||
| --- | | ||
|
||
```csharp | ||
// see src/coreclr/inc/corprof.idl | ||
[Flags] | ||
private enum COR_PRF_MONITOR | ||
{ | ||
COR_PRF_ENABLE_REJIT = 0x00040000, | ||
} | ||
|
||
bool IsEnabled() | ||
{ | ||
TargetPointer address = target.ReadGlobalPointer("ProfilerControlBlock"); | ||
ulong globalEventMask = target.Read<ulong>(address + /* ProfControlBlock::GlobalEventMask offset*/); | ||
bool profEnabledReJIT = (GlobalEventMask & (ulong)COR_PRF_MONITOR.COR_PRF_ENABLE_REJIT) != 0; | ||
bool clrConfigEnabledReJit = /* host process does not have environment variable DOTNET_ProfAPI_ReJitOnAttach set to 0 */; | ||
return profEnabledReJIT || clrConfigEnabledReJIT; | ||
} | ||
``` |
Oops, something went wrong.