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.\" 12026dbd29SChristian Brueffer.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 13026dbd29SChristian Brueffer.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 14026dbd29SChristian Brueffer.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 15026dbd29SChristian Brueffer.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 16026dbd29SChristian Brueffer.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 17026dbd29SChristian Brueffer.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 18026dbd29SChristian Brueffer.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 19026dbd29SChristian Brueffer.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 20026dbd29SChristian Brueffer.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 21026dbd29SChristian Brueffer.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 22026dbd29SChristian Brueffer.\" SUCH DAMAGE. 23115cadfdSJoseph Koshy.\" 24115cadfdSJoseph Koshy.Dd November 23, 2007 25115cadfdSJoseph Koshy.Dt PMC_EVENT_NAMES_OF_CLASS 3 26aa12cea2SUlrich Spörlein.Os 27115cadfdSJoseph Koshy.Sh NAME 28115cadfdSJoseph Koshy.Nm pmc_event_names_of_class 29*a9a393b3SEdward Tomasz Napierala.Nd return a list of event names supported by a PMC class 30115cadfdSJoseph Koshy.Sh LIBRARY 31115cadfdSJoseph Koshy.Lb libpmc 32115cadfdSJoseph Koshy.Sh SYNOPSIS 33115cadfdSJoseph Koshy.In pmc.h 34115cadfdSJoseph Koshy.Ft int 35115cadfdSJoseph Koshy.Fo pmc_event_names_of_class 36115cadfdSJoseph Koshy.Fa "enum pmc_class cl" 37115cadfdSJoseph Koshy.Fa "const char ***eventnames" 38115cadfdSJoseph Koshy.Fa "int *nevents" 39115cadfdSJoseph Koshy.Fc 40115cadfdSJoseph Koshy.Sh DESCRIPTION 41115cadfdSJoseph KoshyFunction 42115cadfdSJoseph Koshy.Fn pmc_event_names_of_class 43115cadfdSJoseph Koshyretrieves the hardware event names supported by the class of PMC hardware 44115cadfdSJoseph Koshyspecified by argument 45115cadfdSJoseph Koshy.Fa cl . 46115cadfdSJoseph Koshy.Pp 47115cadfdSJoseph KoshyIt returns an array of 48115cadfdSJoseph Koshy.Vt "const char *" 49115cadfdSJoseph Koshypointers to names of events supported by the specified class of PMC 50115cadfdSJoseph Koshyhardware. 51115cadfdSJoseph KoshyThe location pointed to by argument 52115cadfdSJoseph Koshy.Fa nevents 53115cadfdSJoseph Koshyis set to the number of event names returned. 54115cadfdSJoseph Koshy.Pp 55115cadfdSJoseph KoshyThe returned array is allocated using 56115cadfdSJoseph Koshy.Xr malloc 3 . 57115cadfdSJoseph Koshy.Sh RETURN VALUES 58115cadfdSJoseph Koshy.Rv -std pmc_event_names_of_class 59115cadfdSJoseph Koshy.Sh ERRORS 60115cadfdSJoseph KoshyA call to 61115cadfdSJoseph Koshy.Fn pmc_event_names_of_class 62115cadfdSJoseph Koshymay fail with the following errors: 63115cadfdSJoseph Koshy.Bl -tag -width Er 64115cadfdSJoseph Koshy.It Bq Er EINVAL 65115cadfdSJoseph KoshyArgument 66115cadfdSJoseph Koshy.Fa cl 67115cadfdSJoseph Koshywas invalid. 68115cadfdSJoseph Koshy.It Bq Er ENOMEM 69c2025a76SJoel DahlAllocation of a memory area to hold the result failed. 70115cadfdSJoseph Koshy.El 71115cadfdSJoseph Koshy.Sh SEE ALSO 72115cadfdSJoseph Koshy.Xr pmc 3 , 73115cadfdSJoseph Koshy.Xr hwpmc 4 74