Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 4 additions & 4 deletions src/coreclr/tools/dotnet-pgo/CommandLineOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ internal class CommandLineOptions
public bool IncludeFullGraphs;
public int SpgoMinSamples = 50;
public bool VerboseWarnings;
public jittraceoptions JitTraceOptions;
public JitTraceOptions JitTraceOptions;
public double ExcludeEventsBefore;
public double ExcludeEventsAfter;
public bool Warnings;
Expand Down Expand Up @@ -211,7 +211,7 @@ void HelpOption()
HelpOption();
}

JitTraceOptions = jittraceoptions.none;
JitTraceOptions = JitTraceOptions.none;
#if DEBUG
// Usage of the jittrace format requires using logic embedded in the runtime repository and isn't suitable for general consumer use at this time
// Build it in debug and check builds to ensure that it doesn't bitrot, and remains available for use by developers willing to build the repo
Expand All @@ -230,14 +230,14 @@ void HelpOption()
syntax.DefineOption(name: "sorted", value: ref sorted, help: "Generate sorted output.", requireValue: false);
if (sorted)
{
JitTraceOptions |= jittraceoptions.sorted;
JitTraceOptions |= JitTraceOptions.sorted;
}

bool showtimestamp = false;
syntax.DefineOption(name: "showtimestamp", value: ref showtimestamp, help: "Show timestamps in output.", requireValue: false);
if (showtimestamp)
{
JitTraceOptions |= jittraceoptions.showtimestamp;
JitTraceOptions |= JitTraceOptions.showtimestamp;
}

syntax.DefineOption(name: "includeReadyToRun", value: ref ProcessR2REvents, help: "Include ReadyToRun methods in the trace file.", requireValue: false);
Expand Down
8 changes: 4 additions & 4 deletions src/coreclr/tools/dotnet-pgo/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public enum PgoFileType
}

[Flags]
public enum jittraceoptions
public enum JitTraceOptions
{
none = 0,
sorted = 1,
Expand Down Expand Up @@ -1650,7 +1650,7 @@ void AddToInstrumentationData(int eventClrInstanceId, long methodID, int methodF
return 0;
}

static void GenerateJittraceFile(FileInfo outputFileName, IEnumerable<ProcessedMethodData> methodsToAttemptToPrepare, jittraceoptions jittraceOptions)
static void GenerateJittraceFile(FileInfo outputFileName, IEnumerable<ProcessedMethodData> methodsToAttemptToPrepare, JitTraceOptions jittraceOptions)
{
PrintMessage($"JitTrace options {jittraceOptions}");

Expand All @@ -1677,7 +1677,7 @@ static void GenerateJittraceFile(FileInfo outputFileName, IEnumerable<ProcessedM
try
{
string timeStampAddon = "";
if (jittraceOptions.HasFlag(jittraceoptions.showtimestamp))
if (jittraceOptions.HasFlag(JitTraceOptions.showtimestamp))
timeStampAddon = time.ToString("F4") + "-";

methodPrepareInstruction.Append(CsvEscape(timeStampAddon + method.ToString(), outerCsvEscapeChar));
Expand Down Expand Up @@ -1712,7 +1712,7 @@ static void GenerateJittraceFile(FileInfo outputFileName, IEnumerable<ProcessedM
}
}

if (jittraceOptions.HasFlag(jittraceoptions.sorted))
if (jittraceOptions.HasFlag(JitTraceOptions.sorted))
{
methodsToPrepare.Sort();
}
Expand Down
6 changes: 3 additions & 3 deletions src/libraries/Common/src/Interop/Interop.Ldap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,19 +120,19 @@ internal sealed class LDAP_TIMEVAL
}

[StructLayout(LayoutKind.Sequential)]
internal sealed class berval
internal sealed class BerVal
{
public int bv_len;
public IntPtr bv_val = IntPtr.Zero;

public berval() { }
public BerVal() { }
}

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
internal sealed class LdapControl
{
public IntPtr ldctl_oid = IntPtr.Zero;
public berval ldctl_value;
public BerVal ldctl_value;
public bool ldctl_iscritical;

public LdapControl() { }
Expand Down
2 changes: 1 addition & 1 deletion src/libraries/Common/src/Interop/Interop.zlib.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

internal static partial class Interop
{
internal static partial class zlib
internal static partial class ZLib
{
[GeneratedDllImport(Libraries.CompressionNative, EntryPoint = "CompressionNative_DeflateInit2_")]
internal static unsafe partial ZLibNative.ErrorCode DeflateInit2_(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ internal static partial class Ldap
#pragma warning disable DLLIMPORTGENANALYZER015 // Use 'GeneratedDllImportAttribute' instead of 'DllImportAttribute' to generate P/Invoke marshalling code at compile time
// TODO: [DllImportGenerator] Switch to use GeneratedDllImport once we support non-blittable structs.
[DllImport(Libraries.OpenLdap, EntryPoint = "ber_init", CharSet = CharSet.Ansi)]
public static extern IntPtr ber_init(berval value);
public static extern IntPtr ber_init(BerVal value);
#pragma warning restore DLLIMPORTGENANALYZER015

[GeneratedDllImport(Libraries.OpenLdap, EntryPoint = "ber_free", CharSet = CharSet.Ansi)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ static Ldap()
#pragma warning disable DLLIMPORTGENANALYZER015 // Use 'GeneratedDllImportAttribute' instead of 'DllImportAttribute' to generate P/Invoke marshalling code at compile time
// TODO: [DllImportGenerator] Switch to use GeneratedDllImport once we support non-blittable structs.
[DllImport(Libraries.OpenLdap, EntryPoint = "ldap_sasl_bind_s", CharSet = CharSet.Ansi)]
internal static extern int ldap_sasl_bind(ConnectionHandle ld, string dn, string mechanism, berval cred, IntPtr serverctrls, IntPtr clientctrls, IntPtr servercredp);
internal static extern int ldap_sasl_bind(ConnectionHandle ld, string dn, string mechanism, BerVal cred, IntPtr serverctrls, IntPtr clientctrls, IntPtr servercredp);
#pragma warning restore DLLIMPORTGENANALYZER015 // Use 'GeneratedDllImportAttribute' instead of 'DllImportAttribute' to generate P/Invoke marshalling code at compile time

[GeneratedDllImport(Libraries.OpenLdap, EntryPoint = "ldap_sasl_interactive_bind_s", CharSet = CharSet.Ansi)]
Expand All @@ -176,7 +176,7 @@ static Ldap()
#pragma warning disable DLLIMPORTGENANALYZER015 // Use 'GeneratedDllImportAttribute' instead of 'DllImportAttribute' to generate P/Invoke marshalling code at compile time
// TODO: [DllImportGenerator] Switch to use GeneratedDllImport once we support non-blittable structs.
[DllImport(Libraries.OpenLdap, EntryPoint = "ldap_extended_operation", CharSet = CharSet.Ansi)]
public static extern int ldap_extended_operation(ConnectionHandle ldapHandle, string oid, berval data, IntPtr servercontrol, IntPtr clientcontrol, ref int messageNumber);
public static extern int ldap_extended_operation(ConnectionHandle ldapHandle, string oid, BerVal data, IntPtr servercontrol, IntPtr clientcontrol, ref int messageNumber);
#pragma warning restore DLLIMPORTGENANALYZER015 // Use 'GeneratedDllImportAttribute' instead of 'DllImportAttribute' to generate P/Invoke marshalling code at compile time

[GeneratedDllImport(Libraries.OpenLdap, EntryPoint = "ldap_first_attribute", CharSet = CharSet.Ansi)]
Expand Down Expand Up @@ -236,7 +236,7 @@ static Ldap()
#pragma warning disable DLLIMPORTGENANALYZER015 // Use 'GeneratedDllImportAttribute' instead of 'DllImportAttribute' to generate P/Invoke marshalling code at compile time
// TODO: [DllImportGenerator] Switch to use GeneratedDllImport once we support non-blittable structs.
[DllImport(Libraries.OpenLdap, EntryPoint = "ldap_compare_ext", CharSet = CharSet.Ansi)]
public static extern int ldap_compare(ConnectionHandle ldapHandle, string dn, string attributeName, berval binaryValue, IntPtr servercontrol, IntPtr clientcontrol, ref int messageNumber);
public static extern int ldap_compare(ConnectionHandle ldapHandle, string dn, string attributeName, BerVal binaryValue, IntPtr servercontrol, IntPtr clientcontrol, ref int messageNumber);
#pragma warning restore DLLIMPORTGENANALYZER015 // Use 'GeneratedDllImportAttribute' instead of 'DllImportAttribute' to generate P/Invoke marshalling code at compile time
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
internal static partial class Interop
{
/// <summary>Provides access to some cgroup (v1 and v2) features</summary>
internal static partial class cgroups
internal static partial class @cgroups
{
// For cgroup v1, see https://www.kernel.org/doc/Documentation/cgroup-v1/
// For cgroup v2, see https://www.kernel.org/doc/Documentation/cgroup-v2.txt
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

internal static partial class Interop
{
internal static partial class procfs
internal static partial class @procfs
{
internal const string RootPath = "/proc/";
private const string StatusFileName = "/status";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

internal static partial class Interop
{
internal static partial class procfs
internal static partial class @procfs
{
private const string ExeFileName = "/exe";
private const string CmdLineFileName = "/cmdline";
Expand Down
17 changes: 0 additions & 17 deletions src/libraries/Common/src/Interop/Windows/WinSock/hostent.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ internal static partial class Ldap
// TODO: [DllImportGenerator] Switch to use GeneratedDllImport once we support non-blittable structs.
[DllImport(Libraries.Wldap32, EntryPoint = "ber_init", CharSet = CharSet.Unicode)]
[UnmanagedCallConv(CallConvs = new Type[] { typeof(System.Runtime.CompilerServices.CallConvCdecl) })]
public static extern IntPtr ber_init(berval value);
public static extern IntPtr ber_init(BerVal value);
#pragma warning restore DLLIMPORTGENANALYZER015 // Use 'GeneratedDllImportAttribute' instead of 'DllImportAttribute' to generate P/Invoke marshalling code at compile time

#pragma warning disable DLLIMPORTGENANALYZER015 // Use 'GeneratedDllImportAttribute' instead of 'DllImportAttribute' to generate P/Invoke marshalling code at compile time
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ internal static partial class Ldap
// TODO: [DllImportGenerator] Switch to use GeneratedDllImport once we support non-blittable structs.
[DllImport(Libraries.Wldap32, EntryPoint = "ldap_compare_extW", CharSet = CharSet.Unicode)]
[UnmanagedCallConv(CallConvs = new Type[] { typeof(System.Runtime.CompilerServices.CallConvCdecl) })]
public static extern int ldap_compare(ConnectionHandle ldapHandle, string dn, string attributeName, string strValue, berval binaryValue, IntPtr servercontrol, IntPtr clientcontrol, ref int messageNumber);
public static extern int ldap_compare(ConnectionHandle ldapHandle, string dn, string attributeName, string strValue, BerVal binaryValue, IntPtr servercontrol, IntPtr clientcontrol, ref int messageNumber);
#pragma warning restore DLLIMPORTGENANALYZER015 // Use 'GeneratedDllImportAttribute' instead of 'DllImportAttribute' to generate P/Invoke marshalling code at compile time

[GeneratedDllImport(Libraries.Wldap32, EntryPoint = "ldap_add_extW", CharSet = CharSet.Unicode)]
Expand All @@ -148,7 +148,7 @@ internal static partial class Ldap
// TODO: [DllImportGenerator] Switch to use GeneratedDllImport once we support non-blittable structs.
[DllImport(Libraries.Wldap32, EntryPoint = "ldap_extended_operationW", CharSet = CharSet.Unicode)]
[UnmanagedCallConv(CallConvs = new Type[] { typeof(System.Runtime.CompilerServices.CallConvCdecl) })]
public static extern int ldap_extended_operation(ConnectionHandle ldapHandle, string oid, berval data, IntPtr servercontrol, IntPtr clientcontrol, ref int messageNumber);
public static extern int ldap_extended_operation(ConnectionHandle ldapHandle, string oid, BerVal data, IntPtr servercontrol, IntPtr clientcontrol, ref int messageNumber);
#pragma warning restore DLLIMPORTGENANALYZER015 // Use 'GeneratedDllImportAttribute' instead of 'DllImportAttribute' to generate P/Invoke marshalling code at compile time

[GeneratedDllImport(Libraries.Wldap32, EntryPoint = "ldap_parse_extended_resultW", CharSet = CharSet.Unicode)]
Expand Down
16 changes: 8 additions & 8 deletions src/libraries/Common/src/System/IO/Compression/ZLibNative.cs
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ public unsafe ErrorCode DeflateInit2_(CompressionLevel level, int windowBits, in

fixed (ZStream* stream = &_zStream)
{
ErrorCode errC = Interop.zlib.DeflateInit2_(stream, level, CompressionMethod.Deflated, windowBits, memLevel, strategy);
ErrorCode errC = Interop.ZLib.DeflateInit2_(stream, level, CompressionMethod.Deflated, windowBits, memLevel, strategy);
_initializationState = State.InitializedForDeflate;

return errC;
Expand All @@ -284,7 +284,7 @@ public unsafe ErrorCode Deflate(FlushCode flush)

fixed (ZStream* stream = &_zStream)
{
return Interop.zlib.Deflate(stream, flush);
return Interop.ZLib.Deflate(stream, flush);
}
}

Expand All @@ -296,7 +296,7 @@ public unsafe ErrorCode DeflateReset()

fixed (ZStream* stream = &_zStream)
{
return Interop.zlib.DeflateReset(stream);
return Interop.ZLib.DeflateReset(stream);
}
}

Expand All @@ -307,7 +307,7 @@ public unsafe ErrorCode DeflateEnd()

fixed (ZStream* stream = &_zStream)
{
ErrorCode errC = Interop.zlib.DeflateEnd(stream);
ErrorCode errC = Interop.ZLib.DeflateEnd(stream);
_initializationState = State.Disposed;

return errC;
Expand All @@ -322,7 +322,7 @@ public unsafe ErrorCode InflateInit2_(int windowBits)

fixed (ZStream* stream = &_zStream)
{
ErrorCode errC = Interop.zlib.InflateInit2_(stream, windowBits);
ErrorCode errC = Interop.ZLib.InflateInit2_(stream, windowBits);
_initializationState = State.InitializedForInflate;

return errC;
Expand All @@ -337,7 +337,7 @@ public unsafe ErrorCode Inflate(FlushCode flush)

fixed (ZStream* stream = &_zStream)
{
return Interop.zlib.Inflate(stream, flush);
return Interop.ZLib.Inflate(stream, flush);
}
}

Expand All @@ -349,7 +349,7 @@ public unsafe ErrorCode InflateReset()

fixed (ZStream* stream = &_zStream)
{
return Interop.zlib.InflateReset(stream);
return Interop.ZLib.InflateReset(stream);
}
}

Expand All @@ -360,7 +360,7 @@ public unsafe ErrorCode InflateEnd()

fixed (ZStream* stream = &_zStream)
{
ErrorCode errC = Interop.zlib.InflateEnd(stream);
ErrorCode errC = Interop.ZLib.InflateEnd(stream);
_initializationState = State.Disposed;

return errC;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
/// </summary>
namespace XmlCoreTest.Common
{
public class aaaa { };

public class AsyncUtil
{
public static bool IsAsyncEnabled
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public static partial class PlatformDetection
public static bool IsNotFedoraOrRedHatFamily => !IsFedora && !IsRedHatFamily;
public static bool IsNotDebian10 => !IsDebian10;

public static bool IsSuperUser => IsBrowser || IsWindows ? false : libc.geteuid() == 0;
public static bool IsSuperUser => IsBrowser || IsWindows ? false : Libc.geteuid() == 0;

public static Version OpenSslVersion => !IsOSXLike && !IsWindows && !IsAndroid ?
GetOpenSslVersion() :
Expand All @@ -70,7 +70,7 @@ public static string LibcRelease

try
{
return Marshal.PtrToStringAnsi(libc.gnu_get_libc_release());
return Marshal.PtrToStringAnsi(Libc.gnu_get_libc_release());
}
catch (Exception e) when (e is DllNotFoundException || e is EntryPointNotFoundException)
{
Expand All @@ -94,7 +94,7 @@ public static string LibcVersion

try
{
return Marshal.PtrToStringAnsi(libc.gnu_get_libc_version());
return Marshal.PtrToStringAnsi(Libc.gnu_get_libc_version());
}
catch (Exception e) when (e is DllNotFoundException || e is EntryPointNotFoundException)
{
Expand Down Expand Up @@ -317,7 +317,7 @@ private struct DistroInfo
public Version VersionId { get; set; }
}

private static partial class libc
private static partial class Libc
{
[GeneratedDllImport("libc", SetLastError = true)]
public static unsafe partial uint geteuid();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ internal static class LdapPal
internal static int AddDirectoryEntry(ConnectionHandle ldapHandle, string dn, IntPtr attrs, IntPtr servercontrol, IntPtr clientcontrol, ref int messageNumber) =>
Interop.Ldap.ldap_add(ldapHandle, dn, attrs, servercontrol, clientcontrol, ref messageNumber);

internal static int CompareDirectoryEntries(ConnectionHandle ldapHandle, string dn, string attributeName, string strValue, berval binaryValue, IntPtr servercontrol, IntPtr clientcontrol, ref int messageNumber) =>
internal static int CompareDirectoryEntries(ConnectionHandle ldapHandle, string dn, string attributeName, string strValue, BerVal binaryValue, IntPtr servercontrol, IntPtr clientcontrol, ref int messageNumber) =>
Interop.Ldap.ldap_compare(ldapHandle, dn, attributeName, binaryValue, servercontrol, clientcontrol, ref messageNumber);

internal static void FreeDirectoryControl(IntPtr control) => Interop.Ldap.ldap_control_free(control);
Expand All @@ -23,7 +23,7 @@ internal static int CompareDirectoryEntries(ConnectionHandle ldapHandle, string

internal static int DeleteDirectoryEntry(ConnectionHandle ldapHandle, string dn, IntPtr servercontrol, IntPtr clientcontrol, ref int messageNumber) => Interop.Ldap.ldap_delete_ext(ldapHandle, dn, servercontrol, clientcontrol, ref messageNumber);

internal static int ExtendedDirectoryOperation(ConnectionHandle ldapHandle, string oid, berval data, IntPtr servercontrol, IntPtr clientcontrol, ref int messageNumber) =>
internal static int ExtendedDirectoryOperation(ConnectionHandle ldapHandle, string oid, BerVal data, IntPtr servercontrol, IntPtr clientcontrol, ref int messageNumber) =>
Interop.Ldap.ldap_extended_operation(ldapHandle, oid, data, servercontrol, clientcontrol, ref messageNumber);

internal static IntPtr GetFirstAttributeFromEntry(ConnectionHandle ldapHandle, IntPtr result, ref IntPtr address) => Interop.Ldap.ldap_first_attribute(ldapHandle, result, ref address);
Expand Down Expand Up @@ -109,7 +109,7 @@ internal static int BindToDirectory(ConnectionHandle ld, string who, string pass
try
{
passwordPtr = LdapPal.StringToPtr(passwd);
berval passwordBerval = new berval
BerVal passwordBerval = new BerVal
{
bv_len = passwd.Length,
bv_val = passwordPtr,
Expand Down
Loading