Skip to content

Commit

Permalink
Merge in 'release/6.0' changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dotnet-bot committed Apr 13, 2022
2 parents f3073db + bfe224f commit 0465a47
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
C++/CLI project system support.
-->
<ItemGroup>
<CrossArchSdkMsiInstallerArch Include="x86;x64" />
<CrossArchSdkMsiInstallerArch Include="x86;x64;arm64" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,13 @@ private void CheckForHttp11ConnectionInjection()
return;
}

if (NetEventSource.Log.IsEnabled())
{
Trace($"Available HTTP/1.1 connections: {_availableHttp11Connections.Count}, Requests in the queue: {_http11RequestQueue.Count}, " +
$"Pending HTTP/1.1 connections: {_pendingHttp11ConnectionCount}, Total associated HTTP/1.1 connections: {_associatedHttp11ConnectionCount}, " +
$"Max HTTP/1.1 connection limit: {_maxHttp11Connections}.");
}

// Determine if we can and should add a new connection to the pool.
if (_availableHttp11Connections.Count == 0 && // No available connections
_http11RequestQueue.Count > _pendingHttp11ConnectionCount && // More requests queued than pending connections
Expand Down Expand Up @@ -852,8 +859,10 @@ private async ValueTask<Http3Connection> GetHttp3ConnectionAsync(HttpRequestMess
{
quicConnection = await ConnectHelper.ConnectQuicAsync(request, Settings._quicImplementationProvider ?? QuicImplementationProviders.Default, new DnsEndPoint(authority.IdnHost, authority.Port), _sslOptionsHttp3!, cancellationToken).ConfigureAwait(false);
}
catch
catch (Exception e)
{
if (NetEventSource.Log.IsEnabled()) Trace($"QUIC connection failed: {e}");

// Disables HTTP/3 until server announces it can handle it via Alt-Svc.
BlocklistAuthority(authority);
throw;
Expand Down Expand Up @@ -1575,7 +1584,7 @@ private async ValueTask<Stream> EstablishProxyTunnelAsync(bool async, HttpReques

private void HandleHttp11ConnectionFailure(Exception e)
{
if (NetEventSource.Log.IsEnabled()) Trace("HTTP/1.1 connection failed");
if (NetEventSource.Log.IsEnabled()) Trace($"HTTP/1.1 connection failed: {e}");
lock (SyncObj)
{
Expand All @@ -1594,7 +1603,7 @@ private void HandleHttp11ConnectionFailure(Exception e)
private void HandleHttp2ConnectionFailure(Exception e)
{
if (NetEventSource.Log.IsEnabled()) Trace("HTTP2 connection failed");
if (NetEventSource.Log.IsEnabled()) Trace($"HTTP2 connection failed: {e}");
lock (SyncObj)
{
Expand Down
4 changes: 2 additions & 2 deletions src/mono/mono/mini/aot-runtime.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
#include <mono/utils/mono-threads-coop.h>
#include <mono/utils/bsearch.h>
#include <mono/utils/mono-tls-inline.h>
#include <mono/utils/options.h>

#include "mini.h"
#include "seq-points.h"
Expand Down Expand Up @@ -1895,7 +1896,6 @@ load_aot_module (MonoAssemblyLoadContext *alc, MonoAssembly *assembly, gpointer
gpointer *globals = NULL;
MonoAotFileInfo *info = NULL;
int i, version;
gboolean do_load_image = TRUE;
int align_double, align_int64;
guint8 *aot_data = NULL;

Expand Down Expand Up @@ -2289,7 +2289,7 @@ load_aot_module (MonoAssemblyLoadContext *alc, MonoAssembly *assembly, gpointer
* non-lazily, since we can't handle out-of-date errors later.
* The cached class info also depends on the exact assemblies.
*/
if (do_load_image) {
if (!mono_opt_aot_lazy_assembly_load) {
for (i = 0; i < amodule->image_table_len; ++i) {
ERROR_DECL (error);
load_image (amodule, i, error);
Expand Down
15 changes: 15 additions & 0 deletions src/mono/mono/mini/driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -1787,11 +1787,23 @@ parse_qualified_method_name (char *method_name)
void
mono_jit_parse_options (int argc, char * argv[])
{
ERROR_DECL (error);
int i;
char *trace_options = NULL;
int mini_verbose_level = 0;
guint32 opt;

/* Make a copy since mono_options_parse_options () modifies argv */
char **copy_argv = g_new0 (char*, argc);
memcpy (copy_argv, argv, sizeof (char*) * argc);
argv = copy_argv;

mono_options_parse_options ((const char**)argv, argc, &argc, error);
if (!is_ok (error)) {
g_printerr ("%s", mono_error_get_message (error));
mono_error_cleanup (error);
}

/*
* Some options have no effect here, since they influence the behavior of
* mono_main ().
Expand Down Expand Up @@ -1880,6 +1892,9 @@ mono_jit_parse_options (int argc, char * argv[])

if (mini_verbose_level)
mono_set_verbose_level (mini_verbose_level);

/* Free the copy */
g_free (argv);
}

static void
Expand Down
1 change: 1 addition & 0 deletions src/mono/mono/utils/options-def.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ DEFINE_BOOL_READONLY(readonly_flag, "readonly-flag", FALSE, "Example")
#endif
*/

DEFINE_BOOL(aot_lazy_assembly_load, "aot-lazy-assembly-load", FALSE, "Load assemblies referenced by AOT images lazily")
/* Cleanup */
#undef DEFINE_OPTION_FULL
#undef DEFINE_OPTION_READONLY
2 changes: 1 addition & 1 deletion src/mono/mono/utils/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ mono_options_print_usage (void)
}

/*
* mono_optiond_parse_options:
* mono_options_parse_options:
*
* Set options based on the command line arguments in ARGV/ARGC.
* Remove processed arguments from ARGV and set *OUT_ARGC to the
Expand Down

0 comments on commit 0465a47

Please sign in to comment.