Skip to content

Commit

Permalink
Merge pull request #1745 from alexrp/warning-police
Browse files Browse the repository at this point in the history
Warning police
  • Loading branch information
alexrp committed Apr 28, 2015
2 parents 1dec57e + 3f992da commit a4ee723
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 47 deletions.
2 changes: 2 additions & 0 deletions mono/metadata/sgen-thread-pool.c
Expand Up @@ -146,6 +146,8 @@ thread_func (void *thread_data)
mono_cond_signal (&done_cond);
}
}

return 0;
}

void
Expand Down
6 changes: 3 additions & 3 deletions mono/metadata/threadpool-ms.c
Expand Up @@ -486,7 +486,7 @@ domain_get_or_create (MonoDomain *domain)
}

static gboolean
domain_any_has_request ()
domain_any_has_request (void)
{
gboolean res = FALSE;
guint i;
Expand Down Expand Up @@ -1176,7 +1176,7 @@ heuristic_notify_work_completed (void)
}

static gboolean
heuristic_should_adjust ()
heuristic_should_adjust (void)
{
g_assert (threadpool);

Expand All @@ -1190,7 +1190,7 @@ heuristic_should_adjust ()
}

static void
heuristic_adjust ()
heuristic_adjust (void)
{
g_assert (threadpool);

Expand Down
18 changes: 0 additions & 18 deletions mono/metadata/threads.c
Expand Up @@ -3097,24 +3097,6 @@ void mono_thread_suspend_all_other_threads (void)
}
}

static void
collect_threads (gpointer key, gpointer value, gpointer user_data)
{
MonoInternalThread *thread = (MonoInternalThread*)value;
struct wait_data *wait = (struct wait_data*)user_data;
HANDLE handle;

if (wait->num<MAXIMUM_WAIT_OBJECTS) {
handle = mono_threads_open_thread_handle (thread->handle, (MonoNativeThreadId)thread->tid);
if (handle == NULL)
return;

wait->handles [wait->num] = handle;
wait->threads [wait->num] = thread;
wait->num++;
}
}

static gboolean thread_dump_requested;

static G_GNUC_UNUSED gboolean
Expand Down
19 changes: 0 additions & 19 deletions mono/mini/method-to-ir.c
Expand Up @@ -1543,25 +1543,6 @@ handle_stack_args (MonoCompile *cfg, MonoInst **sp, int count)
}
}

/* Emit code which loads interface_offsets [klass->interface_id]
* The array is stored in memory before vtable.
*/
static void
mini_emit_load_intf_reg_vtable (MonoCompile *cfg, int intf_reg, int vtable_reg, MonoClass *klass)
{
if (cfg->compile_aot) {
int ioffset_reg = alloc_preg (cfg);
int iid_reg = alloc_preg (cfg);

MONO_EMIT_NEW_AOTCONST (cfg, iid_reg, klass, MONO_PATCH_INFO_ADJUSTED_IID);
MONO_EMIT_NEW_BIALU (cfg, OP_PADD, ioffset_reg, iid_reg, vtable_reg);
MONO_EMIT_NEW_LOAD_MEMBASE (cfg, intf_reg, ioffset_reg, 0);
}
else {
MONO_EMIT_NEW_LOAD_MEMBASE (cfg, intf_reg, vtable_reg, -((klass->interface_id + 1) * SIZEOF_VOID_P));
}
}

static void
mini_emit_interface_bitmap_check (MonoCompile *cfg, int intf_bit_reg, int base_reg, int offset, MonoClass *klass)
{
Expand Down
17 changes: 11 additions & 6 deletions mono/mini/mini.c
Expand Up @@ -3006,11 +3006,11 @@ is_open_method (MonoMethod *method)

#ifndef DISABLE_JIT

#if defined(__native_client_codegen__) || USE_COOP_GC

static void
mono_create_gc_safepoint (MonoCompile *cfg, MonoBasicBlock *bblock)
{
#if defined(__native_client_codegen__) || USE_COOP_GC

MonoInst *poll_addr, *ins;
if (cfg->verbose_level)
printf ("ADDING SAFE POINT TO BB %d\n", bblock->block_num);
Expand Down Expand Up @@ -3041,8 +3041,6 @@ mono_create_gc_safepoint (MonoCompile *cfg, MonoBasicBlock *bblock)
mono_bblock_insert_before_ins (bblock, NULL, poll_addr);
mono_bblock_insert_after_ins (bblock, poll_addr, ins);
}

#endif
}

/*
Expand All @@ -3057,7 +3055,6 @@ Those are:
static void
mono_insert_safepoints (MonoCompile *cfg)
{
#if defined(__native_client_codegen__) || defined(USE_COOP_GC)
MonoBasicBlock *bb;

if (cfg->verbose_level)
Expand All @@ -3067,9 +3064,17 @@ mono_insert_safepoints (MonoCompile *cfg)
if (bb->loop_body_start || bb == cfg->bb_entry || bb->flags & BB_EXCEPTION_HANDLER)
mono_create_gc_safepoint (cfg, bb);
}
#endif
}

#else

static void
mono_insert_safepoints (MonoCompile *cfg)
{
}

#endif

/*
* mini_method_compile:
* @method: the method to compile
Expand Down
2 changes: 1 addition & 1 deletion mono/utils/mono-threads.c
Expand Up @@ -151,7 +151,7 @@ dump_threads (void)
MOSTLY_ASYNC_SAFE_PRINTF ("\t0x?08\t- blocking with pending suspend (GOOD)\n");

FOREACH_THREAD_SAFE (info) {
MOSTLY_ASYNC_SAFE_PRINTF ("--thread %p id %p [%p] state %x %s\n", info, mono_thread_info_get_tid (info), (void*)(size_t)info->native_handle, info->thread_state, info == cur ? "GC INITIATOR" : "" );
MOSTLY_ASYNC_SAFE_PRINTF ("--thread %p id %p [%p] state %x %s\n", info, (void *) mono_thread_info_get_tid (info), (void*)(size_t)info->native_handle, info->thread_state, info == cur ? "GC INITIATOR" : "" );
} END_FOREACH_THREAD_SAFE
}

Expand Down

0 comments on commit a4ee723

Please sign in to comment.