From nobody Wed May 24 01:17:53 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QQtbQ0v2sz4TJ8N; Wed, 24 May 2023 01:17:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QQtbP73mBz3C8H; Wed, 24 May 2023 01:17:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1684891074; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OpdrJj7Laasehq1tNv/Dq0px+N6ZzkZszFfSqdwiynE=; b=GaZPWH4GM/w2qJzitpLfVpK0nsaExw05PG4d6JycWV0l547h5gE3limApZWu+LRjv6oWPy r2OiG2vwECG43DEXTuJTVKNt34yoV4YrRjUon1lkF7ZaMAV4nZZknQU19uO1/zjjUkDuHX RsAUiv4jDolVkSVrF5HWZYq7v9NnNT6SavdVVd2uc6MsDbaY9n2mFHd3rWKT5ysPZ53HkK 70DxRw/btkmgBz0SVoUU0OljG7Jduifnt5AOfo2sP89iqbwW7td6khmaBq0bYzMtbawc/f myA1dzHu0MUGZEO1RER+OZgkZtKhTCg+VH1o3pFlvZTFE2HK96tixToozgA1PQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1684891074; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OpdrJj7Laasehq1tNv/Dq0px+N6ZzkZszFfSqdwiynE=; b=veQth2mqZK8z79iF7wGFfMVYgur+a1YGKsTC7QvcuZbFjM8ko8pmSiIdiMskO5hAzOr1+Q FNxYEJIot05O4cgEQtfh5nTQoirbLTP3r0jQRqheT6+WhWrs96wu55ZvzAVEFwvPn5/T/U m6RSGvgP2WnJk6iQX4U6EWNfZq5nLxFIQJ1KbCx5HVm15mVsjbjsSuJacgBEDZPP5VcgZD 6y8kr2A01b3WYpN3js/nAjsIzblKlKPmrv7zmH9PXf2Ta/QgKQ6y3y6qYLzr4jxcOYH+Xu JfRgyxHZDMyAsrL0LtiQrPZcnHaCiHHvOMQw5mZkld1gErwKgADWTO1kQRaJLA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1684891074; a=rsa-sha256; cv=none; b=LP02nH59Y4h3JmnYgrnsm9mlUDT/rWJl8FDetcSRvNunJSCb00RgxtJKLflKf9YHAcA6qz 0nfI6MiumQgsL5xvNJQf7wgCBlQDcytqLxviiKBKzevykUTpDnmScgnwwB8jHQTmneyQrg AFA9bv7JfnLNFpUE73oY3otTnU4Yw6p+cxe1aObVqXU/Q/jWXB+nX2wELsV351bWueTU/f wpORvrdgHSkusO8KuyETysodgrAX5loaqa2t2CHyhGPT2MJ1WYrTpVTOcM6smgRMANLCke J8T9CdruqUHKSQn8LApJGriPbRVaUaXmeE/rl7K9rzqUAwhzh6CDxSV0dv1Z8w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4QQtbP5XWHzMv4; Wed, 24 May 2023 01:17:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 34O1Hrk0087021; Wed, 24 May 2023 01:17:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 34O1Hr99087020; Wed, 24 May 2023 01:17:53 GMT (envelope-from git) Date: Wed, 24 May 2023 01:17:53 GMT Message-Id: <202305240117.34O1Hr99087020@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 80764cdb73f5 - main - bhyve: Remove the exitcode stats structure List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: markj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 80764cdb73f5476b695afc1bbabc3eccf55a26c5 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=80764cdb73f5476b695afc1bbabc3eccf55a26c5 commit 80764cdb73f5476b695afc1bbabc3eccf55a26c5 Author: Mark Johnston AuthorDate: 2023-05-24 01:14:36 +0000 Commit: Mark Johnston CommitDate: 2023-05-24 01:17:02 +0000 bhyve: Remove the exitcode stats structure This structure isn't used for anything, and only counts a subset of vmexit types. Moreover, it is not accurate since there is no synchronization between vcpu threads. Simply remove it. No functional change intended. Reviewed by: jhb Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D40245 --- usr.sbin/bhyve/bhyverun.c | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/usr.sbin/bhyve/bhyverun.c b/usr.sbin/bhyve/bhyverun.c index 7be97ecedfdc..ef5968ba6385 100644 --- a/usr.sbin/bhyve/bhyverun.c +++ b/usr.sbin/bhyve/bhyverun.c @@ -198,17 +198,6 @@ static cpuset_t cpumask; static void vm_loop(struct vmctx *ctx, struct vcpu *vcpu); -static struct bhyvestats { - uint64_t vmexit_bogus; - uint64_t vmexit_reqidle; - uint64_t vmexit_hlt; - uint64_t vmexit_pause; - uint64_t vmexit_mtrap; - uint64_t vmexit_inst_emul; - uint64_t cpu_switch_rotate; - uint64_t cpu_switch_direct; -} stats; - static struct vcpu_info { struct vmctx *ctx; struct vcpu *vcpu; @@ -753,8 +742,6 @@ vmexit_bogus(struct vmctx *ctx __unused, struct vcpu *vcpu __unused, { assert(vmrun->vm_exit->inst_length == 0); - stats.vmexit_bogus++; - return (VMEXIT_CONTINUE); } @@ -764,8 +751,6 @@ vmexit_reqidle(struct vmctx *ctx __unused, struct vcpu *vcpu __unused, { assert(vmrun->vm_exit->inst_length == 0); - stats.vmexit_reqidle++; - return (VMEXIT_CONTINUE); } @@ -773,8 +758,6 @@ static int vmexit_hlt(struct vmctx *ctx __unused, struct vcpu *vcpu __unused, struct vm_run *vmrun __unused) { - stats.vmexit_hlt++; - /* * Just continue execution with the next instruction. We use * the HLT VM exit as a way to be friendly with the host @@ -787,8 +770,6 @@ static int vmexit_pause(struct vmctx *ctx __unused, struct vcpu *vcpu __unused, struct vm_run *vmrun __unused) { - stats.vmexit_pause++; - return (VMEXIT_CONTINUE); } @@ -798,8 +779,6 @@ vmexit_mtrap(struct vmctx *ctx __unused, struct vcpu *vcpu, { assert(vmrun->vm_exit->inst_length == 0); - stats.vmexit_mtrap++; - #ifdef BHYVE_SNAPSHOT checkpoint_cpu_suspend(vcpu_id(vcpu)); #endif @@ -822,8 +801,6 @@ vmexit_inst_emul(struct vmctx *ctx __unused, struct vcpu *vcpu, vme = vmrun->vm_exit; - stats.vmexit_inst_emul++; - vie = &vme->u.inst_emul.vie; if (!vie->decoded) { /*