aboutsummaryrefslogtreecommitdiff
path: root/share/examples/hwpmc
Commit message (Collapse)AuthorAgeFilesLines
* Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-232-2/+0
| | | | | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/ Similar commit in main: (cherry picked from commit d0b2dbfa0ecf)
* Remove $FreeBSD$: two-line .h patternWarner Losh2023-08-231-2/+0
| | | | | | | Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/ Similar commit in main: (cherry picked from commit b3e7694832e8)
* hwpmc: add summary command and further metadata extensionsMatt Macy2018-06-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | metadata changes: - log pmc sample rate with pmcallocate - log proc flags with thread / process logging to identify user vs kernel threads fixes: - use log cpuid to translate event id to event name Implement rudimentary summary command to track sample counts by thread and process name within a pmc log. % make -j4 buildkernel >& /dev/null & % sudo pmcstat -S unhalted_core_cycles -S llc-misses -O foo sleep 15 % pmc summary foo cpu_clk_unhalted.thread_p_any: idle: 138108207162 clang-6.0: 105336158004 sh: 72340108510 make: 8642012963 kernel: 7754011631 longest_lat_cache.miss: clang-6.0: 87502625 sh: 40901227 make: 5500165 kernel: 3300099 awk: 2000060 % pmc summary -f ~/foo idx: 278 name: cpu_clk_unhalted.thread_p_any rate: 2000003 idle: 69054 clang-6.0: 52668 sh: 36170 make: 4321 kernel: 3877 hwpmc: proc(7445): 3319 awk: 1289 xargs: 357 rand_harvestq: 181 mtree: 102 intr: 53 zfskern: 31 usb: 7 pagedaemon: 4 ntpd: 3 syslogd: 1 acpi_thermal: 1 logger: 1 syncer: 1 snmptrapd: 1 sleep: 1 idx: 17 name: longest_lat_cache.miss rate: 100003 clang-6.0: 875 sh: 409 make: 55 kernel: 33 awk: 20 hwpmc: proc(7445): 14 xargs: 9 idle: 8 intr: 3 zfskern: 2 Notes: svn path=/head/; revision=334701
* Update share/examples/* to properly install /usr/share/examples.Glen Barber2016-05-101-0/+2
| | | | | | | | | | | | | As result of this, a new examples package is now created. Note, this is only effective with 'SHARED=copies' (the default), as the 'SHARED=symlinks' mechanism will create a symlink to the source tree version of the file(s). Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=299293
* Various style(9) and related fixes.George V. Neville-Neil2014-07-311-32/+23
| | | | | | | | | | | | Update the copyright to be more in line with the current version in our tree. Remove the ancient rcsid. Add a proper return from the main function Pointed out by: bz Notes: svn path=/head/; revision=269345
* Add an example program to show how to use libpmc from a program.George V. Neville-Neil2014-07-313-2/+124
| | | | | | | | | | This particular program attempts to use the TSC to measure how long certainly libpmc operations take. Depending on the quality of the rdtsc() macro on a particular architecture this may work more or less well. Notes: svn path=/head/; revision=269327
* Bring a working snapshot of hwpmc(4), its associated libraries, userland ↵Joseph Koshy2005-04-191-0/+8
utilities and documentation into -CURRENT. Bump FreeBSD_version. Reviewed by: alc, jhb (kernel changes) Notes: svn path=/head/; revision=145256