Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Feb 2019 16:18:17 +0000 (UTC)
From:      Andrew Turner <andrew@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r343913 - head/sys/kern
Message-ID:  <201902081618.x18GIHul078235@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: andrew
Date: Fri Feb  8 16:18:17 2019
New Revision: 343913
URL: https://svnweb.freebsd.org/changeset/base/343913

Log:
  Fix the spelling of cov_unregister_pc.
  
  When unregistering kcov from the coverage interface we should use the
  unregister function, not the register function.
  
  Sponsored by:	DARPA, AFRL

Modified:
  head/sys/kern/kern_kcov.c

Modified: head/sys/kern/kern_kcov.c
==============================================================================
--- head/sys/kern/kern_kcov.c	Fri Feb  8 16:05:38 2019	(r343912)
+++ head/sys/kern/kern_kcov.c	Fri Feb  8 16:18:17 2019	(r343913)
@@ -469,8 +469,8 @@ kcov_ioctl(struct cdev *dev, u_long cmd, caddr_t data,
 		KASSERT(active_count > 0, ("%s: Open count is zero", __func__));
 		active_count--;
 		if (active_count == 0) {
-			cov_register_pc(&trace_pc);
-			cov_register_cmp(&trace_cmp);
+			cov_unregister_pc();
+			cov_unregister_cmp();
 		}
 
 		td->td_kcov_info = NULL;
@@ -505,8 +505,8 @@ kcov_thread_dtor(void *arg __unused, struct thread *td
 	KASSERT(active_count > 0, ("%s: Open count is zero", __func__));
 	active_count--;
 	if (active_count == 0) {
-		cov_register_pc(&trace_pc);
-		cov_register_cmp(&trace_cmp);
+		cov_unregister_pc();
+		cov_unregister_cmp();
 	}
 	td->td_kcov_info = NULL;
 	if (info->state != KCOV_STATE_DYING) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201902081618.x18GIHul078235>