Date: Mon, 15 Dec 2025 12:49:08 -0800 From: Mark Millard <marklmi@yahoo.com> To: Steve Kargl <kargls@comcast.net> Cc: freebsd-hackers <freebsd-hackers@freebsd.org> Subject: Re: profiling a user executable? Message-ID: <920EC775-E8F9-4A10-A619-3A9C8B563C11@yahoo.com> In-Reply-To: <47F509B6-F536-4E70-9226-16630128EC38@yahoo.com> References: <12053856-4DE5-4B98-9309-028869BB5395.ref@yahoo.com> <12053856-4DE5-4B98-9309-028869BB5395@yahoo.com> <fe1f5702-fcd0-4fea-bf34-be070713abae@comcast.net> <B8A4B3EA-FB41-474C-B4BD-8722FC7C4AED@yahoo.com> <47F509B6-F536-4E70-9226-16630128EC38@yahoo.com>
index | next in thread | previous in thread | raw e-mail
Hello again, https://man.freebsd.org/cgi/man.cgi?query=pmc.amd&apropos=0&sektion=3&manpath=FreeBSD+16.0-CURRENT&arch=default&format=html documents for pmc.amd contexts: Event Name Aliases Event name aliases are PMC-independent names for commonly used events. The following aliases are known to this version of the pmc library: branches Measure the number of branches retired. branch-mispredicts Measure the number of retired branches that were mispredicted. cycles Measure processor cycles. This event is implemented using the processor's Time Stamp Counter register. dc-misses Measure the number of data cache misses. ic-misses Measure the number of instruction cache misses. instructions Measure the number of instructions retired. interrupts Measure the number of interrupts seen. unhalted-cycles Measure the number of cycles the processor is not in a halted or sleep state. Modern ZEN documention does have some correspondance to the pmc.amd(3) documentation, for example for 76H and C0H having material similar to the k8-* descriptions, if you ignore the k8-* naming: AMD K8 Event Specifiers The event specifiers supported on AMD K8 PMCs are: k8-bu-cpu-clk-unhalted (Event 76H) Count the number of clock cycles when the CPU is not in the HLT or STPCLK states. . . . k8-fr-retired-x86-instructions (Event C0H) Count retired x86 instructions including exceptions and interrupts. . . . Just ignore the k8-* names and use the Aliases for amd. But the directory name created will be the modern detailed one, such as: ls_not_halted_cyc/ for the 76H for what I'm using. The aliases do not extend to aarch64, and probably not to intel. It does look like some Intel processors have C0H being similar to amd, such as man pmc.sandybridge reporting: INST_RETIRED.ANY_P (Event C0H, Umask 00H) Number of instructions at retirement. INST_RETIRED.PREC_DIST (Event C0H, Umask 01H) Precise instruction retired event with HW to reduce effect of PEBS shadow in IP distribution PMC1 only; Must quiesce other PMCs. INST_RETIRED.X87 (Event C0H, Umask 02H) X87 instruction retired event. But I did not find a 76H. === Mark Millard marklmi at yahoo.comhelp
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?920EC775-E8F9-4A10-A619-3A9C8B563C11>
