* SPMI: Add a buffer to FileWriter
We are spending a significant amount of time writing the details CSV
file now that the list of metadata has grown quite a bit. This was
especially noticeable during asmdiffs where we write a column for both
the base and diff JIT for each metadata key.
A lot of that cost was coming down to the fact that `FileWriter` was
unbuffered. This adds a buffer to it to cut down on the number of
syscalls performed.
Ideally we would probably switch to std::ostream now that using STL
should be doable, but I'm not adventurous enough to make that change
right now.
* Add --parallelism to superpmi.py
Since `server.port` is required, we should not omit it for default ports in `http.client.request.duration`.
For consistency, this PR also makes `http.client.connection.duration` and `http.client.open_connections` REQUIRED, meaning port will be uncoditionally present in those metrics too.
Resolves#94829.
* check to see if XSTATE is defined on ARM64
* fix for the linux arm32 case
---------
Co-authored-by: Mikelle Rogers <mikellerogers@Mikelles-MacBook-Pro.local>
* Decompose some bitwise operations in HIR to allow more overall optimizations to kick in
* Ensure that we actually remove the underlying op
* Ensure the AND_NOT decomposition is still folded during import for minopts
* Ensure we propagate AllBitsSet into simd GT_XOR on xarch
* Ensure that we prefer AndNot over TernaryLogic
* Cleanup the TernaryLogic lowering code
* Ensure that TernaryLogic picks the best operand for containment
* Ensure we swap the operands that are being checked for containment
* Ensure that TernaryLogic is simplified where possible
* Apply formatting patch
In the past we added FEATURE_64BIT_ALIGNMENT to support 8 byte alignment
requirements on ARM, but for performance we also like to 8 byte align
double arrays on other architectures. The GC has a GC_ALLOC_ALIGN8 flag
that does that but it was only being used in the ARM case and we had
a more complicated workaround being used elsewhere. This change expands
GC_ALLOC_ALIGN8 so it is supported on all architectures and converges
all our aligned double arrays to use that approach.
GC_ALLOC_ALIGN8 only implies that the initial allocation is 8 byte
aligned, not that it will stay aligned after relocation. On ARM it will
stay aligned because RESPECT_LARGE_ALIGNMENT is defined but
on other 32 bit architectures it is not guaranteed to stay aligned.
* Second attempt at fixing ARM64 cross compilation
* Update eng/native/init-vs-env.cmd
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
* Remove x86 branch
* Revert to using __HostArch when determining toolset.
* Address feedback.
* Update eng/native/init-vs-env.cmd
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
* Update eng/native/init-vs-env.cmd
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
* Revert "Update eng/native/init-vs-env.cmd"
This reverts commit a1b95c1942c244ae10f2113fc89dfa821dba4fff.
* Revert "Update eng/native/init-vs-env.cmd"
This reverts commit 1eeadb38d28a4f484382ae345e57684f8c56da6e.
* Set the correct arm64 assembler host
---------
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
* JIT: defer creating throw helper code until we know it's needed
Defer creation of throw helper code until the stack level setter analysis has\
determined the throw helper is needed. Defer finalizing the outgoing arg size
as well.
The throw helper support now goes through the steps:
* early on phases can request that a throw helper block get created
* we create the blocks (but not the code) before final block layout so
they get proper placement
* lowering adds references to throw helpers that are actually needed
* stack level setter then materializes code for the needed helpers, and
removes the blocks for the unneeded ones
* we can then finalize the outgoing arg space size
Closes#104658.
* When searching for a variant interface, use a special 'variant search table' that contains only variant interfaces in the correct search order, and perform the search by doing two passes per class
* Add missing interfaces to set of array special interfaces in mono
* Don't dereference random memory if get_virtual_method fails in interp
* Add regression test
* Update reason why variance test is disabled
* Add WS2022 to OsSupport check for Bidirectional Streaming
* Enable the disabled test
* Add helper property to PlatformDetection.Windows for WS2022
* Use helper property for WS2022
- Remove `FEATURE_SET_FLAGS`
- Remove `GenTree::gtRequestSetFlags`
- Remove all manipulation of `GTF_SET_FLAGS` from morph
- Switch arm32 to be similar to other backends: only set
`GTF_SET_FLAGS` on IR nodes that need to set flags that upcoming
nodes may use. Do not set it for IR nodes whose internal codegen sets
and uses flags.
- Fixes https://github.com/dotnet/runtime/issues/98955
We will now produce a warning when a non-assembly-qualified type
flows into a string location annotated with
DynamicallyAccessedMembers, and we don't try to look up or mark the
type (since we don't know which assemblies will be searched at
runtime by the Type.GetType call).
- Fixes https://github.com/dotnet/runtime/issues/103906
The ILLink intrinsic handling for `Type.GetType` will now look in
corelib for generic arguments, matching native AOT.
This replaces the existing warning IL2105. This uses a new warning
instead of repurposing IL2105, because we already documented IL2105
and older versions of ILLink will produce it. Best to avoid any
confusion about them.
* STJ: Support serialization callbacks for collection and dictionary types
* Fix tests
* Update src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Converters/Collection/JsonCollectionConverter.cs
Co-authored-by: Eirik Tsarpalis <eirik.tsarpalis@gmail.com>
* Update src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Converters/Collection/JsonDictionaryConverter.cs
Co-authored-by: Eirik Tsarpalis <eirik.tsarpalis@gmail.com>
* Reverse Kind logic to be more future proof
* Trigger callbacks before writing any JSON or metadata content
* Add JsonTypeInfo tests
* Call OnSerializing before any writing operation
* Keep result as variable name for partial operations
* Prevent setting OnDeserialize callback on immutable types
* Avoid using reflection when possible
* Set IsImmutableType for all converters overriding ConvertCollection
* Rename to IsImmutableCollectionType
* Remove extra empty lines
* Rename exception message
* Rename immutable -> convertible and fix issue around callback use for struct types
---------
Co-authored-by: Eirik Tsarpalis <eirik.tsarpalis@gmail.com>
* Fix zlib-ng build failure caught in the sdk repo.
Fixed by converting its NativeLibrary entry in Microsoft.NETCore.Native.Unix.targets to a NetCoreAppNativeLibrary, and place it after System.IO.Compression.Native, to ensure the linker detects the symbols, since it is unable to look back.
* Guard the call to `IsDefined(typeof(CompilerGeneratedAttribute))` from throwing.
An `IsDefinedSafe` method was added that returns false if checking for the attribute throws, and other usages in the file were updated as well. This also allows us to remove a big try catch block.
* Guard getting the `StateMachineAttribute`s from throwing.
Applications should include <procfs.h> not <sys/procfs.h>
If there's actually some need to directly include sys/procfs.h
then one should #define _STRUCTURED_PROC 1
as explained in the procfs.h file
* Disable (No)ClientCert_DefaultValue_ResumeSucceeds only on Ubuntu 18 ARM
* Update ubuntu images to 20.04 instead
* Use Ubuntu 22.04
* Revert "Use Ubuntu 22.04"
This reverts commit 0d421162f420cc1d1107b80453e787c8013da864.
Our target ISA is rv64gc, not gcv. If kernel can't detect RISC-V extensions, zlib-ng defaults has_rvv to true, which crashes on hardware without vector instructions like VisionFive 2.
When strength reduction has to find an insertion point for the new
primary IV update it needs to find a block that post-dominates all the
users of the IV. This was using `optReachable` before, but that is
conservative since it finds paths that may exit the loop. This
implements a more precise check.
* Bump the stj version to avoid error
* System.Net.Http.Json does not have version 8.0.4, changing to net9 prev 5
---------
Co-authored-by: Ilona Tomkowicz <32700855+ilonatommy@users.noreply.github.com>
* Rent object[] rather than (uint,uint)[][] from the ArrayPool
* Remove unnecessary TInputReader generic from functions
* Add more comments and do some renames
* Remove unused TFindOptimizationsHandler from FindEndPositionDeltasNFA
* Fix a stray input reader
* Some more renames
* Avoid duplicated reads of input character and nullability info
* Remove initialStateId from TryFindNextStartingPosition and make initial accelerators more similar
* Remove unused initialStatePos / initialStatePosCandidate
It's only ever written and not actually used for anything.
* Remove unnecessary generic args and remove resulting dead code
Multiple XxDfa / XxNfa methods took a TStateHandler, but it was only ever DfaStateHandler for XxDfa or NfaStateHandler for XxNfa. We can just use the types directly in those methods, rather than generically parameterizing. Doing that revealed all but one of the members of IStateHandler weren't needed on the interface. And removing those revealed a bunch of dead code on DfaStateHandler/NfaStateHandler, which were removed, as well as arguments to some methods that weren't used.
* Put GetStateFlags back in IStateHandler and use it to avoid duplication at call sites
* Put out argument last in TryCreateNewTransition
* Store state to local in FindStartPositionDeltasDFA
* Merge IAcceleratedStateHandler into IInitialStateHandler
* Remove MintermClassifier.IntLookup
* System.Runtime.Serialization.Formatters: fix target framework check for source-build.
The inbox implementation should no longer include a working binary formatter.
The check used to build a working formatter was '$(TargetFramework)' == '$(NetCoreAppMinimum)'.
Because NetCoreAppMinimum gets set to TargetFramework in the source-build configuration,
the source-build configuration unintentionally included a working binary formatter.
* Don't build the net8.0 target when DotNetBuildSourceOnly.
* Join lines.
* enable ShortDatePattern tests + refactor
* LongDatePattern correct format
* LongDatePattern tests
* fix EnumDatePatterns AddRange for Apple Hybrid
* remove duplicate invariant ShorDatePattern test
* remove duplicate en-US LongDatePattern case
* MonthDayPattern test cases
* add _ICU suffix to DatePattern names
* DayNames ICU test cases
* AbbreviatedDayNames ICU tests
* Move GetCalendarInfoNative to EnumCalendarInfo ICU
* MonthNames test suit for ICU
* AbbreviatedMonthGenitiveNames ICU test suit
* AbbreviatedMonthNames ICU test suit
* MonthGenitive ICU test suit
* refactor CalendarData.iOS.cs
to use more of the shared CalendarData.ICU code
* refactor new DateTiemFormatInfo* API tests
* Throw HttpProtocolException in case we get a GOAWAY frame while waiting for next frame on response
* Fix helper method names
* Apply suggestions from code review
Co-authored-by: Miha Zupan <mihazupan.zupan1@gmail.com>
* Code review feedback
* Revert method names
* Fix test with the new behavior
---------
Co-authored-by: Miha Zupan <mihazupan.zupan1@gmail.com>
* Fix ISOSDACInterface::GetThreadData reading the GC alloc context.
The RuntimeThreadLocals struct that the gc_alloc_context is in wasn't being added
to dump in Thread::EnumMemoryRegions.