1 .\" Copyright (c) 2007 Joseph Koshy. All rights reserved.
3 .\" Redistribution and use in source and binary forms, with or without
4 .\" modification, are permitted provided that the following conditions
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
9 .\" notice, this list of conditions and the following disclaimer in the
10 .\" documentation and/or other materials provided with the distribution.
12 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
13 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
15 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
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
27 .Dt PMC_NAME_OF_CAPABILITY 3
30 .Nm pmc_name_of_capability ,
31 .Nm pmc_name_of_class ,
32 .Nm pmc_name_of_cputype ,
33 .Nm pmc_name_of_disposition ,
34 .Nm pmc_name_of_event ,
35 .Nm pmc_name_of_mode ,
37 .Nd human readable names for numeric constants used by
46 .Fn pmc_name_of_capability "enum pmc_caps pc"
48 .Fn pmc_name_of_class "enum pmc_class pc"
50 .Fn pmc_name_of_cputype "enum pmc_cputype ct"
52 .Fn pmc_name_of_disposition "enum pmc_disp pd"
54 .Fn pmc_name_of_event "enum pmc_event pe"
56 .Fn pmc_name_of_mode "enum pmc_mode pm"
58 .Fn pmc_name_of_state "enum pmc_state ps"
60 These convenience functions translate numeric constants used by the
64 pointers to human readable representations of their arguments.
67 .Fn pmc_name_of_capability
68 translates a PMC capability flag given in argument
70 to a human readable string.
71 PMC capabilities are described in
76 translates the PMC class value specified in argument
78 to a human readable name.
79 PMC classes are described in
83 .Fn pmc_name_of_cputype
84 translates the CPU type value specified in argument
86 to a human readable name.
87 CPU types known to the library are described in
91 .Fn pmc_name_of_disposition
92 translates the PMC row disposition specified in argument
94 to a human readable name.
95 PMC row dispositions are described in
100 translates the PMC event number specified by argument
103 PMC event names are documented in section
110 translates the PMC mode specified by argument
112 to a human readable string.
113 PMC modes are described in
117 .Fn pmc_name_of_state
118 translates the value of argument
120 to a human readable name.
121 .Sh IMPLEMENTATION NOTES
122 The returned pointers point to static storage inside the PMC
123 library and should not be freed by the caller.
125 These functions return a non-NULL pointer on successful completion.
126 In case of an error, a NULL pointer is returned and the global
129 is set to indicate the error.
131 A call to these functions may fail with the following errors:
134 The function argument specified an invalid value.