diff options
author | Nazime Hande Harputluoglu <handeharputlu@google.com> | 2020-11-24 00:50:52 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-12-28 15:48:36 +0100 |
commit | 894f1f4f49a31887358025db03cb106efb36d8b4 (patch) | |
tree | 8cea42dc67fba222740b547d5fc7fde6438d3fd6 /drivers/usb/usbip/vhci_rx.c | |
parent | Linux 5.11-rc1 (diff) | |
download | linux-894f1f4f49a31887358025db03cb106efb36d8b4.tar.xz linux-894f1f4f49a31887358025db03cb106efb36d8b4.zip |
kcov, usbip: collect coverage from vhci_rx_loop
Add kcov_remote_start()/kcov_remote_stop() annotations to the
vhci_rx_loop() function, which is responsible for parsing USB/IP packets
coming into USB/IP client.
Since vhci_rx_loop() threads are spawned per vhci_hcd device instance, the
common kcov handle is used for kcov_remote_start()/stop() annotations
(see Documentation/dev-tools/kcov.rst for details). As the result kcov
can now be used to collect coverage from vhci_rx_loop() threads.
Co-developed-by: Andrey Konovalov <andreyknvl@google.com>
Acked-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Nazime Hande Harputluoglu <handeharputlu@google.com>
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Link: https://lore.kernel.org/r/f8114050f8d65aa0bc801318b1db532d9f432447.1606175386.git.andreyknvl@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/usbip/vhci_rx.c')
-rw-r--r-- | drivers/usb/usbip/vhci_rx.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/usbip/vhci_rx.c b/drivers/usb/usbip/vhci_rx.c index 266024cbb64f..7f2d1c241559 100644 --- a/drivers/usb/usbip/vhci_rx.c +++ b/drivers/usb/usbip/vhci_rx.c @@ -261,7 +261,9 @@ int vhci_rx_loop(void *data) if (usbip_event_happened(ud)) break; + usbip_kcov_remote_start(ud); vhci_rx_pdu(ud); + usbip_kcov_remote_stop(); } return 0; |