From nobody Sun Jul 9 19:04:19 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 4Qzc4h0Gr9z4lNpy; Sun, 9 Jul 2023 19:04:20 +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 4Qzc4g6xrJz4FG8; Sun, 9 Jul 2023 19:04:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688929460; 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=jiXh16UZmUwQY3GNJfvKbOzBS8Tbq+bj9hl25jabtkk=; b=xJNOUhXTLSA6wt1Z+YT2jXhQJcuuFdOlbVfpheQ7qzdG1GutmAscFzUsyTntQfstI6TrRy wd+tD+LoQ8c7sZyuJAKDGxSMtDY6/CyedoUmikIO5ere7F39wI5ef9fC7Gh8/5kns0rKh5 CnFNViI0x2Nt2k3yX13Kwi/nBrV+PkJnisR+cxtW+be8vSbQOK50gt5N8M+6Gp4eIGtWty thSUkWpDuchQQgybnYlwxfoC03jx6Ts/lT1T9HbMCkJ8MaBGOIMDsYi396fBnd4Slw+ZOJ 9+EEghhP9tNRLF1V7l+H2FrkpxKRJstK5cFPS51ZSfwtoZNzaQbDTIVQzQNYlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1688929460; 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=jiXh16UZmUwQY3GNJfvKbOzBS8Tbq+bj9hl25jabtkk=; b=Mp8pv6PiRuPh3wgJ3EeU5ExzoM6cI6IcCKtPNCzVIXUoxTThMRN10NC1CeTJWy1oIWCF33 aMBJOhIXuvTQm5AlkWB8895kGuPhwi/7rG5S7uEsjSR1HPoHpNxYG9W+cbM4jt6hpkypMS vy61YG7al8nEGKWZxvkGEXNiCibTNa22dRfTcE0dj8lXmZpbEL6quMYd4VYyxTVTgfM5nC YfbDMjvW7glDFbPVJ7elXKZWghUyg20zelbp1JuG9syc22koRC6hVy3ahIBIEseyGPJHV2 N8mB8+l8JjKUYSxmSepGkGpLd9mFkmvJyjK+05GoNWNMNNaT1nhpBONtnbNCFA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1688929460; a=rsa-sha256; cv=none; b=fhGeoQSgnvZk8UtsKK7GsFd1A3Poms1xNfp3SReGqpq9PFfKVsglUFmK2ObtTtCuV/BvWI 9Q1FLWM2q/XPtZL83PlJaqW9OdlVGy/AiTK1HzMnwiWxjkiNRUXLBLj/lmmQYneohvJuTK uNOpbb2kYlaOLH5XCWa3C4q5EPrVCB+B2/URzEIubQdUwYAt7mnwj+YEbaVyEhQk/BUu71 xrfalPB1VLfVOxHb5jG0nyHeWWaiKks+ohbQv42+z2rwYNOBpacx/9dIh6VdHUItmbzmXJ oQLjIAUNVMA79A4RGo4EA1Hw6ksSpUkDTnKT7X7G3z7t2uvpgKT2/NA1sXy10A== 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 4Qzc4g62BxzFQF; Sun, 9 Jul 2023 19:04:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 369J4JCl017662; Sun, 9 Jul 2023 19:04:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 369J4Jau017661; Sun, 9 Jul 2023 19:04:19 GMT (envelope-from git) Date: Sun, 9 Jul 2023 19:04:19 GMT Message-Id: <202307091904.369J4Jau017661@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: 89240e0ab60a - main - hwpmc(4): update DEBUGGING section details 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: 89240e0ab60a29a47c9af9f952a09a7f2e1bb72c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=89240e0ab60a29a47c9af9f952a09a7f2e1bb72c commit 89240e0ab60a29a47c9af9f952a09a7f2e1bb72c Author: Mitchell Horne AuthorDate: 2023-07-09 19:01:55 +0000 Commit: Mitchell Horne CommitDate: 2023-07-09 19:03:54 +0000 hwpmc(4): update DEBUGGING section details The examples I wrote previously do not work. We parse the flags using explicit names, not the shortened flag suffix. Fix the list of major flags, and add a compact list of minor flags. Fix the examples, and tweak some wording for clarity. Reviewed by: jkoshy, emaste MFC after: 1 week Sponsored by: The FreeBSD Foundation Fixes: 5fc97cc32553 ("hwpmc(4): document debugging options") Differential Revision: https://reviews.freebsd.org/D40913 --- share/man/man4/hwpmc.4 | 68 +++++++++++++++++++++++++++++++++++++------------- 1 file changed, 51 insertions(+), 17 deletions(-) diff --git a/share/man/man4/hwpmc.4 b/share/man/man4/hwpmc.4 index 1794adb66460..1b99e8c8439c 100644 --- a/share/man/man4/hwpmc.4 +++ b/share/man/man4/hwpmc.4 @@ -558,32 +558,65 @@ logged to the trace buffer. .Pp .Nm trace events are grouped by 'major' and 'minor' flag types. -The major flag groups are as follows: +The major flag names are as follows: .Pp -.Bl -tag -compact -offset indent -.It CPU +.Bl -tag -width "sampling" -compact -offset indent +.It cpu CPU events -.It CSW +.It csw Context switch events -.It LOG +.It logging Logging events -.It MDP +.It md Machine-dependent/class-dependent events -.It MOD +.It module Miscellaneous events -.It OWN +.It owner PMC owner events -.It PMC +.It pmc PMC management events -.It PRC +.It process Process events -.It SAM +.It sampling Sampling events .El .Pp The minor flags for each major flag group can vary. -For the full list of flag groups, consult -.In sys/pmc.h . +The individual minor flag names are: +.Bd -ragged -offset indent +allocaterow, +allocate, +attach, +bind, +config, +exec, +exit, +find, +flush, +fork, +getbuf, +hook, +init, +intr, +linktarget, +mayberemove, +ops, +read, +register, +release, +remove, +sample, +scheduleio, +select, +signal, +swi, +swo, +start, +stop, +syscall, +unlinktarget, +write +.Ed .Pp The .Va kern.hwpmc.debugflags @@ -591,18 +624,19 @@ variable is a string with a custom format. The string should contain a space-separated list of event specifiers. Each event specifier consists of the major flag name, followed by an equal sign (=), followed by a comma-separated list of minor event types. -To track all events for a major group, an asterisk (*) can be given instead. +To track all events for a major group, an asterisk (*) can be given instead of +minor event names. .Pp For example, to trace all allocation and release events, set .Va debugflags as follows: .Bd -literal -offset indent -kern.hwpmc.debugflags="pmc=all,rel mdp=all,rel" +kern.hwpmc.debugflags="pmc=allocate,release md=allocate,release" .Ed .Pp -To trace all process events, as well as context switches: +To trace all events in the process and context switch major flag groups: .Bd -literal -offset indent -kern.hwpmc.debugflags="prc=* csw=*" +kern.hwpmc.debugflags="process=* csw=*" .Ed .Pp To disable all trace events, set the variable to an empty string.