未验证 提交 146b3b16 编写于 作者: J Jakob Botsch Nielsen 提交者: GitHub

Improve dotnet-pgo output and fix null type handles (#53494)

* Improve dotnet-pgo output and fix null type handles

* When comparing .mibc files, find a unique name to print for both files
  by repeatedly appending another parent directory on it.

* When comparing .mibc files, print a comparison of type handle
  histogram data

* Fix a potential division by zero

* Print some info when producing .mibc that are based on samples/LBR
  data

* Fix .mibc read type handles with value 0 to actually return IsNull

* Use different devirt threshold for interfaces and classes

* Add ClassProfileFlags to PgoFormat.cs
上级 dd72b1d2
......@@ -79,6 +79,14 @@ public struct PgoSchemaElem
((InstrumentationKind & PgoInstrumentationKind.MarshalMask) == PgoInstrumentationKind.EightByte)));
}
// Flags stored in 'Other' field of TypeHandleHistogram*Count entries.
[Flags]
public enum ClassProfileFlags : uint
{
IsInterface = 0x40000000,
IsClass = 0x80000000,
}
public class PgoProcessor
{
private enum InstrumentationDataProcessingState
......
......@@ -35,7 +35,7 @@ TypeSystemEntityOrUnknown IPgoSchemaDataLoader<TypeSystemEntityOrUnknown>.TypeFr
try
{
if (token == 0)
return new TypeSystemEntityOrUnknown(0);
return new TypeSystemEntityOrUnknown(null);
if ((token & 0xFF000000) == 0)
{
// token type is 0, therefore it can't be a type
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册