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

implementation of 'gcperfsim-functional' command #3858

Merged
merged 29 commits into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
ec0a60a
implement gcperfsim-functional command
VincentBu Jan 29, 2024
f437301
Merge branch 'main' of https://github.com/VincentBu/performance
VincentBu Jan 29, 2024
8130b6b
fix some issue and add incomplement section in result.md
VincentBu Jan 31, 2024
41c6c35
Merge branch 'dotnet:main' into main
VincentBu Jan 31, 2024
a357719
Merge branch 'dotnet:main' into main
VincentBu Feb 6, 2024
7fdd579
Merge branch 'dotnet:main' into main
VincentBu Feb 8, 2024
ca83dab
Merge branch 'dotnet:main' into main
VincentBu Feb 19, 2024
8f2d4de
fix some issue according to the code review comments
VincentBu Feb 20, 2024
2bab927
restore global.json
VincentBu Feb 20, 2024
477bafc
add CreateBasicGCPerfSimConfiguration to reduce redundancy
VincentBu Feb 20, 2024
d94fce9
fix some bugs
VincentBu Feb 20, 2024
14ca6de
Merge branch 'dotnet:main' into main
VincentBu Feb 20, 2024
923a5a8
remove xlf files
VincentBu Feb 20, 2024
1474a6e
Merge branch 'main' of https://github.com/VincentBu/performance
VincentBu Feb 20, 2024
56de9f3
remove optional argument
VincentBu Feb 22, 2024
32f926b
restore global.json
VincentBu Feb 22, 2024
8fc7b50
remove unused parameter
VincentBu Feb 22, 2024
c2b1efa
Merge branch 'dotnet:main' into main
VincentBu Feb 26, 2024
26f8c3a
Merge branch 'dotnet:main' into main
VincentBu Feb 29, 2024
8e48517
add CreateLargePages_WorkstationSuite and CreateLargePages_ServerSuite
VincentBu Feb 29, 2024
d529ab1
Merge branch 'dotnet:main' into main
VincentBu Mar 1, 2024
cab6282
validate before loading segments
VincentBu Mar 4, 2024
6ee55b1
Merge branch 'main' of https://github.com/VincentBu/performance
VincentBu Mar 4, 2024
4808f66
load environment variables and reduce allocated memory for largePage …
VincentBu Mar 5, 2024
b8bd010
Merge branch 'dotnet:main' into main
VincentBu Mar 5, 2024
f37728e
remove GCName setting in HighMemory Load case and hardcoded corerun n…
VincentBu Mar 11, 2024
ce9dfe8
Merge branch 'main' of https://github.com/VincentBu/performance
VincentBu Mar 11, 2024
a1999b6
change default value of tc and tagb for normal workstation case and l…
VincentBu Mar 12, 2024
dbb333e
reset COMPlus_GCHeapHardLimit
VincentBu Mar 12, 2024
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
output_path: C:\Outputs\GCPerfsimFunctionalTest
gcperfsim_path: C:\performance\artifacts\bin\GCPerfSim\release\net7.0\GCPerfSim.dll

coreruns:
segments:
path: C:\runtime_rc2\artifacts\tests\coreclr\windows.x64.Release\Tests\Core_Root\corerun.exe
environment_variables:
COMPlus_GCName: clrgc.dll
regions:
path: C:\runtime_ga\artifacts\tests\coreclr\windows.x64.Release\Tests\Core_Root\corerun.exe
environment_variables:
COMPlus_GCName: clrgc.dll

environment:
environment_variables:
COMPlus_GCName: clrgc.dll

trace_configuration_type: gc # Choose between: none, gc, verbose, cpu, cpu_managed, threadtime, join.
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
using GC.Infrastructure.Core.Configurations.GCPerfSim;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GC.Infrastructure.Core.Configurations
{
public sealed class GCPerfSimFunctionalConfiguration
{
public string output_path { get; set; }
public string gcperfsim_path { get; set; }
public Dictionary<string, CoreRunInfo> coreruns { get; set; }
public Environment Environment { get; set; } = new();
public string trace_configuration_type { get; set; } = "gc";
}
public class Environment
{
public Dictionary<string, string> environment_variables { get; set; } = new();
}

public static class GCPerfSimFunctionalConfigurationParser
{
public static GCPerfSimFunctionalConfiguration Parse(string path)
{
string serializedConfiguration = File.ReadAllText(path);

GCPerfSimFunctionalConfiguration? configuration = null;

try
{
configuration = Common.Deserializer.Deserialize<GCPerfSimFunctionalConfiguration>(serializedConfiguration);
}
catch (Exception ex)
{
throw new ArgumentException($"{nameof(GCPerfSimFunctionalConfigurationParser)}: Unable to parse the yaml file because of an error in the syntax. Please use the configurations under: Configuration/GCPerfSim/*.yaml in as example to ensure the file is formatted correctly. Exception: {ex.Message} \n Call Stack: {ex.StackTrace}");
}

// Preconditions.
if (configuration.coreruns == null)
{
throw new ArgumentException($"{nameof(GCPerfSimFunctionalConfigurationParser)}: Provide a set of coreruns use for the analysis.");
}

if (string.IsNullOrEmpty(configuration.output_path))
{
throw new ArgumentException($"{nameof(GCPerfSimFunctionalConfigurationParser)}: Provide an output path.");
}

if (string.IsNullOrEmpty(configuration.gcperfsim_path) || !File.Exists(configuration.gcperfsim_path))
{
throw new ArgumentException($"{nameof(GCPerfSimFunctionalConfigurationParser)}: A path to the gcperfsim dll must be provided or exist.");
}

if (configuration.trace_configuration_type == null || string.IsNullOrEmpty(configuration?.trace_configuration_type))
{
throw new ArgumentException($"{nameof(GCPerfSimFunctionalConfigurationParser)}: Please provide the trace_configuration type");
}

return configuration;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,24 @@ public static void AddIncompleteTestsSection(this StreamWriter sw, Dictionary<st
}
}

public static void AddIncompleteTestsSectionWithYamlFileName(this StreamWriter sw, string yamlFileName, Dictionary<string, ProcessExecutionDetails> executionDetails)
{
sw.WriteLine($"# Incomplete Tests: {yamlFileName}.yaml");

foreach (var p in executionDetails)
{
if (p.Value.HasFailed)
{
sw.WriteLine($"### {p.Key}");
sw.WriteLine($"Standard Error: {p.Value.StandardError}\n");
sw.WriteLine();
sw.WriteLine($"Standard Out: {p.Value.StandardOut}\n");
sw.WriteLine();
sw.WriteLine($"Repro: \n ```{p.Value.CommandlineArgs}```\n");
}
}
}

public static void AddReproSection(this StreamWriter sw, Dictionary<string, ProcessExecutionDetails> executionDetails)
{
sw.WriteLine("## Repro Steps");
Expand Down
Loading
Loading