Skip to content

Commit

Permalink
Merge branch 'main' into h2wsclientfix
Browse files Browse the repository at this point in the history
  • Loading branch information
CarnaViire authored Mar 14, 2024
2 parents f0d8d4d + 713e690 commit cc969ac
Show file tree
Hide file tree
Showing 9 changed files with 213 additions and 81 deletions.
2 changes: 1 addition & 1 deletion eng/DotNetBuild.props
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
Properties that control flags from the VMR build, and the expected output for the VMR build should be added to this file. -->
<InnerBuildArgs>$(InnerBuildArgs) $(FlagParameterPrefix)arch $(TargetArch)</InnerBuildArgs>
<InnerBuildArgs Condition="'$(DotNetBuildSourceOnly)' != 'true'">$(InnerBuildArgs) $(FlagParameterPrefix)os $(TargetOS)</InnerBuildArgs>
<InnerBuildArgs Condition="'$(TargetArch)' != '$(_hostArch)' and '$(ShortStack)' != 'true'">$(InnerBuildArgs) $(FlagParameterPrefix)cross</InnerBuildArgs>
<InnerBuildArgs Condition="'$(CrossBuild)' == 'true' or ('$(TargetArch)' != '$(_hostArch)' and '$(ShortStack)' != 'true')">$(InnerBuildArgs) $(FlagParameterPrefix)cross</InnerBuildArgs>
<InnerBuildArgs>$(InnerBuildArgs) $(FlagParameterPrefix)configuration $(Configuration)</InnerBuildArgs>
<InnerBuildArgs Condition="'$(ShortStack)' != 'true'">$(InnerBuildArgs) $(FlagParameterPrefix)allconfigurations</InnerBuildArgs>
<InnerBuildArgs>$(InnerBuildArgs) $(FlagParameterPrefix)verbosity $(LogVerbosity)</InnerBuildArgs>
Expand Down
10 changes: 5 additions & 5 deletions src/coreclr/inc/jiteeversionguid.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ typedef const GUID *LPCGUID;
#define GUID_DEFINED
#endif // !GUID_DEFINED

constexpr GUID JITEEVersionIdentifier = { /* 35afdf61-5417-4bd7-9302-48efa2507603 */
0x35afdf61,
0x5417,
0x4bd7,
{0x93, 0x02, 0x48, 0xef, 0xa2, 0x50, 0x76, 0x03}
constexpr GUID JITEEVersionIdentifier = { /* 6fd660c7-96be-4832-a84c-4200141f7d08 */
0x6fd660c7,
0x96be,
0x4832,
{0xa8, 0x4c, 0x42, 0x00, 0x14, 0x1f, 0x7d, 0x08}
};

//////////////////////////////////////////////////////////////////////////////////////////////////////////
Expand Down
10 changes: 0 additions & 10 deletions src/coreclr/jit/fgbasic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6012,11 +6012,6 @@ BasicBlock* Compiler::fgNewBBbefore(BBKinds jumpKind, BasicBlock* block, bool ex

newBlk->bbRefs = 0;

if (newBlk->bbFallsThrough() && block->isRunRarely())
{
newBlk->bbSetRunRarely();
}

if (extendRegion)
{
fgExtendEHRegionBefore(block);
Expand Down Expand Up @@ -6051,11 +6046,6 @@ BasicBlock* Compiler::fgNewBBafter(BBKinds jumpKind, BasicBlock* block, bool ext

newBlk->bbRefs = 0;

if (block->bbFallsThrough() && block->isRunRarely())
{
newBlk->bbSetRunRarely();
}

if (extendRegion)
{
fgExtendEHRegionAfter(block);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ The .NET Foundation licenses this file to you under the MIT license.

<Target Name="ComputeIlcCompileInputs" DependsOnTargets="$(IlcDynamicBuildPropertyDependencies)" BeforeTargets="Publish">
<ItemGroup>
<ManagedBinary Condition="$(BuildingFrameworkLibrary) != 'true'" Include="$(IntermediateOutputPath)$(TargetName)$(TargetExt)" />
<ManagedBinary Condition="$(BuildingFrameworkLibrary) != 'true'" Include="@(IntermediateAssembly)" />
<IlcCompileInput Include="@(ManagedBinary)" />
<IlcReference Include="@(DefaultFrameworkAssemblies)" />
</ItemGroup>
Expand Down
3 changes: 3 additions & 0 deletions src/coreclr/nativeaot/BuildIntegration/findvcvarsall.bat
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ IF /I "%~1"=="arm64" (
SET vcEnvironment=x86_arm64
IF /I "%procArch%"=="AMD64" SET vcEnvironment=amd64_arm64
)
IF /I "%~1"=="x86" (
IF /I "%procArch%"=="AMD64" SET vcEnvironment=amd64_x86
)

CALL "%vsBase%\vc\Auxiliary\Build\vcvarsall.bat" %vcEnvironment% > NUL

Expand Down
25 changes: 22 additions & 3 deletions src/coreclr/scripts/superpmi.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,10 @@
Compile only specified method contexts, e.g., `-compile 20,25`. This is passed directly to the superpmi.exe `-compile` argument. See `superpmi.exe -?` for full documentation about allowed formats.
"""

produce_repro_help = """\
If passed, produce the *.mc repro files.
"""

# Start of parser object creation.

parser = argparse.ArgumentParser(description=description)
Expand Down Expand Up @@ -323,6 +327,7 @@ def add_core_root_arguments(parser, build_type_default, build_type_help):
replay_common_parser.add_argument("-jit_ee_version", help=jit_ee_version_help)
replay_common_parser.add_argument("-private_store", action="append", help=private_store_help)
replay_common_parser.add_argument("-compile", "-c", help=compile_help)
replay_common_parser.add_argument("--produce_repro", action="store_true", help=produce_repro_help)

# subparser for replay
replay_parser = subparsers.add_parser("replay", description=replay_description, parents=[core_root_parser, target_parser, superpmi_common_parser, replay_common_parser])
Expand Down Expand Up @@ -1500,6 +1505,7 @@ def save_repro_mc_files(temp_location, coreclr_args, artifacts_base_name, repro_
""" For commands that use the superpmi "-r" option to create "repro" .mc files, copy these to a
location where they are saved (and not in a "temp" directory) for easy use by the user.
"""

# If there are any .mc files, drop them into artifacts/repro/<host_os>.<arch>.<build_type>/*.mc
mc_files = [os.path.join(temp_location, item) for item in os.listdir(temp_location) if item.endswith(".mc")]
if len(mc_files) > 0:
Expand Down Expand Up @@ -1643,10 +1649,14 @@ def replay(self):
repro_flags = []

common_flags = [
"-v", "ewi", # display errors, warnings, missing, jit info
"-r", os.path.join(temp_location, "repro") # Repro name prefix, create .mc repro files
"-v", "ewi" # display errors, warnings, missing, jit info
]

if self.coreclr_args.produce_repro:
common_flags += [
"-r", os.path.join(temp_location, "repro") # Repro name prefix, create .mc repro files
]

if self.coreclr_args.altjit:
repro_flags += [
"-jitoption", "force", "AltJit=*",
Expand Down Expand Up @@ -2151,8 +2161,12 @@ def replay_with_asm_diffs(self):
"-v", "ewi", # display errors, warnings, missing, jit info
"-f", fail_mcl_file, # Failing mc List
"-details", detailed_info_file, # Detailed information about each context
"-r", os.path.join(temp_location, "repro"), # Repro name prefix, create .mc repro files
]
if self.coreclr_args.produce_repro:
flags += [
"-r", os.path.join(temp_location, "repro") # Repro name prefix, create .mc repro files
]

flags += altjit_asm_diffs_flags
flags += base_option_flags
flags += diff_option_flags
Expand Down Expand Up @@ -4482,6 +4496,11 @@ def verify_replay_common_args():
lambda unused: True,
"Method context not valid")

coreclr_args.verify(args,
"produce_repro",
lambda unused: True,
"Unable to set produce_repro")

coreclr_args.verify(args,
"private_store",
lambda item: True,
Expand Down
4 changes: 2 additions & 2 deletions src/coreclr/tools/superpmi/superpmi-shared/agnostic.h
Original file line number Diff line number Diff line change
Expand Up @@ -429,8 +429,8 @@ struct Agnostic_EmbedGenericHandle

struct Agnostic_ExpandRawHandleIntrinsic
{
Agnostic_CORINFO_RESOLVED_TOKEN ResolvedToken;
DWORDLONG hCallerHandle;
Agnostic_CORINFO_RESOLVED_TOKENin ResolvedToken;
DWORDLONG hCallerHandle;
};

struct Agnostic_CORINFO_GENERICHANDLE_RESULT
Expand Down
7 changes: 4 additions & 3 deletions src/coreclr/tools/superpmi/superpmi-shared/methodcontext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1677,7 +1677,7 @@ void MethodContext::recExpandRawHandleIntrinsic(CORINFO_RESOLVED_TOKEN* pResolve

Agnostic_ExpandRawHandleIntrinsic key;
ZeroMemory(&key, sizeof(key)); // Zero key including any struct padding
key.ResolvedToken = SpmiRecordsHelper::StoreAgnostic_CORINFO_RESOLVED_TOKEN(pResolvedToken, ExpandRawHandleIntrinsic);
key.ResolvedToken = SpmiRecordsHelper::CreateAgnostic_CORINFO_RESOLVED_TOKENin(pResolvedToken);
key.hCallerHandle = CastHandle(callerHandle);

Agnostic_CORINFO_GENERICHANDLE_RESULT value;
Expand All @@ -1691,7 +1691,7 @@ void MethodContext::recExpandRawHandleIntrinsic(CORINFO_RESOLVED_TOKEN* pResolve
void MethodContext::dmpExpandRawHandleIntrinsic(const Agnostic_ExpandRawHandleIntrinsic& key, const Agnostic_CORINFO_GENERICHANDLE_RESULT& result)
{
printf("ExpandRawHandleIntrinsic key: %s, value %s cth-%016" PRIx64 " ht-%u",
SpmiDumpHelper::DumpAgnostic_CORINFO_RESOLVED_TOKEN(key.ResolvedToken).c_str(),
SpmiDumpHelper::DumpAgnostic_CORINFO_RESOLVED_TOKENin(key.ResolvedToken).c_str(),
SpmiDumpHelper::DumpAgnostic_CORINFO_LOOKUP(result.lookup).c_str(),
result.compileTimeHandle,
result.handleType);
Expand All @@ -1701,7 +1701,7 @@ void MethodContext::repExpandRawHandleIntrinsic(CORINFO_RESOLVED_TOKEN* pResolve
Agnostic_ExpandRawHandleIntrinsic key;
ZeroMemory(&key, sizeof(key)); // Zero key including any struct padding

key.ResolvedToken = SpmiRecordsHelper::RestoreAgnostic_CORINFO_RESOLVED_TOKEN(pResolvedToken, ExpandRawHandleIntrinsic);
key.ResolvedToken = SpmiRecordsHelper::CreateAgnostic_CORINFO_RESOLVED_TOKENin(pResolvedToken);
key.hCallerHandle = CastHandle(callerHandle);

Agnostic_CORINFO_GENERICHANDLE_RESULT value =
Expand Down Expand Up @@ -3153,6 +3153,7 @@ void MethodContext::repEmbedGenericHandle(CORINFO_RESOLVED_TOKEN* pResolve
ZeroMemory(&key, sizeof(key)); // Zero key including any struct padding
key.ResolvedToken = SpmiRecordsHelper::RestoreAgnostic_CORINFO_RESOLVED_TOKEN(pResolvedToken, EmbedGenericHandle);
key.fEmbedParent = (DWORD)fEmbedParent;
key.hCallerHandle = CastHandle(callerHandle);

Agnostic_CORINFO_GENERICHANDLE_RESULT value = LookupByKeyOrMissNoMessage(EmbedGenericHandle, key);

Expand Down
Loading

0 comments on commit cc969ac

Please sign in to comment.