From nobody Sat Dec 30 01:51:09 2023 X-Original-To: freebsd-questions@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 4T24wm00Rhz55n2l for ; Sat, 30 Dec 2023 01:51:36 +0000 (UTC) (envelope-from varun@guag.net) Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) (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 mx1.freebsd.org (Postfix) with ESMTPS id 4T24wl3DXTz4fjd for ; Sat, 30 Dec 2023 01:51:35 +0000 (UTC) (envelope-from varun@guag.net) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=guag.net header.s=fm2 header.b=WrZS5jI1; dkim=pass header.d=messagingengine.com header.s=fm2 header.b=A3oVFlq9; spf=pass (mx1.freebsd.org: domain of varun@guag.net designates 66.111.4.26 as permitted sender) smtp.mailfrom=varun@guag.net; dmarc=pass (policy=none) header.from=guag.net Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 597115C010E for ; Fri, 29 Dec 2023 20:51:35 -0500 (EST) Received: from imap43 ([10.202.2.93]) by compute6.internal (MEProxy); Fri, 29 Dec 2023 20:51:35 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=guag.net; h=cc :content-type:content-type:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:subject:subject:to:to; s=fm2; t=1703901095; x=1703987495; bh=CbNTBYCTQr6yPStaymZSwlmE4n+Ha8JH NrkIA/bGqFQ=; b=WrZS5jI13JwN0RYuhFOIsf5m/w8Cp3KyorHYgkCkOr22lQOI mhq4OfY/ahNr1u5tt3tO4d41i7vAJPfjmyM+3/TKYQO6usl57NiFloViReoB83Tr /JdnzVqicFV1aE/beSesRtVK7hCCxHWeXjYuWVQlN8qnhr9kGoa9Fm2eEfGAhHD4 Cgl6f8dsXeiazeMszciNKrzGa8l7nz/MIaCj9agZxemZM/bSCTq4mERMcRHcWSEv +m6ZRCQ6ukd+8V9M6fRc2v5+yLSo6nq0qq5BlzTiDlTsan+jLSx4Fpvyz936wv05 bbAmNEBj7Hcrw8qcEOLRNdB/i3PcOwaZyTzupw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1703901095; x=1703987495; bh=CbNTBYCTQr6yPStaymZSwlmE4n+Ha8JHNrk IA/bGqFQ=; b=A3oVFlq9X7wlCIKGtujtRdUYc/OY+85pUCZtA3E9RRmexJeP6oo zzQ9kCHQ7cWW60QIo0rmho5ZEwTnxWraKWF8dU1zBXoqkHfwcEdy8DLbYtpi7lAB ngYPzL6AzeQRDhNhrW5SmwFntY+OrcqIhKtDl45ppzkcFcJuL/HfMMSMaBh0oTJU eNdWD5s8IBiI2mmQk12aH+i8UGyZGfEdxMn6wcXoamn/hiU57kST4LM6Wh5zvcvi MEGCucxwOYH4x4mmpOiEhlL020QIg/eQJpD/AiGcBKh+vgIcaC4VE1WmPWPmxycR axZUmvO6BtZKe98zIXZjrAoQh2qiV4fG/1Q== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrvdefgedggeduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefofgggkfffhffvufgtsegrtderre erredtnecuhfhrohhmpedfgggrrhhunhcutehgrhgrfigrlhdfuceovhgrrhhunhesghhu rghgrdhnvghtqeenucggtffrrghtthgvrhhnpeetgedtleetieeiueegffdtieegfeeggf fgvedtheeggeejkeeiveehtdffjeetveenucevlhhushhtvghrufhiiigvpedtnecurfgr rhgrmhepmhgrihhlfhhrohhmpehvrghruhhnsehguhgrghdrnhgvth X-ME-Proxy: Feedback-ID: i2c114938:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 21FC42D40087; Fri, 29 Dec 2023 20:51:35 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-1364-ga51d5fd3b7-fm-20231219.001-ga51d5fd3 List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 Message-Id: <19399bfd-f7e2-4619-b295-db7cd7d6aa6f@app.fastmail.com> Date: Fri, 29 Dec 2023 20:51:09 -0500 From: "Varun Agrawal" To: freebsd-questions@freebsd.org Subject: Collecting performance counter on AMD Zen processors Content-Type: multipart/alternative; boundary=5bcc403860ff43b4ab675754dba3db05 X-Spamd-Result: default: False [-5.19 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; DWL_DNSWL_LOW(-1.00)[messagingengine.com:dkim]; NEURAL_HAM_SHORT(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[guag.net,none]; R_SPF_ALLOW(-0.20)[+ip4:66.111.4.26:c]; R_DKIM_ALLOW(-0.20)[guag.net:s=fm2,messagingengine.com:s=fm2]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; RCVD_IN_DNSWL_LOW(-0.10)[66.111.4.26:from]; RWL_MAILSPIKE_GOOD(-0.10)[66.111.4.26:from]; XM_UA_NO_VERSION(0.01)[]; MLMMJ_DEST(0.00)[freebsd-questions@freebsd.org]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_NONE(0.00)[]; DKIM_TRACE(0.00)[guag.net:+,messagingengine.com:+]; ASN(0.00)[asn:19151, ipnet:66.111.4.0/24, country:US]; RCPT_COUNT_ONE(0.00)[1]; ARC_NA(0.00)[] X-Rspamd-Queue-Id: 4T24wl3DXTz4fjd X-Spamd-Bar: ----- --5bcc403860ff43b4ab675754dba3db05 Content-Type: text/plain Hello, I run FreeBSD 14 on a machine with AMD Zen3 cores. I want to collect CPU performance metrics such as IPC, L1/L2/L3 miss rate, TLB miss rate, etc. To my surprise, I don't find any tool that supports collecting this data. I find that FreeBSD has support for collecting this data using hwpmc, but hwpmc only supports the AMD K7 and K8 architecture. Is someone planning to add support for AMD Zen cores? If not, I can help add this support. If there is another way to collect CPU performance counter data on FreeBSD, I would like to learn about that too. Regards, Varun --5bcc403860ff43b4ab675754dba3db05 Content-Type: text/html
Hello,

I run FreeBSD 14 on a machine with AMD Zen3 cores. I want to collect CPU performance metrics such as IPC, L1/L2/L3 miss rate, TLB miss rate, etc. To my surprise, I don't find any tool that supports collecting this data.

I find that FreeBSD has support for collecting this data using hwpmc, but hwpmc only supports the AMD K7 and K8 architecture. Is someone planning to add support for AMD Zen cores? If not, I can help add this support.

If there is another way to collect CPU performance counter data on FreeBSD, I would like to learn about that too.

Regards,
Varun
--5bcc403860ff43b4ab675754dba3db05--