xref: /freebsd/lib/libpmc/pmc_event_names_of_class.3 (revision c2025a76606b44c4d5367b7509fbc0285ae1e7f8)
1115cadfdSJoseph Koshy.\" Copyright (c) 2007 Joseph Koshy.  All rights reserved.
2115cadfdSJoseph Koshy.\"
3115cadfdSJoseph Koshy.\" Redistribution and use in source and binary forms, with or without
4115cadfdSJoseph Koshy.\" modification, are permitted provided that the following conditions
5115cadfdSJoseph Koshy.\" are met:
6115cadfdSJoseph Koshy.\" 1. Redistributions of source code must retain the above copyright
7115cadfdSJoseph Koshy.\"    notice, this list of conditions and the following disclaimer.
8115cadfdSJoseph Koshy.\" 2. Redistributions in binary form must reproduce the above copyright
9115cadfdSJoseph Koshy.\"    notice, this list of conditions and the following disclaimer in the
10115cadfdSJoseph Koshy.\"    documentation and/or other materials provided with the distribution.
11115cadfdSJoseph Koshy.\"
12115cadfdSJoseph Koshy.\" This software is provided by Joseph Koshy ``as is'' and
13115cadfdSJoseph Koshy.\" any express or implied warranties, including, but not limited to, the
14115cadfdSJoseph Koshy.\" implied warranties of merchantability and fitness for a particular purpose
15115cadfdSJoseph Koshy.\" are disclaimed.  in no event shall Joseph Koshy be liable
16115cadfdSJoseph Koshy.\" for any direct, indirect, incidental, special, exemplary, or consequential
17115cadfdSJoseph Koshy.\" damages (including, but not limited to, procurement of substitute goods
18115cadfdSJoseph Koshy.\" or services; loss of use, data, or profits; or business interruption)
19115cadfdSJoseph Koshy.\" however caused and on any theory of liability, whether in contract, strict
20115cadfdSJoseph Koshy.\" liability, or tort (including negligence or otherwise) arising in any way
21115cadfdSJoseph Koshy.\" out of the use of this software, even if advised of the possibility of
22115cadfdSJoseph Koshy.\" such damage.
23115cadfdSJoseph Koshy.\"
24115cadfdSJoseph Koshy.\" $FreeBSD$
25115cadfdSJoseph Koshy.\"
26115cadfdSJoseph Koshy.Dd November 23, 2007
27115cadfdSJoseph Koshy.Dt PMC_EVENT_NAMES_OF_CLASS 3
28aa12cea2SUlrich Spörlein.Os
29115cadfdSJoseph Koshy.Sh NAME
30115cadfdSJoseph Koshy.Nm pmc_event_names_of_class
31115cadfdSJoseph Koshy.Nd return a list of event names supported by a PMC class.
32115cadfdSJoseph Koshy.Sh LIBRARY
33115cadfdSJoseph Koshy.Lb libpmc
34115cadfdSJoseph Koshy.Sh SYNOPSIS
35115cadfdSJoseph Koshy.In pmc.h
36115cadfdSJoseph Koshy.Ft int
37115cadfdSJoseph Koshy.Fo pmc_event_names_of_class
38115cadfdSJoseph Koshy.Fa "enum pmc_class cl"
39115cadfdSJoseph Koshy.Fa "const char ***eventnames"
40115cadfdSJoseph Koshy.Fa "int *nevents"
41115cadfdSJoseph Koshy.Fc
42115cadfdSJoseph Koshy.Sh DESCRIPTION
43115cadfdSJoseph KoshyFunction
44115cadfdSJoseph Koshy.Fn pmc_event_names_of_class
45115cadfdSJoseph Koshyretrieves the hardware event names supported by the class of PMC hardware
46115cadfdSJoseph Koshyspecified by argument
47115cadfdSJoseph Koshy.Fa cl .
48115cadfdSJoseph Koshy.Pp
49115cadfdSJoseph KoshyIt returns an array of
50115cadfdSJoseph Koshy.Vt "const char *"
51115cadfdSJoseph Koshypointers to names of events supported by the specified class of PMC
52115cadfdSJoseph Koshyhardware.
53115cadfdSJoseph KoshyThe location pointed to by argument
54115cadfdSJoseph Koshy.Fa nevents
55115cadfdSJoseph Koshyis set to the number of event names returned.
56115cadfdSJoseph Koshy.Pp
57115cadfdSJoseph KoshyThe returned array is allocated using
58115cadfdSJoseph Koshy.Xr malloc 3 .
59115cadfdSJoseph Koshy.Sh RETURN VALUES
60115cadfdSJoseph Koshy.Rv -std pmc_event_names_of_class
61115cadfdSJoseph Koshy.Sh ERRORS
62115cadfdSJoseph KoshyA call to
63115cadfdSJoseph Koshy.Fn pmc_event_names_of_class
64115cadfdSJoseph Koshymay fail with the following errors:
65115cadfdSJoseph Koshy.Bl -tag -width Er
66115cadfdSJoseph Koshy.It Bq Er EINVAL
67115cadfdSJoseph KoshyArgument
68115cadfdSJoseph Koshy.Fa cl
69115cadfdSJoseph Koshywas invalid.
70115cadfdSJoseph Koshy.It Bq Er ENOMEM
71*c2025a76SJoel DahlAllocation of a memory area to hold the result failed.
72115cadfdSJoseph Koshy.El
73115cadfdSJoseph Koshy.Sh SEE ALSO
74115cadfdSJoseph Koshy.Xr pmc 3 ,
75115cadfdSJoseph Koshy.Xr hwpmc 4
76