From nobody Sat Jun 24 19:30:15 2023 X-Original-To: dev-commits-src-main@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 4QpPMX0h47z4gWHC; Sat, 24 Jun 2023 19:30:16 +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 4QpPMX0CDpz3HG2; Sat, 24 Jun 2023 19:30:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687635016; 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=Ttj+4mm4LqVQMGWLz/g/rb4+n245hhQSGVYo+BGgdTY=; b=EYdxXDAS+8DEiV3nPWETta57jUSZJzRHU+4WUuktcBbC56WbckB39JbCBHPG57R02v3fHW Wg09bDz4D580yNlWp28/e+vmp4gEvnjrcMQ0wB8v8VpZzLPcGh/poCXb9WumIEYmqA+ksL wfu/3n06KWU3akFm/q0r6SKg+i+sdq5JS2J58jf1WGzOkvprF6Zfmmw7/b21QeUfsPlHNU yOSN98JaCO5osMnVTCUAMiNHyc+UDP89DhTfeEj5L8lvai7Bcm1Y0fTu67HlZ50QsTWxGS jdNCLFdbNeKzdJLHGEEsFqjw34jz7ftpihHKSacucTv6k/0BXyRjWC00Ae0Cdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1687635016; 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=Ttj+4mm4LqVQMGWLz/g/rb4+n245hhQSGVYo+BGgdTY=; b=t6RMC6WyQq8/DPQmk7cl/2lhTN4DbpSSLaaKwfads5VSEPgAnSP0VF2NLBtkwU9/lKA/J9 +ZUWGuJMHR4vPcjnSVfY4lDEBsfBvKEDLXb2qxhL61dJ2qWs3E4IxhaUBZ3V1UbpmfEpxM 2rke8SUvG3kygw79R7RFHM5Uiqdj1eX8uvWkbsuCq8sf2E01sjS0sO8807BYb4/ggx20am 7HuraJ/t7cOL8Lz1usOTHGNmI/BqRp/73UIGmJV+UNPBdcc/hUeA/fIePmqCtzDfgVnETx x9eF1seczcIFx1/DGzlrSQ+UMj/mksdCnEpyIFcoSJ1OiHmsgq80I+8a169QNA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1687635016; a=rsa-sha256; cv=none; b=ySeyw1h+t1JlI2RO1WcvzkZ3l8Ob+gaPsLsxuENV+jpKewE4LXphbzja5h6l6BPu9vVKO6 WxVViTD8lyQEPvBZH/trrpZJtA3/xl4v7XpK88Zg8xWIt/AFXsnsftRu/4E8S7hTMHja84 jxK0AwgA5u5X7AGtpgSsXh3T0TWmB4c12ONI4J8wZFGiis1eHYWG5rWQYS1v+QuNp3joxd 7Cy6QotWiM6rfjtwPfRWV6S358qRInPhWHVhWXLpXF6Jz20ASZOwymVRAU9PNdI08BExL0 qzY1mE7aVIWvNTelro3w0W0QVTWI+SP6Lkrr132KgFs/dSzYyLOT7CS1MZo6bQ== 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 4QpPMW6PQwzyLW; Sat, 24 Jun 2023 19:30:15 +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 35OJUF1G049749; Sat, 24 Jun 2023 19:30:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 35OJUFcO049743; Sat, 24 Jun 2023 19:30:15 GMT (envelope-from git) Date: Sat, 24 Jun 2023 19:30:15 GMT Message-Id: <202306241930.35OJUFcO049743@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 17e97d41e7a1 - main - hwpmc: add 'flags' local to pmc_op_do_pmcallocate() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 17e97d41e7a1ffc21459d593064e21c5549bd233 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=17e97d41e7a1ffc21459d593064e21c5549bd233 commit 17e97d41e7a1ffc21459d593064e21c5549bd233 Author: Mitchell Horne AuthorDate: 2023-06-19 18:54:31 +0000 Commit: Mitchell Horne CommitDate: 2023-06-24 19:29:59 +0000 hwpmc: add 'flags' local to pmc_op_do_pmcallocate() Similar to the other allocation parameters. No functional change. MFC after: 3 days Sponsored by: The FreeBSD Foundation --- sys/dev/hwpmc/hwpmc_mod.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/sys/dev/hwpmc/hwpmc_mod.c b/sys/dev/hwpmc/hwpmc_mod.c index 781a2c116a40..593e64cbb88b 100644 --- a/sys/dev/hwpmc/hwpmc_mod.c +++ b/sys/dev/hwpmc/hwpmc_mod.c @@ -3296,13 +3296,14 @@ pmc_do_op_pmcallocate(struct thread *td, struct pmc_op_pmcallocate *pa) struct pmc_hw *phw; enum pmc_mode mode; enum pmc_class class; - uint32_t caps; + uint32_t caps, flags; u_int cpu; int adjri, n; int error; class = pa->pm_class; caps = pa->pm_caps; + flags = pa->pm_flags; mode = pa->pm_mode; cpu = pa->pm_cpu; @@ -3349,23 +3350,23 @@ pmc_do_op_pmcallocate(struct thread *td, struct pmc_op_pmcallocate *pa) /* * Look for valid values for 'pm_flags'. */ - if ((pa->pm_flags & ~(PMC_F_DESCENDANTS | PMC_F_LOG_PROCCSW | + if ((flags & ~(PMC_F_DESCENDANTS | PMC_F_LOG_PROCCSW | PMC_F_LOG_PROCEXIT | PMC_F_CALLCHAIN | PMC_F_USERCALLCHAIN)) != 0) return (EINVAL); /* PMC_F_USERCALLCHAIN is only valid with PMC_F_CALLCHAIN. */ - if ((pa->pm_flags & (PMC_F_CALLCHAIN | PMC_F_USERCALLCHAIN)) == + if ((flags & (PMC_F_CALLCHAIN | PMC_F_USERCALLCHAIN)) == PMC_F_USERCALLCHAIN) return (EINVAL); /* PMC_F_USERCALLCHAIN is only valid for sampling mode. */ - if ((pa->pm_flags & PMC_F_USERCALLCHAIN) != 0 && mode != PMC_MODE_TS && + if ((flags & PMC_F_USERCALLCHAIN) != 0 && mode != PMC_MODE_TS && mode != PMC_MODE_SS) return (EINVAL); /* Process logging options are not allowed for system PMCs. */ if (PMC_IS_SYSTEM_MODE(mode) && - (pa->pm_flags & (PMC_F_LOG_PROCCSW | PMC_F_LOG_PROCEXIT)) != 0) + (flags & (PMC_F_LOG_PROCCSW | PMC_F_LOG_PROCEXIT)) != 0) return (EINVAL); /* @@ -3391,7 +3392,7 @@ pmc_do_op_pmcallocate(struct thread *td, struct pmc_op_pmcallocate *pa) pmc->pm_event = pa->pm_ev; pmc->pm_state = PMC_STATE_FREE; pmc->pm_caps = caps; - pmc->pm_flags = pa->pm_flags; + pmc->pm_flags = flags; /* XXX set lower bound on sampling for process counters */ if (PMC_IS_SAMPLING_MODE(mode)) {