Function report |
Source Code:kernel\kcov.c |
Create Date:2022-07-28 11:34:02 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:kcov_ioctl_locked
Proto:static int kcov_ioctl_locked(struct kcov *kcov, unsigned int cmd, unsigned long arg)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct kcov * | kcov | |
unsigned int | cmd | |
unsigned long | arg |
555 | Case cmd == KCOV_INIT_TRACE |
556 | kcov_debug("KCOV_INIT_TRACE\n") |
561 | If mode != KCOV_MODE_DISABLED Then Return -EBUSY |
572 | mode = KCOV_MODE_INIT |
573 | Return 0 |
574 | Case cmd == KCOV_ENABLE |
575 | kcov_debug("KCOV_ENABLE\n") |
583 | If mode != KCOV_MODE_INIT || Not Coverage buffer shared with user space. Then Return -EINVAL |
585 | t = current process |
586 | If (Task for which we collect coverage, or NULL. != NULL || kcov != NULL) Then Return -EBUSY |
588 | mode = kcov_get_mode(arg) |
599 | Return 0 |
600 | Case cmd == KCOV_DISABLE |
601 | kcov_debug("KCOV_DISABLE\n") |
606 | t = current process |
607 | If WARN_ON(Task for which we collect coverage, or NULL. != t) Then Return -EINVAL |
609 | kcov_disable(t, kcov) |
611 | Return 0 |
612 | Case cmd == KCOV_REMOTE_ENABLE |
613 | kcov_debug("KCOV_REMOTE_ENABLE\n") |
614 | If mode != KCOV_MODE_INIT || Not Coverage buffer shared with user space. Then Return -EINVAL |
616 | t = current process |
617 | If (Task for which we collect coverage, or NULL. != NULL || kcov != NULL) Then Return -EBUSY |
619 | remote_arg = arg |
623 | If Length of coverage buffer in words > LONG_MAX / sizeof(unsignedlong) Then Return -EINVAL |
630 | spin_lock( & kcov_remote_lock) |
631 | When i < Size of handles array cycle |
646 | If common_handle Then |
647 | kcov_debug("common handle %llx\n", common_handle) |
655 | remote = kcov_remote_add(kcov, common_handle) |
662 | kcov_handle = common_handle |
664 | spin_unlock( & kcov_remote_lock) |
667 | Return 0 |
668 | Default |
669 | Return -ENOTTY |
Name | Describe |
---|---|
kcov_ioctl |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |