'\"macro stdmacro .\" .\" Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved. .\" .\" This program is free software; you can redistribute it and/or modify it .\" under the terms of the GNU General Public License as published by the .\" Free Software Foundation; either version 2 of the License, or (at your .\" option) any later version. .\" .\" This program is distributed in the hope that it will be useful, but .\" WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY .\" or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License .\" for more details. .\" .\" .TH PMTYPESTR 3 "PCP" "Performance Co-Pilot" .SH NAME \f3pmTypeStr\f1, \f3pmTypeStr_r\f1 \- convert a performance metric type into a string .SH "C SYNOPSIS" .ft 3 #include .sp const char *pmTypeStr(int \fItype\fP); .br char *pmTypeStr_r(int \fItype\fP, char *\fIbuf\fP, int \fIbuflen\fP); .sp cc ... \-lpcp .ft 1 .SH DESCRIPTION .de CR .ie t \f(CR\\$1\f1\\$2 .el \fI\\$1\f1\\$2 .. Given a performance metric .IR type , .B pmTypeStr produces a terse ASCII equivalent, appropriate for use in error and diagnostic messages. The .B pmTypeStr_r function does the same, but stores the result in a user-supplied buffer .I buf of length .IR buflen , which should have room for at least 20 bytes. .PP The value for .I type is typically extracted from a .CR pmDesc structure, following a call to .BR pmLookupDesc (3) for a particular performance metric. .PP Examples are .B 32 (for .I type equals .BR PM_TYPE_32 ), .B U64 (for .I type equals .BR PM_TYPE_U64 ), .B STRING (for .I type equals .BR PM_TYPE_STRING ), etc. .SH NOTES Both of these functions are safe to call from threaded contexts. .SH SEE ALSO .BR PMAPI (3), .BR pmAtomStr (3), .BR pmConvScale (3), .BR pmExtractValue (3), .BR pmLookupDesc (3), .BR pmPrintValue (3), .BR pmIDStr (3), .BR pmInDomStr (3), .BR pmSemStr (3) and .BR pmUnitsStr (3).