pmc.3 (145440) | pmc.3 (145774) |
---|---|
1.\" Copyright (c) 2003 Joseph Koshy. All rights reserved. 2.\" 3.\" Redistribution and use in source and binary forms, with or without 4.\" modification, are permitted provided that the following conditions 5.\" are met: 6.\" 1. Redistributions of source code must retain the above copyright 7.\" notice, this list of conditions and the following disclaimer. 8.\" 2. Redistributions in binary form must reproduce the above copyright --- 7 unchanged lines hidden (view full) --- 16.\" for any direct, indirect, incidental, special, exemplary, or consequential 17.\" damages (including, but not limited to, procurement of substitute goods 18.\" or services; loss of use, data, or profits; or business interruption) 19.\" however caused and on any theory of liability, whether in contract, strict 20.\" liability, or tort (including negligence or otherwise) arising in any way 21.\" out of the use of this software, even if advised of the possibility of 22.\" such damage. 23.\" | 1.\" Copyright (c) 2003 Joseph Koshy. All rights reserved. 2.\" 3.\" Redistribution and use in source and binary forms, with or without 4.\" modification, are permitted provided that the following conditions 5.\" are met: 6.\" 1. Redistributions of source code must retain the above copyright 7.\" notice, this list of conditions and the following disclaimer. 8.\" 2. Redistributions in binary form must reproduce the above copyright --- 7 unchanged lines hidden (view full) --- 16.\" for any direct, indirect, incidental, special, exemplary, or consequential 17.\" damages (including, but not limited to, procurement of substitute goods 18.\" or services; loss of use, data, or profits; or business interruption) 19.\" however caused and on any theory of liability, whether in contract, strict 20.\" liability, or tort (including negligence or otherwise) arising in any way 21.\" out of the use of this software, even if advised of the possibility of 22.\" such damage. 23.\" |
24.\" $FreeBSD: head/lib/libpmc/pmc.3 145440 2005-04-23 05:45:18Z jkoshy $ | 24.\" $FreeBSD: head/lib/libpmc/pmc.3 145774 2005-05-01 14:11:49Z jkoshy $ |
25.\" 26.Dd Apr 15, 2005 27.Os 28.Dt PMC 3 29.Sh NAME 30.Nm pmc_allocate , 31.Nm pmc_attach , | 25.\" 26.Dd Apr 15, 2005 27.Os 28.Dt PMC 3 29.Sh NAME 30.Nm pmc_allocate , 31.Nm pmc_attach , |
32.Nm pmc_capabilities , |
|
32.Nm pmc_configure_logfile , 33.Nm pmc_cpuinfo , 34.Nm pmc_detach , 35.Nm pmc_disable , 36.Nm pmc_enable , 37.Nm pmc_event_names_of_class , 38.Nm pmc_get_driver_stats , 39.Nm pmc_init , --- 8 unchanged lines hidden (view full) --- 48.Nm pmc_pmcinfo , 49.Nm pmc_read , 50.Nm pmc_release , 51.Nm pmc_rw , 52.Nm pmc_set , 53.Nm pmc_start , 54.Nm pmc_stop , 55.Nm pmc_write , | 33.Nm pmc_configure_logfile , 34.Nm pmc_cpuinfo , 35.Nm pmc_detach , 36.Nm pmc_disable , 37.Nm pmc_enable , 38.Nm pmc_event_names_of_class , 39.Nm pmc_get_driver_stats , 40.Nm pmc_init , --- 8 unchanged lines hidden (view full) --- 49.Nm pmc_pmcinfo , 50.Nm pmc_read , 51.Nm pmc_release , 52.Nm pmc_rw , 53.Nm pmc_set , 54.Nm pmc_start , 55.Nm pmc_stop , 56.Nm pmc_write , |
57.Nm pmc_width , |
|
56.Nm pmc_x86_get_msr 57.Nd programming API for using hardware performance monitoring counters 58.Sh LIBRARY 59.Lb libpmc 60.Sh SYNOPSIS 61.In pmc.h 62.Ft int 63.Fo pmc_allocate --- 4 unchanged lines hidden (view full) --- 68.Fa "pmc_id_t *pmcid" 69.Fc 70.Ft int 71.Fo pmc_attach 72.Fa "pmc_id_t pmcid" 73.Fa "pid_t pid" 74.Fc 75.Ft int | 58.Nm pmc_x86_get_msr 59.Nd programming API for using hardware performance monitoring counters 60.Sh LIBRARY 61.Lb libpmc 62.Sh SYNOPSIS 63.In pmc.h 64.Ft int 65.Fo pmc_allocate --- 4 unchanged lines hidden (view full) --- 70.Fa "pmc_id_t *pmcid" 71.Fc 72.Ft int 73.Fo pmc_attach 74.Fa "pmc_id_t pmcid" 75.Fa "pid_t pid" 76.Fc 77.Ft int |
78.Fn pmc_capabilities "pmc_id_t pmc" "uint32_t *caps" 79.Ft int |
|
76.Fn pmc_configure_logfile "int fd" 77.Ft int 78.Fn pmc_cpuinfo "const struct pmc_op_getcpuinfo **cpu_info" 79.Ft int 80.Fo pmc_detach 81.Fa "pmc_id_t pmcid" 82.Fa "pid_t pid" 83.Fc --- 41 unchanged lines hidden (view full) --- 125.Fn pmc_set "pmc_id_t pmc" "pmc_value_t value" 126.Ft int 127.Fn pmc_start "pmc_id_t pmc" 128.Ft int 129.Fn pmc_stop "pmc_id_t pmc" 130.Ft int 131.Fn pmc_write "pmc_id_t pmc" "pmc_value_t value" 132.Ft int | 80.Fn pmc_configure_logfile "int fd" 81.Ft int 82.Fn pmc_cpuinfo "const struct pmc_op_getcpuinfo **cpu_info" 83.Ft int 84.Fo pmc_detach 85.Fa "pmc_id_t pmcid" 86.Fa "pid_t pid" 87.Fc --- 41 unchanged lines hidden (view full) --- 129.Fn pmc_set "pmc_id_t pmc" "pmc_value_t value" 130.Ft int 131.Fn pmc_start "pmc_id_t pmc" 132.Ft int 133.Fn pmc_stop "pmc_id_t pmc" 134.Ft int 135.Fn pmc_write "pmc_id_t pmc" "pmc_value_t value" 136.Ft int |
137.Fn pmc_width "pmc_id_t pmc" "uint32_t *width" 138.Ft int |
|
133.Fn pmc_x86_get_msr "int pmc" "uint32_t *msr" 134.Sh DESCRIPTION 135These functions implement a high-level library for using the 136system's hardware performance counters. 137.Pp 138PMCs are allocated using 139.Fn pmc_allocate , 140released using --- 106 unchanged lines hidden (view full) --- 247.Fn pmc_read 248and written using 249.Fn pmc_write , 250provided the underlying hardware supports these operations on 251the allocated PMC. 252The read and write operation may be combined using 253.Fn pmc_rw . 254.Pp | 139.Fn pmc_x86_get_msr "int pmc" "uint32_t *msr" 140.Sh DESCRIPTION 141These functions implement a high-level library for using the 142system's hardware performance counters. 143.Pp 144PMCs are allocated using 145.Fn pmc_allocate , 146released using --- 106 unchanged lines hidden (view full) --- 253.Fn pmc_read 254and written using 255.Fn pmc_write , 256provided the underlying hardware supports these operations on 257the allocated PMC. 258The read and write operation may be combined using 259.Fn pmc_rw . 260.Pp |
261The function 262.Fn pmc_capabilities 263sets argument 264.Fa caps 265to a bitmask of capabilities supported by the PMC denoted by 266argument 267.Fa pmc . 268The function 269.Fn pmc_width 270sets argument 271.Fa width 272to the width of the PMC denoted by argument 273.Fa pmc . 274.Pp |
|
255The 256.Fn pmc_configure_logfile 257function causes the 258.Xr hwpmc 4 259driver to log system wide performance data to file corresponding 260to the process' file handle 261.Fa fd . 262.Pp --- 2743 unchanged lines hidden (view full) --- 3006The version number of the 3007.Xr hwpmc 4 3008kernel module did not match that compiled into the 3009.Xr pmc 3 3010library. 3011.El 3012.Pp 3013A call to | 275The 276.Fn pmc_configure_logfile 277function causes the 278.Xr hwpmc 4 279driver to log system wide performance data to file corresponding 280to the process' file handle 281.Fa fd . 282.Pp --- 2743 unchanged lines hidden (view full) --- 3026The version number of the 3027.Xr hwpmc 4 3028kernel module did not match that compiled into the 3029.Xr pmc 3 3030library. 3031.El 3032.Pp 3033A call to |
3034.Fn pmc_capabilities , |
|
3014.Fn pmc_name_of_capability , 3015.Fn pmc_name_of_disposition , 3016.Fn pmc_name_of_state , 3017.Fn pmc_name_of_event , 3018.Fn pmc_name_of_mode | 3035.Fn pmc_name_of_capability , 3036.Fn pmc_name_of_disposition , 3037.Fn pmc_name_of_state , 3038.Fn pmc_name_of_event , 3039.Fn pmc_name_of_mode |
3019and | |
3020.Fn pmc_name_of_class | 3040.Fn pmc_name_of_class |
3041and 3042.Fn pmc_width |
|
3021may fail with the following error: 3022.Bl -tag -width Er 3023.It Bq Er EINVAL 3024An invalid argument was passed to the function. 3025.El 3026.Pp 3027A call to 3028.Fn pmc_cpuinfo --- 87 unchanged lines hidden --- | 3043may fail with the following error: 3044.Bl -tag -width Er 3045.It Bq Er EINVAL 3046An invalid argument was passed to the function. 3047.El 3048.Pp 3049A call to 3050.Fn pmc_cpuinfo --- 87 unchanged lines hidden --- |