[#35333] [Ruby 1.8 - Bug #221] (Open) Net::SMTPでSMTPのHELO/EHLOにデフォルトで不正なホスト名を使用 — Anonymous <redmine@...>
チケット #221 が報告されました。 (by Anonymous)
チケット #221 が更新されました。 (by Masahiro Tomita)
チケット #221 が更新されました。 (by Anonymous)
とみたです。
とみたです。
卜部です。
西山和広です。
[#35355] リリース前ToDoリスト — Yukihiro Matsumoto <matz@...>
まつもと ゆきひろです
なかだです。
まつもと ゆきひろです
高尾宏治です。
高尾宏治です。
なかだです。
高尾宏治です。
なかだです。
前田です。
なかだです。
前田です。
なかだです。
高尾宏治です。
山口と申します。
高尾宏治です。
高尾宏治です。
高尾宏治です。
GyRCJDMkcyRLJEEkTyEjGyhCTS5TdXp1a2kbJEIkRyQ5ISMbKEINCg0KGyRCO24kNyRGJF8kXiQ3
高尾宏治です。
高尾宏治です。
高尾宏治です。
GyRCJDMkcyRLJEEkTxsoQiBNLlN1enVraSAbJEIkRyQ5ISMbKEINCg0KTWFjIE9TWCAxMC40GyRC
高尾宏治です。
[#35372] patch for ruby-core:17472 — wanabe <s.wanabe@...>
ワナベと申します。
なかだです。
ワナベです。
遠藤です。
=1B$B$`$i$?$G$9!#=1B(B
豊福です。
[#35375] Re: [ruby-cvs:25121] Ruby:r17902 (ruby_1_8_6): * re.c (rb_reg_search): need to free allocated buffer in re_register. [ruby-core:17518] — Urabe Shyouhei <shyouhei@...>
卜部です。ruby_1_8_xの枝を弄る人全員にお願いです。チェックインする前に必
[#35389] Re: [ruby-cvs:25164] Ruby:r17945 (trunk, ruby_1_8): * string.c (rb_str_succ): limit carrying in an alphanumeric region if — Yukihiro Matsumoto <matz@...>
まつもと ゆきひろです
[#35396] cc always picks ruby/ruby.h on OS X — "Akinori MUSHA" <knu@...>
ruby 1.8 の tk ライブラリが OS X 上でビルドできない件です。
[#35404] ruby_1_8_6/ruby_1_8_7ブランチのメンテナンスポリシーについて — "Shugo Maeda" <shugo@...>
前田です。
卜部です。
前田です。
卜部です。
前田です。
Shugo Maeda さんは書きました:
どこにぶら下げるのがいいのかわからないので、単に意思表明ですが、
卜部です。
At Fri, 11 Jul 2008 01:00:29 +0900,
前田です。
In article <704d5db90807110028o238594f2wda0ec1bf12abc940@mail.gmail.com>,
そういえばこの部分に言及するのを忘れていた
前田です。
卜部です。
前田です。
In article <704d5db90807121803o5ea67361ucbf968f8a18a845d@mail.gmail.com>,
Tanaka Akira さんは書きました:
前田です。
卜部です。
前田です。
卜部です。
前田です。
卜部です。
前田です。
こんにちは、なかむら(う)です。
卜部です。
[#35420] Re: [ruby-cvs:25212] Ruby:r17993 (trunk): * test/ruby/envutil.rb (assert_normal_exit): finish writing script — Tanaka Akira <akr@...>
In article <200807100931.m6A9V4vi014459@ci.ruby-lang.org>,
ワナベです。
こんにちは、なかむら(う)です。
ワナベです。
こんにちは、なかむら(う)です。
こんにちは、なかむら(う)です。
In article <20080711050939.531D.C613B076@garbagecollect.jp>,
こんにちは、なかむら(う)です。
[#35446] [Bug:trunk] Thread#kill cannot break BLOCKING_REGION() on windows — "U.Nakamura" <usa@...>
こんにちは、なかむら(う)です。
[#35450] [BUG] cfp consistency error in Win32OLE — Masaki Suketa <masaki.suketa@...>
助田です。
ワナベと申します。
助田です。
[#35458] make profiler for gc — authorNari <authornari@...>
nariです。
In article <1153cee60807122239t19f6ae05vc0c1995c77349377@mail.gmail.com>,
nariです。
nariです。
三浦と申します。
[#35471] [Bug: 1.9] lazy timer thraed creation — SASADA Koichi <ko1@...>
ささだです.
[#35484] Re: [ruby-core:17739] [Ruby 1.9 - Bug #256] (Open) defined?(Gem::RubyGemsVersion) behaves strange — wanabe <s.wanabe@...>
ワナベと申します。
西山和広です。
斎藤と申します。
[#35542] [Bug:1.9] sleep and Thread#run — Tanaka Akira <akr@...>
1.9 では sleep で寝ているスレッドを Thread#run で起こせない
[#35545] Test::Unit -> miniunit — Kouhei Sutou <kou@...>
須藤です。
まつもと ゆきひろです
[#35555] [Ruby 1.9 - Bug #282] (Open) failure of test_asctime(TestTime) on mswin32 — Usaku NAKAMURA <redmine@...>
チケット #282 が報告されました。 (by Usaku NAKAMURA)
ワナベと申します。
[#35578] [Bug:1.9] context switch may occur during freeing io — "Yusuke ENDOH" <mame@...>
遠藤です。
[#35597] [request]C APIの拡張 — "Goro Fuji" <g.psy.va@...>
藤と申します。
なかだです。
ご意見ありがとうございます。
なかだです。
卜部さん
卜部です。
[#35620] non-locale filename encoding — Tanaka Akira <akr@...>
Dir の使いかたとして、ファイル名のエンコーディングが locale
成瀬です。
In article <48866F3F.80906@airemix.jp>,
成瀬です。
In article <488771FD.4020800@airemix.jp>,
Tanaka Akira wrote:
In article <4888B29D.7030009@airemix.jp>,
成瀬です。
In article <488AC157.7090203@airemix.jp>,
[#35646] [Bug:1.9] Rinda has a race condition — "Yusuke ENDOH" <mame@...>
遠藤です。
[#35648] [Bug:1.9] MingwでIO#dupがブロックする — wanabe <s.wanabe@...>
ワナベと申します。
[#35649] PENDINGS.rb (Was: Re: [Ruby 1.9 - Bug #354] (Assigned) Test failure test/ruby/test_transcode.rb) — "Yusuke ENDOH" <mame@...>
遠藤です。
In article <e0b1e5700807240845o4c09cfa5gae142c1dd0c74170@mail.gmail.com>,
2008/07/25 1:02 Tanaka Akira <akr@fsij.org>:
成瀬です。
遠藤です。
In article <e0b1e5700807290517mee11539lfbd82d4dfc98c53f@mail.gmail.com>,
遠藤です。
In article <e0b1e5700807300311v13752775mcf8bb5086753051d@mail.gmail.com>,
[#35669] [Ruby 1.9 - Bug #368] (Open) 境界における Math.atanh 等の動作 — Yui NARUSE <redmine@...>
チケット #368 が報告されました。 (by Yui NARUSE)
斎藤と申します。
[#35681] [Ruby 1.9 - Bug #369] (Open) Ruby 1.9.0-3で R — Akira Matsuda <redmine@...>
チケット #369 が報告されました。 (by Akira Matsuda)
[ruby-dev:35468] Re: make profiler for gc
nariです。
みなさんご指摘ありがとうございます。
パッチを作り直しました。
Index: gc.c
===================================================================
--- gc.c (リビジョン 18055)
+++ gc.c (作業コピー)
@@ -92,6 +92,103 @@
#undef GC_DEBUG
+/* for GC profile */
+#define GC_PROFILE 0
+#if GC_PROFILE
+
+typedef struct gc_profile_data {
+ double gc_time;
+ double gc_mark_time;
+ double gc_sweep_time;
+ size_t heaps_use_count;
+ size_t heaps_live;
+ size_t heaps_free;
+ size_t heaps_all_objects;
+ int is_exist_finalize;
+ size_t allocate_increase;
+ size_t allocate_limit;
+} gc_profile_data;
+
+/* referenced document http://kzk9.net/column/time.html */
+static double
+getrusage_time(void)
+{
+ struct rusage usage;
+ struct timeval time;
+ getrusage(RUSAGE_SELF, &usage);
+ time = usage.ru_utime;
+ return time.tv_sec + (double)time.tv_usec*1e-6;
+}
+
+#define INIT_GC_PROF_PARAMS double gc_time = 0, mark_time = 0, sweep_time = 0;\
+ size_t count = objspace->count
+
+#define GC_PROF_TIMER_START do {\
+ if (!objspace->gc_profile) {\
+ objspace->gc_profile_size = 1000;\
+ objspace->gc_profile = malloc(sizeof(gc_profile_data) *
objspace->gc_profile_size);\
+ }\
+ if (count >= objspace->gc_profile_size) {\
+ objspace->gc_profile_size += 1000;\
+ objspace->gc_profile = realloc(objspace->gc_profile,
sizeof(gc_profile_data) * objspace->gc_profile_size);\
+ }\
+ if (!objspace->gc_profile) {\
+ rb_bug("gc_profile malloc or realloc miss");\
+ }\
+ MEMZERO(&objspace->gc_profile[count], gc_profile_data, 1);\
+ gc_time = getrusage_time();\
+} while(0)
+
+#define GC_PROF_TIMER_STOP do {\
+ gc_time = getrusage_time() - gc_time;\
+ objspace->gc_profile[count].gc_time = gc_time;\
+} while(0)
+
+#define GC_PROF_MARK_TIMER_START do {\
+ mark_time = getrusage_time();\
+} while(0)
+
+#define GC_PROF_MARK_TIMER_STOP do {\
+ mark_time = getrusage_time() - mark_time;\
+ objspace->gc_profile[count].gc_mark_time = mark_time;\
+} while(0)
+
+#define GC_PROF_SWEEP_TIMER_START do {\
+ sweep_time = getrusage_time();\
+} while(0)
+
+#define GC_PROF_SWEEP_TIMER_STOP do {\
+ sweep_time = getrusage_time() - sweep_time;\
+ objspace->gc_profile[count].gc_sweep_time = sweep_time;\
+} while(0)
+
+#define GC_PROF_SET_MALLOC_INFO do {\
+ size_t count = objspace->count - 1;\
+ objspace->gc_profile[count].allocate_increase = malloc_increase;\
+ objspace->gc_profile[count].allocate_limit = malloc_limit;\
+} while(0)
+
+#define GC_PROF_SET_HEAP_INFO do {\
+ size_t count = objspace->count - 1;\
+ objspace->gc_profile[count].heaps_use_count = heaps_used;\
+ objspace->gc_profile[count].heaps_live = live;\
+ objspace->gc_profile[count].heaps_free = freed;\
+ objspace->gc_profile[count].heaps_all_objects = heaps_used *
HEAP_OBJ_LIMIT;\
+ objspace->gc_profile[count].is_exist_finalize = final_list ?
Qtrue : Qfalse; \
+} while(0)
+
+#else
+#define INIT_GC_PROF_PARAMS
+#define GC_PROF_TIMER_START
+#define GC_PROF_TIMER_STOP
+#define GC_PROF_MARK_TIMER_START
+#define GC_PROF_MARK_TIMER_STOP
+#define GC_PROF_SWEEP_TIMER_START
+#define GC_PROF_SWEEP_TIMER_STOP
+#define GC_PROF_SET_MALLOC_INFO
+#define GC_PROF_SET_HEAP_INFO
+#endif
+
#if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__CYGWIN__)
#pragma pack(push, 1) /* magic for reducing sizeof(RVALUE): 24 -> 20 */
#endif
@@ -179,6 +276,10 @@
struct gc_list *global_list;
unsigned int count;
int gc_stress;
+#if GC_PROFILE
+ gc_profile_data *gc_profile;
+ size_t gc_profile_size;
+#endif
} rb_objspace_t;
#if defined(ENABLE_VM_OBJSPACE) && ENABLE_VM_OBJSPACE
@@ -1440,6 +1541,7 @@
freed += n;
}
}
+ GC_PROF_SET_MALLOC_INFO;
if (malloc_increase > malloc_limit) {
malloc_limit += (malloc_increase - malloc_limit) * (double)live /
(live + freed);
if (malloc_limit < GC_MALLOC_LIMIT) malloc_limit = GC_MALLOC_LIMIT;
@@ -1453,10 +1555,12 @@
/* clear finalization list */
if (final_list) {
+ GC_PROF_SET_HEAP_INFO;
deferred_final_list = final_list;
return;
}
free_unused_heaps(objspace);
+ GC_PROF_SET_HEAP_INFO;
}
void
@@ -1672,6 +1776,7 @@
{
struct gc_list *list;
rb_thread_t *th = GET_THREAD();
+ INIT_GC_PROF_PARAMS;
if (GC_NOTIFY) printf("start garbage_collect()\n");
@@ -1691,6 +1796,8 @@
during_gc++;
objspace->count++;
+ GC_PROF_TIMER_START;
+ GC_PROF_MARK_TIMER_START;
SET_STACK_END;
init_mark_stack(objspace);
@@ -1731,9 +1838,13 @@
gc_mark_rest(objspace);
}
}
+ GC_PROF_MARK_TIMER_STOP;
+ GC_PROF_SWEEP_TIMER_START;
gc_sweep(objspace);
+ GC_PROF_SWEEP_TIMER_STOP;
+ GC_PROF_TIMER_STOP;
if (GC_NOTIFY) printf("end garbage_collect()\n");
return Qtrue;
}
@@ -2386,7 +2497,48 @@
}
#endif
+#if GC_PROFILE
+
/*
+ * call-seq:
+ * GC.profile_report -> hash
+ *
+ * Report profile data.
+ *
+ * It returns a hash as:
+ * {:gc_count => 20 :report => [{:gc_time => 0.001, :gc_mark_time =>
0.00004, :gc_sweep_time => 0.00006 }, ... }]}
+ */
+
+VALUE
+gc_profile_report(void)
+{
+ VALUE prof = 0;
+ VALUE res = rb_hash_new();
+ VALUE datas = rb_ary_new();
+ size_t i;
+ rb_objspace_t *objspace = (&rb_objspace);
+
+ for (i =0; i < objspace->count; i++) {
+ prof = rb_hash_new();
+ rb_hash_aset(prof, ID2SYM(rb_intern("gc_time")),
DOUBLE2NUM(objspace->profile.data[i].gc_time));
+ rb_hash_aset(prof, ID2SYM(rb_intern("gc_mark_time")),
DOUBLE2NUM(objspace->profile.data[i].gc_mark_time));
+ rb_hash_aset(prof, ID2SYM(rb_intern("gc_sweep_time")),
DOUBLE2NUM(objspace->profile.data[i].gc_sweep_time));
+ rb_hash_aset(prof, ID2SYM(rb_intern("allocate_increase")),
rb_uint2inum(objspace->profile.data[i].allocate_increase));
+ rb_hash_aset(prof, ID2SYM(rb_intern("allocate_limit")),
rb_uint2inum(objspace->profile.data[i].allocate_limit));
+ rb_hash_aset(prof, ID2SYM(rb_intern("heaps_use_count")),
rb_uint2inum(objspace->profile.data[i].heaps_use_count));
+ rb_hash_aset(prof, ID2SYM(rb_intern("heaps_live")),
rb_uint2inum(objspace->profile.data[i].heaps_live));
+ rb_hash_aset(prof, ID2SYM(rb_intern("heaps_free")),
rb_uint2inum(objspace->profile.data[i].heaps_free));
+ rb_hash_aset(prof, ID2SYM(rb_intern("heaps_all_objects")),
rb_uint2inum(objspace->profile.data[i].heaps_all_objects));
+ rb_hash_aset(prof, ID2SYM(rb_intern("is_exist_finalize")),
objspace->profile.data[i].is_exist_finalize);
+ rb_ary_push(datas, prof);
+ }
+ rb_hash_aset(res, ID2SYM(rb_intern("gc_count")),
rb_uint2inum(objspace->count));
+ rb_hash_aset(res, ID2SYM(rb_intern("report")), datas);
+ return res;
+}
+#endif
+
+/*
* The <code>GC</code> module provides an interface to Ruby's mark and
* sweep garbage collection mechanism. Some of the underlying methods
* are also available via the <code>ObjectSpace</code> module.
@@ -2430,4 +2582,7 @@
rb_define_singleton_method(rb_mGC, "malloc_allocated_size",
gc_malloc_allocated_size, 0);
rb_define_singleton_method(rb_mGC, "malloc_allocations",
gc_malloc_allocations, 0);
#endif
+#if GC_PROFILE
+ rb_define_singleton_method(rb_mGC, "profile_report", gc_profile_report, 0);
+#endif
}
2008/07/13 16:53 Tanaka Akira <akr@fsij.org>:
> In article <1153cee60807122239t19f6ae05vc0c1995c77349377@mail.gmail.com>,
> authorNari <authornari@gmail.com> writes:
>
>> GC用のプロファイラを作りました。
>> 問題が無ければコミットしたのですが、いかがでしょうか?
>
>> +static double
>> +cputime(void)
>> +{
>> + struct timeval tv;
>> + gettimeofday(&tv, NULL);
>
> プロファイルするときは当該プロセスで消費した時間だけを計るも
> のなんじゃないですか。
> --
> [田中 哲][たなか あきら][Tanaka Akira]
>
>