提交 94291acc 编写于 作者: J Jonathan Chambers

Merge branch 'unity-trunk' into unity-4.5-staging

......@@ -142,7 +142,7 @@ if ($ENV{"UNITY_THISISABUILDMACHINE"})
{
system("strip $libtarget/libmono.so") eq 0 or die("failed to strip libmono (shared)");
system("strip $libtarget/libMonoPosixHelper.so") eq 0 or die("failed to strip libMonoPosixHelper (shared)");
system("echo \"mono-runtime-$platform = $ENV{'BUILD_VCS_NUMBER'}\" > $root/builds/versions.txt");
system("git log --pretty=format:'mono-runtime-$platform = %H %d %ad' --no-abbrev-commit --date=short -1 > $root/builds/versions.txt");
}
system("ln","-f","$root/mono/mini/mono","$bintarget/mono") eq 0 or die("failed symlinking mono executable");
......
......@@ -180,7 +180,7 @@ for my $arch (@arches)
{
# system("strip $libtarget/libmono.0.dylib") eq 0 or die("failed to strip libmono");
# system("strip $libtarget/MonoBundleBinary") eq 0 or die ("failed to strip MonoBundleBinary");
system("echo \"mono-runtime-osx = $ENV{'BUILD_VCS_NUMBER'}\" > $root/builds/versions.txt");
system("git log --pretty=format:'mono-runtime-osx = %H %d %ad' --no-abbrev-commit --date=short -1 > $root/builds/versions.txt");
}
InstallNameTool("$libtarget/libmono.0.dylib", "\@executable_path/../Frameworks/MonoEmbedRuntime/osx/libmono.0.dylib");
......
......@@ -28,7 +28,7 @@ copy("$root/builds/embedruntimes/win32/mono.pdb","$root/builds/monodistribution/
if ($ENV{UNITY_THISISABUILDMACHINE})
{
system("echo mono-runtime-win32 = $ENV{'BUILD_VCS_NUMBER'} > $root\\builds\\versions.txt");
system("git log --pretty=format:\"mono-runtime-win32 = %H %d %ad\" --no-abbrev-commit --date=short -1 > $root\\builds\\versions.txt");
}
sub CompileVCProj
......
......@@ -28,7 +28,7 @@ copy("$root/builds/embedruntimes/win64/mono.pdb","$root/builds/monodistribution/
if ($ENV{UNITY_THISISABUILDMACHINE})
{
system("echo mono-runtime-win64 = $ENV{'BUILD_VCS_NUMBER'} > $root\\builds\\versions.txt");
system("git log --pretty=format:\"mono-runtime-win64 = %H %d %ad\" --no-abbrev-commit --date=short -1 > $root\\builds\\versions.txt");
}
sub CompileVCProj
......
......@@ -15,6 +15,7 @@ while (defined(my $file = readdir(DIR))) {
if (-d "$path$file"){
if (-f "$path$file/versions.txt") {
system("cat $path$file/versions.txt >> collectedbuilds/versions-aggregated.txt");
system("echo \"\" >> collectedbuilds/versions-aggregated.txt");
}
dircopy("$path$file","collectedbuilds/") or die ("failed copying $path$file");
push @folders,"$path$file";
......
......@@ -1381,6 +1381,27 @@ int GC_thread_register_foreign (void *base_addr)
return me != NULL;
}
int GC_thread_unregister_foreign ()
{
GC_thread me;
LOCK();
me = GC_lookup_thread(pthread_self());
if (me && (me -> flags & FOREIGN_THREAD))
{
#if defined(THREAD_LOCAL_ALLOC) && !defined(DBG_HDRS_ALL)
GC_destroy_thread_local (me);
#endif
GC_delete_gc_thread(me->id, me);
UNLOCK();
return 1;
}
UNLOCK();
return 0;
}
void * GC_start_routine(void * arg)
{
#if defined(PLATFORM_ANDROID)
......
......@@ -250,11 +250,7 @@ mono_gc_register_thread (void *baseptr)
gboolean
mono_gc_unregister_thread (MonoThread *thread)
{
#if defined(PLATFORM_WIN32)
return GC_thread_unregister_foreign ();
#else
return TRUE;
#endif
}
gboolean
......
......@@ -238,7 +238,7 @@ jit_info_table_free (MonoJitInfoTable *table)
int num_chunks = table->num_chunks;
MonoDomain *domain = table->domain;
mono_domain_lock (domain);
mono_domain_jit_code_hash_lock (domain);
table->domain->num_jit_info_tables--;
if (table->domain->num_jit_info_tables <= 1) {
......@@ -274,7 +274,7 @@ jit_info_table_free (MonoJitInfoTable *table)
g_free (chunk);
}
mono_domain_unlock (domain);
mono_domain_jit_code_hash_unlock (domain);
g_free (table);
}
......@@ -382,11 +382,12 @@ mono_jit_info_table_find (MonoDomain *domain, char *addr)
MonoImage *image;
/*
* Take the domain lock instead of using hazard pointers.
* Take the jit code hash lock instead of using hazard pointers.
* This prevents issues with corrupt tls data after
* reloading domains with child threads running.
* TOCONSIDER: create a separate lock for jit info table, instead of sharing jit code hash lock?
*/
mono_domain_lock (domain);
mono_domain_jit_code_hash_lock (domain);
++mono_stats.jit_info_table_lookup_count;
......@@ -422,7 +423,7 @@ mono_jit_info_table_find (MonoDomain *domain, char *addr)
}
if ((gint8*)addr >= (gint8*)ji->code_start
&& (gint8*)addr < (gint8*)ji->code_start + ji->code_size) {
mono_domain_unlock (domain);
mono_domain_jit_code_hash_unlock (domain);
return ji;
}
......@@ -438,7 +439,7 @@ mono_jit_info_table_find (MonoDomain *domain, char *addr)
} while (chunk_pos < table->num_chunks);
not_found:
mono_domain_unlock (domain);
mono_domain_jit_code_hash_unlock (domain);
ji = NULL;
/* Maybe its an AOT module */
......@@ -711,7 +712,7 @@ mono_jit_info_table_add (MonoDomain *domain, MonoJitInfo *ji)
g_assert (ji->method != NULL);
mono_domain_lock (domain);
mono_domain_jit_code_hash_lock (domain);
++mono_stats.jit_info_table_insert_count;
......@@ -771,7 +772,7 @@ mono_jit_info_table_add (MonoDomain *domain, MonoJitInfo *ji)
/* Debugging code, should be removed. */
//jit_info_table_check (table);
mono_domain_unlock (domain);
mono_domain_jit_code_hash_unlock (domain);
}
static MonoJitInfo*
......@@ -809,7 +810,7 @@ mono_jit_info_table_remove (MonoDomain *domain, MonoJitInfo *ji)
gpointer start = ji->code_start;
int chunk_pos, pos;
mono_domain_lock (domain);
mono_domain_jit_code_hash_lock (domain);
table = domain->jit_info_table;
++mono_stats.jit_info_table_remove_count;
......@@ -847,7 +848,7 @@ mono_jit_info_table_remove (MonoDomain *domain, MonoJitInfo *ji)
mono_jit_info_free_or_queue (domain, ji);
mono_domain_unlock (domain);
mono_domain_jit_code_hash_unlock (domain);
}
static MonoAotModuleInfoTable*
......
......@@ -377,6 +377,9 @@ void mono_unity_liveness_calculation_from_statics(LivenessState* liveness_state)
continue;
if(!mono_field_can_contain_references(field))
continue;
// shortcut check for special statics
if (field->offset == -1)
continue;
if (MONO_TYPE_ISSTRUCT(field->type))
{
......@@ -391,12 +394,6 @@ void mono_unity_liveness_calculation_from_statics(LivenessState* liveness_state)
{
mono_traverse_object_internal((MonoObject*)offseted, TRUE, field->type->data.klass, liveness_state);
}
continue;
}
if (field->offset == -1)
{
//g_assert_not_reached ();
}
else
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册