aboutsummaryrefslogtreecommitdiffstats
path: root/iseq.h
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-22 05:24:50 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-22 05:24:50 +0000
commitf3e15ee92331ba707f5a610f57c3c2f95f60b711 (patch)
treefbd4e91e2f4e601144b08dedd3236df5d6fc9e25 /iseq.h
parent12b022ecab2da4d69db7c60c8d46b11db8121c11 (diff)
downloadruby-f3e15ee92331ba707f5a610f57c3c2f95f60b711.tar.gz
thread.c (rb_reset_coverages): remove coverage counters from all ISeqs
When coverage measurement is enabled, the compiler makes each iseq have a reference to the counter array of coverage. Even after coverage measurement is disabled, the reference is kept. And, if coverage measurement is restarted, a coverage hook will increase the counter. This is completely meaningless; it brings just overhead. To remove this meaninglessness, this change removes all the reference when coverage measuement is stopped. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'iseq.h')
-rw-r--r--iseq.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/iseq.h b/iseq.h
index b8c10d8816..44ed3bdedf 100644
--- a/iseq.h
+++ b/iseq.h
@@ -178,6 +178,8 @@ VALUE rb_iseq_first_lineno(const rb_iseq_t *iseq);
VALUE rb_iseq_method_name(const rb_iseq_t *iseq);
void rb_iseq_code_location(const rb_iseq_t *iseq, int *first_lineno, int *first_column, int *last_lineno, int *last_column);
+void rb_iseq_remove_coverage_all();
+
/* proc.c */
const rb_iseq_t *rb_method_iseq(VALUE body);
const rb_iseq_t *rb_proc_get_iseq(VALUE proc, int *is_proc);