Thanks to visit codestin.com
Credit goes to github.com

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
[sgen] Remove two dead fields; fix wasm-mt AOT compilation
They were only initialized, but never read.

But what they did do is change the SgenClientInfo field offsets
between the threaded and non-threaded wasm runtimes (because
emscripten only has HAVE_PTHREAD_KILL in the threaded build).  As a
result the offsets for tlab_start, tlab_next and tlab_temp_end were
different for the AOT compilers targeting threaded vs non-threaded
WASM.

This PR removes the two unused fields which will make the two wasm
configurations match again, allowing us to ship a single AOT cross
compiler for both threaded and non-threaded wasm.
  • Loading branch information
lambdageek authored and github-actions committed Sep 13, 2022
commit ebe0b05920c9bcbd2eb724f1ec5fd10085f32fb3
7 changes: 0 additions & 7 deletions src/mono/mono/metadata/sgen-client-mono.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,6 @@ struct _SgenClientThreadInfo {
gboolean skip, suspend_done;
volatile int in_critical_region;

#ifdef SGEN_POSIX_STW
/* This is -1 until the first suspend. */
int signal;
/* FIXME: kill this, we only use signals on systems that have rt-posix, which doesn't have issues with duplicates. */
unsigned int stop_count; /* to catch duplicate signals. */
#endif

gpointer runtime_data;

void *stack_end;
Expand Down
5 changes: 0 additions & 5 deletions src/mono/mono/metadata/sgen-mono.c
Original file line number Diff line number Diff line change
Expand Up @@ -2153,11 +2153,6 @@ sgen_client_thread_attach (SgenThreadInfo* info)

info->client_info.stack_start = NULL;

#ifdef SGEN_POSIX_STW
info->client_info.stop_count = -1;
info->client_info.signal = 0;
#endif

memset (&info->client_info.ctx, 0, sizeof (MonoContext));

if (mono_gc_get_gc_callbacks ()->thread_attach_func)
Expand Down
4 changes: 0 additions & 4 deletions src/mono/mono/sgen/sgen-gc.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,6 @@ typedef enum {

NurseryClearPolicy sgen_get_nursery_clear_policy (void);

#if !defined(__MACH__) && !MONO_MACH_ARCH_SUPPORTED && defined(HAVE_PTHREAD_KILL)
#define SGEN_POSIX_STW 1
#endif

/*
* The nursery section uses this struct.
*/
Expand Down