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

Add ability for crossgen2 to synthesize PGO histograms #77683

Merged
merged 38 commits into from
Nov 17, 2022
Merged
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
255a128
Add ability for crossgen2 to synthesize PGO histograms
jakobbotsch Oct 31, 2022
82430a9
Fix embedding synthesized PGO data
jakobbotsch Nov 1, 2022
c1f63dc
Fix isSynthesized out var
jakobbotsch Nov 1, 2022
f94760f
JIT: Support profiles with only histograms
jakobbotsch Nov 1, 2022
5b13d09
JitDisasm header nit
jakobbotsch Nov 1, 2022
e9b3e90
Iterate profile right after retrieving it
jakobbotsch Nov 1, 2022
e6c0ace
Revert profile weight schema element
jakobbotsch Nov 1, 2022
75d7737
Support type based GDV too
jakobbotsch Nov 1, 2022
b13d824
Avoid empty histograms
jakobbotsch Nov 2, 2022
6e518d4
Merge branch 'main' of github.com:dotnet/runtime into crossgen2-synth…
jakobbotsch Nov 2, 2022
e825974
Move to PublishCode
jakobbotsch Nov 2, 2022
8a48190
Remove dead code
jakobbotsch Nov 2, 2022
58b4007
Nits
jakobbotsch Nov 2, 2022
47c0bbd
Remove more dead code, use List<T>.Contains
jakobbotsch Nov 2, 2022
e1421e9
Avoid multiple iteration
jakobbotsch Nov 2, 2022
70001b6
Fix build
jakobbotsch Nov 2, 2022
8979a0d
Add to crossgen2 test wrapper script invocation
jakobbotsch Nov 2, 2022
a8ff57f
Unrelated R2R comment fix
jakobbotsch Nov 2, 2022
545744c
Fix concurrency
jakobbotsch Nov 2, 2022
30eacb4
Add some EH
jakobbotsch Nov 2, 2022
d1a2124
Fix wrong metadata name in test
jakobbotsch Nov 2, 2022
d651826
Unify RunCrossGen2 environment variable to be set to 1 instead of "true"
jakobbotsch Nov 2, 2022
00b702a
Also do it for LargeVersionBubble and fix comment
jakobbotsch Nov 2, 2022
a262bc1
Merge branch 'main' of github.com:dotnet/runtime into crossgen2-synth…
jakobbotsch Nov 3, 2022
beee8e1
Try to ensure synthesized types/methods are loadable
jakobbotsch Nov 4, 2022
1ac4985
Hook up to testing, mark a test as incompatible with synthesis
jakobbotsch Nov 4, 2022
31864dc
Fix rerunning crossgen2 tests
jakobbotsch Nov 4, 2022
fa0c61b
Merge branch 'main' of github.com:dotnet/runtime into crossgen2-synth…
jakobbotsch Nov 7, 2022
9332810
Skip generic types/methods in histograms
jakobbotsch Nov 7, 2022
88bc9ed
Revert "Unrelated R2R comment fix"
jakobbotsch Nov 7, 2022
0c6b101
Nit
jakobbotsch Nov 7, 2022
a3d6c7a
Nit
jakobbotsch Nov 7, 2022
636ef8e
Check IsTypicalMethodDefinition for delegate invoke too
jakobbotsch Nov 7, 2022
85f8425
Merge branch 'main' of github.com:dotnet/runtime into crossgen2-synth…
jakobbotsch Nov 12, 2022
0db6992
Add some comments
jakobbotsch Nov 7, 2022
eff1b82
Unify crossgen2 and ILC's additional dependencies handling
jakobbotsch Nov 15, 2022
5fc9321
Merge branch 'main' of github.com:dotnet/runtime into crossgen2-synth…
jakobbotsch Nov 17, 2022
0943776
Fix build after merge
jakobbotsch Nov 17, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add some EH
  • Loading branch information
jakobbotsch committed Nov 2, 2022
commit 30eacb4afdb5f886dce0b08365acbb6fbb4f1cba
Original file line number Diff line number Diff line change
@@ -423,37 +423,49 @@ public GdvEntityFinder(IEnumerable<ModuleDesc> modules)
{
foreach (MethodDesc method in type.GetMethods())
{
if (method.Signature.IsStatic || method.IsAbstract)
continue;

if (!delegateTargets.TryGetValue(method.Signature, out HashSet<MethodDesc> set))
delegateTargets.Add(method.Signature, set = new HashSet<MethodDesc>());

set.Add(method);
}

if (!type.IsAbstract && !type.IsInterface)
{
void AddImplemented(TypeDesc implemented)
try
{
if (!implementers.TryGetValue(implemented, out HashSet<TypeDesc> set))
implementers.Add(implemented, set = new HashSet<TypeDesc>());
if (!method.Signature.IsStatic && !method.IsAbstract)
{
if (!delegateTargets.TryGetValue(method.Signature, out HashSet<MethodDesc> set))
delegateTargets.Add(method.Signature, set = new HashSet<MethodDesc>());

set.Add(type);
set.Add(method);
}
}

TypeDesc implemented = type;
do
catch (TypeSystemException)
{
AddImplemented(implemented);
implemented = implemented.BaseType;
} while (implemented != null);
}
}

foreach (TypeDesc iface in type.RuntimeInterfaces)
try
{
if (!type.IsAbstract && !type.IsInterface)
{
AddImplemented(iface);
void AddImplemented(TypeDesc implemented)
{
if (!implementers.TryGetValue(implemented, out HashSet<TypeDesc> set))
implementers.Add(implemented, set = new HashSet<TypeDesc>());

set.Add(type);
}

TypeDesc implemented = type;
do
{
AddImplemented(implemented);
implemented = implemented.BaseType;
} while (implemented != null);

foreach (TypeDesc iface in type.RuntimeInterfaces)
{
AddImplemented(iface);
}
}
}
catch (TypeSystemException)
{
}
}
}