libcpc.h revision c7a079a873b863c236656bd0db7b2cf390841b4d
1N/A * The contents of this file are subject to the terms of the 1N/A * Common Development and Distribution License (the "License"). 1N/A * You may not use this file except in compliance with the License. 1N/A * See the License for the specific language governing permissions 1N/A * and limitations under the License. 1N/A * When distributing Covered Code, include this CDDL HEADER in each 1N/A * If applicable, add the following below this CDDL HEADER, with the 1N/A * fields enclosed by brackets "[]" replaced with your own identifying 1N/A * information: Portions Copyright [yyyy] [name of copyright owner] 1N/A * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 1N/A * Use is subject to license terms. 1N/A * This library allows hardware performance counters present in 1N/A * certain processors to be used by applications to monitor their 1N/A * own statistics, the statistics of others, or the statistics of a given CPU. 1N/A * Current library version must be passed to cpc_open(). 1N/A * Initializes the library for use and returns a pointer to an identifier that 1N/A * must be used as the cpc argument in subsequent libcpc calls. 1N/A * Query information about the underlying processor. 1N/A * A vprintf-like error handling routine can be passed to the 1N/A * library for use by more sophisticated callers. 1N/A * If specified as NULL, errors are written to stderr. 1N/A * If successful, returns an index for the new request within the set which is 1N/A * needed later to retrieve the request's data. 1N/A * Returns -1 if unsuccessful and sets errno to indicate the error. 1N/A * Binds the set to the current LWP. 1N/A * Binds the set to the specified LWP in a process controlled via libpctx. 1N/A * Binds the set to the specified CPU. The process must have sufficient 1N/A * privileges to bind to the CPU via processor_bind(2). An LWP can only 1N/A * bind to one CPU at a time. To measure more than one CPU simultaneously, 1N/A * one LWP must be created for each CPU. 1N/A * Set the starting value for the indexed counter, and restart counting for a 1N/A * set that was frozen by a counter overflow. 1N/A * Unbinds the set and frees up associated resources. cpc_buf_t's must be 1N/A * explicitly freed via cpc_buf_destroy(). * Samples a set into a cpc_buf_t. The provided set must be bound, and the * buf must have been created with the set being sampled. * Gets or sets the value of the request specified by index. * Obsolete libcpc interfaces. #
endif /* __sparc || __i386 */