From nobody Tue Feb 11 15:25:58 2025 X-Original-To: freebsd-arm@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 4Ysldh05bBz5nkCb for ; Tue, 11 Feb 2025 15:26:00 +0000 (UTC) (envelope-from bugzilla-noreply@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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Ysldg0dxbz3Wxy for ; Tue, 11 Feb 2025 15:25:59 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1739287559; 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=zzADrAWth4PNRkN/MKwdzfYlafKpuNoJ1wXn2HNIGMs=; b=kYxnIbyyAKeSqQQhvDUMnGaOKChmXA0huTS7/CrRxAM9URz/4yHYoJnWiAMJqsLRy8ErBd Fkn7l6e0xqj5IvHj3SxRgQtL+qyxVOLOz3ZGFTtfYMmQaeYUvCfLuAz+pvBJ0qKpX3Sybr SaRdakd7vYwcNYMs5UZc7/8hP/USz45SJOH97sTLHepjg9Y7W24Ac7lbm1Lp2N+hzD+oBZ 55f6hwQehOnEdEIP3HO7OzTJnT6aMKUr3OsYQlJg+jH3LfKBWF0fa2pgDLiXyuVih3f765 k4jxFVjeCrtT4l8zgrBoQ5HwPi2zrwSQLG/EmtXRvRCXJNaBhB+wEj93Owrlzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1739287559; 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=zzADrAWth4PNRkN/MKwdzfYlafKpuNoJ1wXn2HNIGMs=; b=ozH6D+NoAZKy0XCIysvBHVxjbR6r7E5SQmBOwHxklxnVtU2gSqwieQo+OaJrMorwZ2pTJQ NAagDBq67z35qcETYwZAiYUT+Bor4MspiW9+g9b6MBYWP6p1d4sgupJDEtfq/Kp8WMGqQO wSdH3Jka2UkRhzYYZ++D7letVTDFaAJoOW7tewwfqORWdAJSwCcSqtkYncAokK4fyLEri2 ZkaRTdJXs/GYYk/ahLNDSzlHCl9rtcqmG4ACXg5Vy3sVzCf3N1OxhUVYJ4c8IMUrZgJVpD byNZ0lLuHLCgDrYpdfTRgNNgP4ekr7ksGPDQ/ngg2+O3ZKHiwQayxOepOi/7Mw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1739287559; a=rsa-sha256; cv=none; b=hm1tluTkGzFjb3okYXPYMxq1z/G7m0qs58ls96m+MjancrEbk2WK7Igvm1TBow1u6HaH04 RrhjwSnfjmf7emz0i56BbMJ0fGuPvpBATTPdEaG+U0X7JyI66ztoWLuo8Fn/SxSAEdwYXt cXDiQhBIEYOa8i8SdYo69pZrPVyCQh9jNMtFsbcG+LCHs0j/tDSDFhD1MvkNl7owZm1lAl dqo8B5Z6cPFGteyewbcpHcVJ+h/FKU2DNAykSuV6gMlQBU9NqEOGpSYN4/7mscBirIuzO/ 1ZFPyU4iqm4nE3b8QmSn5ifETSeN996L3qoXlzhXLBO2d5zObQ/ZT8ReCoBBQg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 4Ysldf6m1Vz3J1 for ; Tue, 11 Feb 2025 15:25:58 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 51BFPwOm050369 for ; Tue, 11 Feb 2025 15:25:58 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 51BFPwii050368 for freebsd-arm@FreeBSD.org; Tue, 11 Feb 2025 15:25:58 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: freebsd-arm@FreeBSD.org Subject: [Bug 284735] hwpmc: pmcstat on Ampere eMAG has glitches in counts Date: Tue, 11 Feb 2025 15:25:58 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: arm X-Bugzilla-Version: 14.2-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: jfc@mit.edu X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-arm@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D284735 Bug ID: 284735 Summary: hwpmc: pmcstat on Ampere eMAG has glitches in counts Product: Base System Version: 14.2-STABLE Hardware: arm64 OS: Any Status: New Severity: Affects Only Me Priority: --- Component: arm Assignee: freebsd-arm@FreeBSD.org Reporter: jfc@mit.edu On Ampere eMAG running stable/14, about 10-20% of the time pmcstat -p repor= ts a count 2^32 greater than the correct count. $ while true ; do pmcstat -p instructions echo \\c ; done while true ; do pmcstat -p instructions echo \\c ; done # p/instructions=20 2207015=20 # p/instructions=20 2156016=20 # p/instructions=20 4297118204=20 # p/instructions=20 2200683=20 # p/instructions=20 Note that 4297118204 is 2^32 + 2150908. On CURRENT, Cortex A53 consistently reports about 3,400,000 instructions.=20 Cortex A57 consistently reports about 4,150,000 instructions. I don't know which count is closer to the truth. On a RockPro64 pmcstat doesn't really = work because of the heterogenous cores. I am initially filing this against the arm component on the assumption that= it is CPU-specific code at fault. --=20 You are receiving this mail because: You are the assignee for the bug.=