[前][次][番号順一覧][スレッド一覧][生データ]

yarv-diff:395

From: ko1 atdot.net
Date: 10 Sep 2006 22:55:31 +0900
Subject: [yarv-diff:395] r562 - in branches/parallel: . benchmark

Author: ko1
Date: 2006-09-10 22:55:30 +0900 (Sun, 10 Sep 2006)
New Revision: 562

Modified:
   branches/parallel/ChangeLog
   branches/parallel/array.c
   branches/parallel/benchmark/bmx_temp.rb
   branches/parallel/common.mk
   branches/parallel/compile.c
   branches/parallel/thread.c
   branches/parallel/vm_dump.c
Log:
	* ChangeLog : fix typo

	* array.c : Array#length is thread safe

	* common.mk : remove opt from baseruby launch option

	* compile.c : fix special insn optimization

	* thread.c : Thread#pass is thread safe

	* vm_dump.c : add bp()



Modified: branches/parallel/ChangeLog
===================================================================
--- branches/parallel/ChangeLog	2006-09-08 09:11:13 UTC (rev 561)
+++ branches/parallel/ChangeLog	2006-09-10 13:55:30 UTC (rev 562)
@@ -4,6 +4,21 @@
 #  from Mon, 03 May 2004 01:24:19 +0900
 #
 
+2006-09-10(Sun) 22:51:58 +0900  Koichi Sasada  <ko1 atdot.net>
+
+	* ChangeLog : fix typo
+
+	* array.c : Array#length is thread safe
+
+	* common.mk : remove opt from baseruby launch option
+
+	* compile.c : fix special insn optimization
+
+	* thread.c : Thread#pass is thread safe
+
+	* vm_dump.c : add bp()
+
+
 2006-09-08(Fri) 18:03:53 +0900  Koichi Sasada  <ko1 atdot.net>
 
 	* benchmark/bm_para_attr.rb : added
@@ -25,7 +40,7 @@
 	* thread.c : add threads number check
 
 	* thread_pthread.h : fix to pass execution to another thread
-	if fg spin was ocked
+	if fg spin was locked
 
 
 2006-09-08(Fri) 14:39:16 +0900  Koichi Sasada  <ko1 atdot.net>

Modified: branches/parallel/array.c
===================================================================
--- branches/parallel/array.c	2006-09-08 09:11:13 UTC (rev 561)
+++ branches/parallel/array.c	2006-09-10 13:55:30 UTC (rev 562)
@@ -2879,7 +2879,7 @@
     rb_define_method(rb_cArray, "each", rb_ary_each, 0);
     rb_define_method(rb_cArray, "each_index", rb_ary_each_index, 0);
     rb_define_method(rb_cArray, "reverse_each", rb_ary_reverse_each, 0);
-    rb_define_method(rb_cArray, "length", rb_ary_length, 0);
+    rb_define_method_ts(rb_cArray, "length", rb_ary_length, 0);
     rb_define_alias(rb_cArray,  "size", "length");
     rb_define_method(rb_cArray, "empty?", rb_ary_empty_p, 0);
     rb_define_method(rb_cArray, "index", rb_ary_index, -1);

Modified: branches/parallel/benchmark/bmx_temp.rb
===================================================================
--- branches/parallel/benchmark/bmx_temp.rb	2006-09-08 09:11:13 UTC (rev 561)
+++ branches/parallel/benchmark/bmx_temp.rb	2006-09-10 13:55:30 UTC (rev 562)
@@ -1,3 +1,13 @@
+require 'thread'
+
+m = Mutex.new
+1_000_000.times{
+  m.synchronize{}
+}
+
+
+__END__
+
 require 'complex'
 
 def mandelbrot? z

Modified: branches/parallel/common.mk
===================================================================
--- branches/parallel/common.mk	2006-09-08 09:11:13 UTC (rev 561)
+++ branches/parallel/common.mk	2006-09-10 13:55:30 UTC (rev 562)
@@ -446,7 +446,7 @@
 	$(BASERUBY) -I$(srcdir) -I$(srcdir)/lib $(srcdir)/benchmark/run_rite.rb $(OPT) $(ITEMS) --yarv-program=./$(PROGRAM) --ruby-program=$(BASERUBY) --opts=-I$(srcdir)/lib
 
 tbench: prog
-	$(BASERUBY) -I$(srcdir) -I$(srcdir)/lib $(srcdir)/benchmark/run_rite.rb bmx $(OPT) --yarv-program=./$(PROGRAM) --ruby-program=$(BASERUBY) --opts=-I$(srcdir)/lib
+	$(BASERUBY) -I$(srcdir) -I$(srcdir)/lib $(srcdir)/benchmark/run_rite.rb bmx $(OPT) --yarv-program='./$(PROGRAM) -I$(srcdir)/lib' --ruby-program=$(BASERUBY)
 
 bench-each: $(RUBY)
 	$(BASERUBY) -I$(srcdir) $(srcdir)/benchmark/run_rite.rb bm_$(ITEM) $(OPT) --yarv-program=./$(RUBY) --ruby-program=$(BASERUBY) --opts=-I$(srcdir)/lib

Modified: branches/parallel/compile.c
===================================================================
--- branches/parallel/compile.c	2006-09-08 09:11:13 UTC (rev 561)
+++ branches/parallel/compile.c	2006-09-10 13:55:30 UTC (rev 562)
@@ -1567,7 +1567,9 @@
 	VALUE flag = OPERAND_AT(iobj, 3);
 
 	/* TODO: should be more sophisticated search */
-	if (block == 0 && flag == INT2FIX(0)) {
+	if (block == 0 && (flag == INT2FIX(0) ||
+			   flag == INT2FIX(VM_CALL_FCALL_BIT) ||
+			   flag == INT2FIX(VM_CALL_VCALL_BIT))) {
 	    if (argc == 0) {
 		if (mid == idLength) {
 		    insn_set_specialized_instruction(iobj, BIN(opt_length));

Modified: branches/parallel/thread.c
===================================================================
--- branches/parallel/thread.c	2006-09-08 09:11:13 UTC (rev 561)
+++ branches/parallel/thread.c	2006-09-10 13:55:30 UTC (rev 562)
@@ -762,7 +762,7 @@
 
 	YARV_CHECK_INTS();
 #else
-	BLOCKING_RANGE(th, 0, {
+	GL_UNLOCK_RANGE(th, {
 	    native_thread_yield();
 	});
 #endif
@@ -2318,7 +2318,7 @@
     rb_define_singleton_method(cYarvThread, "stop", rb_thread_stop, 0);
     rb_define_singleton_method(cYarvThread, "kill", rb_thread_s_kill, 1);
     rb_define_singleton_method(cYarvThread, "exit", rb_thread_exit, 0);
-    rb_define_singleton_method(cYarvThread, "pass", yarv_thread_s_pass, 0);
+    rb_define_singleton_method_ts(cYarvThread, "pass", yarv_thread_s_pass, 0);
     rb_define_singleton_method(cYarvThread, "list", rb_thread_list, 0);
     rb_define_singleton_method(cYarvThread, "critical", rb_thread_s_critical, 0);
     rb_define_singleton_method(cYarvThread, "critical=", rb_thread_s_critical, 1);

Modified: branches/parallel/vm_dump.c
===================================================================
--- branches/parallel/vm_dump.c	2006-09-08 09:11:13 UTC (rev 561)
+++ branches/parallel/vm_dump.c	2006-09-10 13:55:30 UTC (rev 562)
@@ -568,7 +568,7 @@
 {
     yarv_thread_t *th = GET_VM()->main_thread;
     VALUE bt;
-
+    bp();
     if (th->vm) {
 	int i;
 	SDR();


--
ML: yarv-diff quickml.atdot.net
Info: http://www.atdot.net/~ko1/quickml

[前][次][番号順一覧][スレッド一覧][生データ]