summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornari <nari@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-08-16 11:31:58 +0000
committernari <nari@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2010-08-16 11:31:58 +0000
commit66c25e4ca14fda15c4a0d5cd619e573060ebd756 (patch)
tree0345de2319b2a62828deaa94930ad40d4d277db0
parenta5207399bd3c32965c06cb27ae78537ffbf8da82 (diff)
* gc.c (gc_profile_result): Index begins with 1.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29013 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog4
-rw-r--r--gc.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 7c345d5701..1013eb4464 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Mon Aug 16 20:26:13 2010 Narihiro Nakamura <narihiro@netlab.jp>
+
+ * gc.c (gc_profile_result): Index begins with 1.
+
Mon Aug 16 20:21:17 2010 Narihiro Nakamura <authornari@gmail.com>
* gc.c (gc_profile_result): use size_t. based on patches from
diff --git a/gc.c b/gc.c
index af6d8929f0..9bde487a8c 100644
--- a/gc.c
+++ b/gc.c
@@ -3275,7 +3275,7 @@ gc_profile_result(void)
record = gc_profile_record_get();
if (objspace->profile.run && objspace->profile.count) {
result = rb_sprintf("GC %d invokes.\n", NUM2INT(gc_count(0)));
- index = 0;
+ index = 1;
rb_str_cat2(result, "Index Invoke Time(sec) Use Size(byte) Total Size(byte) Total Object GC Time(ms)\n");
for (i = 0; i < (int)RARRAY_LEN(record); i++) {
VALUE r = RARRAY_PTR(record)[i];
@@ -3296,7 +3296,7 @@ gc_profile_result(void)
rb_str_cat2(result, "\n\n");
rb_str_cat2(result, "More detail.\n");
rb_str_cat2(result, "Index Allocate Increase Allocate Limit Use Slot Have Finalize Mark Time(ms) Sweep Time(ms)\n");
- index = 0;
+ index = 1;
for (i = 0; i < (int)RARRAY_LEN(record); i++) {
VALUE r = RARRAY_PTR(record)[i];
rb_str_catf(result, "%5d %17"PRIuSIZE" %17"PRIuSIZE" %9"PRIuSIZE" %14s %25.20f %25.20f\n",