Skip to content

Commit cc969ac

Browse files
authored
Merge branch 'main' into h2wsclientfix
2 parents f0d8d4d + 713e690 commit cc969ac

File tree

9 files changed

+213
-81
lines changed

9 files changed

+213
-81
lines changed

eng/DotNetBuild.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
Properties that control flags from the VMR build, and the expected output for the VMR build should be added to this file. -->
4848
<InnerBuildArgs>$(InnerBuildArgs) $(FlagParameterPrefix)arch $(TargetArch)</InnerBuildArgs>
4949
<InnerBuildArgs Condition="'$(DotNetBuildSourceOnly)' != 'true'">$(InnerBuildArgs) $(FlagParameterPrefix)os $(TargetOS)</InnerBuildArgs>
50-
<InnerBuildArgs Condition="'$(TargetArch)' != '$(_hostArch)' and '$(ShortStack)' != 'true'">$(InnerBuildArgs) $(FlagParameterPrefix)cross</InnerBuildArgs>
50+
<InnerBuildArgs Condition="'$(CrossBuild)' == 'true' or ('$(TargetArch)' != '$(_hostArch)' and '$(ShortStack)' != 'true')">$(InnerBuildArgs) $(FlagParameterPrefix)cross</InnerBuildArgs>
5151
<InnerBuildArgs>$(InnerBuildArgs) $(FlagParameterPrefix)configuration $(Configuration)</InnerBuildArgs>
5252
<InnerBuildArgs Condition="'$(ShortStack)' != 'true'">$(InnerBuildArgs) $(FlagParameterPrefix)allconfigurations</InnerBuildArgs>
5353
<InnerBuildArgs>$(InnerBuildArgs) $(FlagParameterPrefix)verbosity $(LogVerbosity)</InnerBuildArgs>

src/coreclr/inc/jiteeversionguid.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ typedef const GUID *LPCGUID;
4343
#define GUID_DEFINED
4444
#endif // !GUID_DEFINED
4545

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

5353
//////////////////////////////////////////////////////////////////////////////////////////////////////////

src/coreclr/jit/fgbasic.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6012,11 +6012,6 @@ BasicBlock* Compiler::fgNewBBbefore(BBKinds jumpKind, BasicBlock* block, bool ex
60126012

60136013
newBlk->bbRefs = 0;
60146014

6015-
if (newBlk->bbFallsThrough() && block->isRunRarely())
6016-
{
6017-
newBlk->bbSetRunRarely();
6018-
}
6019-
60206015
if (extendRegion)
60216016
{
60226017
fgExtendEHRegionBefore(block);
@@ -6051,11 +6046,6 @@ BasicBlock* Compiler::fgNewBBafter(BBKinds jumpKind, BasicBlock* block, bool ext
60516046

60526047
newBlk->bbRefs = 0;
60536048

6054-
if (block->bbFallsThrough() && block->isRunRarely())
6055-
{
6056-
newBlk->bbSetRunRarely();
6057-
}
6058-
60596049
if (extendRegion)
60606050
{
60616051
fgExtendEHRegionAfter(block);

src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ The .NET Foundation licenses this file to you under the MIT license.
168168

169169
<Target Name="ComputeIlcCompileInputs" DependsOnTargets="$(IlcDynamicBuildPropertyDependencies)" BeforeTargets="Publish">
170170
<ItemGroup>
171-
<ManagedBinary Condition="$(BuildingFrameworkLibrary) != 'true'" Include="$(IntermediateOutputPath)$(TargetName)$(TargetExt)" />
171+
<ManagedBinary Condition="$(BuildingFrameworkLibrary) != 'true'" Include="@(IntermediateAssembly)" />
172172
<IlcCompileInput Include="@(ManagedBinary)" />
173173
<IlcReference Include="@(DefaultFrameworkAssemblies)" />
174174
</ItemGroup>

src/coreclr/nativeaot/BuildIntegration/findvcvarsall.bat

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ IF /I "%~1"=="arm64" (
3333
SET vcEnvironment=x86_arm64
3434
IF /I "%procArch%"=="AMD64" SET vcEnvironment=amd64_arm64
3535
)
36+
IF /I "%~1"=="x86" (
37+
IF /I "%procArch%"=="AMD64" SET vcEnvironment=amd64_x86
38+
)
3639

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

src/coreclr/scripts/superpmi.py

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,10 @@
227227
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.
228228
"""
229229

230+
produce_repro_help = """\
231+
If passed, produce the *.mc repro files.
232+
"""
233+
230234
# Start of parser object creation.
231235

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

327332
# subparser for replay
328333
replay_parser = subparsers.add_parser("replay", description=replay_description, parents=[core_root_parser, target_parser, superpmi_common_parser, replay_common_parser])
@@ -1500,6 +1505,7 @@ def save_repro_mc_files(temp_location, coreclr_args, artifacts_base_name, repro_
15001505
""" For commands that use the superpmi "-r" option to create "repro" .mc files, copy these to a
15011506
location where they are saved (and not in a "temp" directory) for easy use by the user.
15021507
"""
1508+
15031509
# If there are any .mc files, drop them into artifacts/repro/<host_os>.<arch>.<build_type>/*.mc
15041510
mc_files = [os.path.join(temp_location, item) for item in os.listdir(temp_location) if item.endswith(".mc")]
15051511
if len(mc_files) > 0:
@@ -1643,10 +1649,14 @@ def replay(self):
16431649
repro_flags = []
16441650

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

1655+
if self.coreclr_args.produce_repro:
1656+
common_flags += [
1657+
"-r", os.path.join(temp_location, "repro") # Repro name prefix, create .mc repro files
1658+
]
1659+
16501660
if self.coreclr_args.altjit:
16511661
repro_flags += [
16521662
"-jitoption", "force", "AltJit=*",
@@ -2151,8 +2161,12 @@ def replay_with_asm_diffs(self):
21512161
"-v", "ewi", # display errors, warnings, missing, jit info
21522162
"-f", fail_mcl_file, # Failing mc List
21532163
"-details", detailed_info_file, # Detailed information about each context
2154-
"-r", os.path.join(temp_location, "repro"), # Repro name prefix, create .mc repro files
21552164
]
2165+
if self.coreclr_args.produce_repro:
2166+
flags += [
2167+
"-r", os.path.join(temp_location, "repro") # Repro name prefix, create .mc repro files
2168+
]
2169+
21562170
flags += altjit_asm_diffs_flags
21572171
flags += base_option_flags
21582172
flags += diff_option_flags
@@ -4482,6 +4496,11 @@ def verify_replay_common_args():
44824496
lambda unused: True,
44834497
"Method context not valid")
44844498

4499+
coreclr_args.verify(args,
4500+
"produce_repro",
4501+
lambda unused: True,
4502+
"Unable to set produce_repro")
4503+
44854504
coreclr_args.verify(args,
44864505
"private_store",
44874506
lambda item: True,

src/coreclr/tools/superpmi/superpmi-shared/agnostic.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -429,8 +429,8 @@ struct Agnostic_EmbedGenericHandle
429429

430430
struct Agnostic_ExpandRawHandleIntrinsic
431431
{
432-
Agnostic_CORINFO_RESOLVED_TOKEN ResolvedToken;
433-
DWORDLONG hCallerHandle;
432+
Agnostic_CORINFO_RESOLVED_TOKENin ResolvedToken;
433+
DWORDLONG hCallerHandle;
434434
};
435435

436436
struct Agnostic_CORINFO_GENERICHANDLE_RESULT

src/coreclr/tools/superpmi/superpmi-shared/methodcontext.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1677,7 +1677,7 @@ void MethodContext::recExpandRawHandleIntrinsic(CORINFO_RESOLVED_TOKEN* pResolve
16771677

16781678
Agnostic_ExpandRawHandleIntrinsic key;
16791679
ZeroMemory(&key, sizeof(key)); // Zero key including any struct padding
1680-
key.ResolvedToken = SpmiRecordsHelper::StoreAgnostic_CORINFO_RESOLVED_TOKEN(pResolvedToken, ExpandRawHandleIntrinsic);
1680+
key.ResolvedToken = SpmiRecordsHelper::CreateAgnostic_CORINFO_RESOLVED_TOKENin(pResolvedToken);
16811681
key.hCallerHandle = CastHandle(callerHandle);
16821682

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

1704-
key.ResolvedToken = SpmiRecordsHelper::RestoreAgnostic_CORINFO_RESOLVED_TOKEN(pResolvedToken, ExpandRawHandleIntrinsic);
1704+
key.ResolvedToken = SpmiRecordsHelper::CreateAgnostic_CORINFO_RESOLVED_TOKENin(pResolvedToken);
17051705
key.hCallerHandle = CastHandle(callerHandle);
17061706

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

31573158
Agnostic_CORINFO_GENERICHANDLE_RESULT value = LookupByKeyOrMissNoMessage(EmbedGenericHandle, key);
31583159

0 commit comments

Comments
 (0)