.. | .. |
---|
22 | 22 | |
---|
23 | 23 | CONFIG_KCOV=y |
---|
24 | 24 | |
---|
25 | | -CONFIG_KCOV requires gcc built on revision 231296 or later. |
---|
| 25 | +CONFIG_KCOV requires gcc 6.1.0 or later. |
---|
26 | 26 | |
---|
27 | 27 | If the comparison operands need to be collected, set:: |
---|
28 | 28 | |
---|
.. | .. |
---|
217 | 217 | threads: the global ones, that are spawned during kernel boot in a limited |
---|
218 | 218 | number of instances (e.g. one USB hub_event() worker thread is spawned per |
---|
219 | 219 | USB HCD); and the local ones, that are spawned when a user interacts with |
---|
220 | | -some kernel interface (e.g. vhost workers). |
---|
| 220 | +some kernel interface (e.g. vhost workers); as well as from soft |
---|
| 221 | +interrupts. |
---|
221 | 222 | |
---|
222 | | -To enable collecting coverage from a global background thread, a unique |
---|
223 | | -global handle must be assigned and passed to the corresponding |
---|
224 | | -kcov_remote_start() call. Then a userspace process can pass a list of such |
---|
225 | | -handles to the KCOV_REMOTE_ENABLE ioctl in the handles array field of the |
---|
226 | | -kcov_remote_arg struct. This will attach the used kcov device to the code |
---|
227 | | -sections, that are referenced by those handles. |
---|
| 223 | +To enable collecting coverage from a global background thread or from a |
---|
| 224 | +softirq, a unique global handle must be assigned and passed to the |
---|
| 225 | +corresponding kcov_remote_start() call. Then a userspace process can pass |
---|
| 226 | +a list of such handles to the KCOV_REMOTE_ENABLE ioctl in the handles |
---|
| 227 | +array field of the kcov_remote_arg struct. This will attach the used kcov |
---|
| 228 | +device to the code sections, that are referenced by those handles. |
---|
228 | 229 | |
---|
229 | 230 | Since there might be many local background threads spawned from different |
---|
230 | 231 | userspace processes, we can't use a single global handle per annotation. |
---|
.. | .. |
---|
242 | 243 | currently reserved and must be zero. In the future the number of bytes |
---|
243 | 244 | used for the subsystem or handle ids might be increased. |
---|
244 | 245 | |
---|
245 | | -When a particular userspace proccess collects coverage by via a common |
---|
| 246 | +When a particular userspace proccess collects coverage via a common |
---|
246 | 247 | handle, kcov will collect coverage for each code section that is annotated |
---|
247 | 248 | to use the common handle obtained as kcov_handle from the current |
---|
248 | 249 | task_struct. However non common handles allow to collect coverage |
---|