summaryrefslogtreecommitdiff
path: root/vm_core.h
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-05 07:16:42 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-12-05 07:16:42 +0000
commit0a6816ecd79fac5dfb32eb237f4c31bb45c9460d (patch)
tree63c3def6ba4957dace4d3fba56f1da964b9750de /vm_core.h
parentaa87ae7a04b9c4845ef4326b63150027ed1036a9 (diff)
Revamp method coverage to support define_method
Traditionally, method coverage measurement was implemented by inserting `trace2` instruction to the head of method iseq. So, it just measured methods defined by `def` keyword. This commit drastically changes the measuring mechanism of method coverage; at `RUBY_EVENT_CALL`, it keeps a hash from rb_method_entry_t* to runs (i.e., it counts the runs per method entry), and at `Coverage.result`, it creates the result hash by enumerating all `rb_method_entry_t*` objects (by `ObjectSpace.each_object`). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_core.h')
-rw-r--r--vm_core.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/vm_core.h b/vm_core.h
index fbd50dc4c2..031cc7b95b 100644
--- a/vm_core.h
+++ b/vm_core.h
@@ -1753,7 +1753,7 @@ RUBY_SYMBOL_EXPORT_BEGIN
int rb_thread_check_trap_pending(void);
extern VALUE rb_get_coverages(void);
-extern void rb_set_coverages(VALUE, int);
+extern void rb_set_coverages(VALUE, int, VALUE);
extern void rb_reset_coverages(void);
void rb_postponed_job_flush(rb_vm_t *vm);