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
The second value of key of branch/method coverage is unique ID, not
lineno.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59940 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
To measure coverage of C code:
`./configure --enable-gcov && make && make exam && make lcov`
To measure coverage of Ruby code:
`./configure && make && make exam COVERAGE=true && make lcov`
To measure coverage of both languages at a time:
`./configure --enable-gcov && make && make exam COVERAGE=true && make lcov`
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59890 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
`./configure --enable-gcov && make exam && make lcov` will create
`lcov-c-out/index.html` for coverage of C code of the interpreter.
`make exam COVERAGE=true && make lcov` will create
`lcov-rb-out/index.html` for coverage of Ruby stdlib code.
Using both `--enable-gcov` and `COVERAGE=true` will create
`lcov-out/index.html` for total coverage.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59794 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This experimental feature is only for Ruby-core team, not for casual users.
Usage: `./configure --enable-gcov && make && make exam && make lcov`
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e