Skip Navigation Links | |
Exit Print View | |
man pages section 3: Extended Library Functions, Volume 1 Oracle Solaris 11.1 Information Library |
Extended Library Functions, Volume 1
CIRCLEQ_HEAD_INITIALIZER(3EXT)
cpc_walk_generic_events_all(3CPC)
cpc_walk_generic_events_pic(3CPC)
ct_dev_status_get_aset(3CONTRACT)
ct_dev_status_get_dev_state(3CONTRACT)
ct_dev_status_get_minor(3CONTRACT)
ct_dev_status_get_noneg(3CONTRACT)
ct_dev_tmpl_clear_noneg(3CONTRACT)
ct_dev_tmpl_get_aset(3CONTRACT)
ct_dev_tmpl_get_minor(3CONTRACT)
ct_dev_tmpl_get_noneg(3CONTRACT)
ct_dev_tmpl_set_aset(3CONTRACT)
ct_dev_tmpl_set_minor(3CONTRACT)
ct_dev_tmpl_set_noneg(3CONTRACT)
ct_event_read_critical(3CONTRACT)
ct_pr_event_get_exitstatus(3CONTRACT)
ct_pr_event_get_gcorefile(3CONTRACT)
ct_pr_event_get_pcorefile(3CONTRACT)
ct_pr_event_get_pid(3CONTRACT)
ct_pr_event_get_ppid(3CONTRACT)
ct_pr_event_get_sender(3CONTRACT)
ct_pr_event_get_senderct(3CONTRACT)
ct_pr_event_get_signal(3CONTRACT)
ct_pr_event_get_zcorefile(3CONTRACT)
ct_pr_status_get_contracts(3CONTRACT)
ct_pr_status_get_fatal(3CONTRACT)
ct_pr_status_get_members(3CONTRACT)
ct_pr_status_get_param(3CONTRACT)
ct_pr_status_get_svc_aux(3CONTRACT)
ct_pr_status_get_svc_creator(3CONTRACT)
ct_pr_status_get_svc_ctid(3CONTRACT)
ct_pr_status_get_svc_fmri(3CONTRACT)
ct_pr_tmpl_get_fatal(3CONTRACT)
ct_pr_tmpl_get_param(3CONTRACT)
ct_pr_tmpl_get_svc_aux(3CONTRACT)
ct_pr_tmpl_get_svc_fmri(3CONTRACT)
ct_pr_tmpl_get_transfer(3CONTRACT)
ct_pr_tmpl_set_fatal(3CONTRACT)
ct_pr_tmpl_set_param(3CONTRACT)
ct_pr_tmpl_set_svc_aux(3CONTRACT)
ct_pr_tmpl_set_svc_fmri(3CONTRACT)
ct_pr_tmpl_set_transfer(3CONTRACT)
ct_status_get_cookie(3CONTRACT)
ct_status_get_critical(3CONTRACT)
ct_status_get_holder(3CONTRACT)
ct_status_get_informative(3CONTRACT)
ct_status_get_nevents(3CONTRACT)
ct_status_get_nevid(3CONTRACT)
ct_status_get_ntime(3CONTRACT)
ct_status_get_qtime(3CONTRACT)
ct_status_get_state(3CONTRACT)
ct_status_get_zoneid(3CONTRACT)
ct_tmpl_get_critical(3CONTRACT)
ct_tmpl_get_informative(3CONTRACT)
ct_tmpl_set_critical(3CONTRACT)
ct_tmpl_set_informative(3CONTRACT)
dat_evd_clear_unwaitable(3DAT)
dat_get_consumer_context(3DAT)
dat_registry_add_provider(3DAT)
dat_registry_list_providers(3DAT)
dat_registry_remove_provider(3DAT)
dat_set_consumer_context(3DAT)
devid_deviceid_to_nmlist(3DEVID)
di_link_next_by_lnode(3DEVINFO)
di_link_next_by_node(3DEVINFO)
di_lnode_private_get(3DEVINFO)
di_lnode_private_set(3DEVINFO)
di_minor_private_get(3DEVINFO)
di_minor_private_set(3DEVINFO)
di_path_client_devfs_path(3DEVINFO)
di_path_client_next_path(3DEVINFO)
di_path_phci_next_path(3DEVINFO)
di_path_prop_lookup_bytes(3DEVINFO)
di_path_prop_lookup_int64s(3DEVINFO)
di_path_prop_lookup_ints(3DEVINFO)
di_path_prop_lookup_strings(3DEVINFO)
di_path_prop_strings(3DEVINFO)
di_prom_prop_lookup_bytes(3DEVINFO)
di_prom_prop_lookup_ints(3DEVINFO)
di_prom_prop_lookup_strings(3DEVINFO)
di_prop_lookup_bytes(3DEVINFO)
di_prop_lookup_int64(3DEVINFO)
di_prop_lookup_strings(3DEVINFO)
ea_match_object_catalog(3EXACCT)
- determine CPU performance counter configuration
cc [ flag… ] file… -lcpc [ library… ] #include <libcpc.h> uint_t cpc_npic(cpc_t *cpc);
uint_t cpc_caps(cpc_t *cpc);
const char *cpc_cciname(cpc_t *cpc);
const char *cpc_cpuref(cpc_t *cpc);
void cpc_walk_events_all(cpc_t *cpc, void *arg, void (*action)(void *arg, const char *event));
void cpc_walk_generic_events_all(cpc_t *cpc, void *arg, void (*action)(void *arg, const char *event));
void cpc_walk_events_pic(cpc_t *cpc, uint_t picno, void *arg, void (*action)(void *arg, uint_t picno, const char *event));
void cpc_walk_generic_events_pic(cpc_t *cpc, uint_t picno, void *arg, void (*action)(void *arg, uint_t picno, const char *event));
void cpc_walk_attrs(cpc_t *cpc, void *arg, void (*action)(void *arg, const char *attr));
The cpc_cciname() function returns a printable description of the processor performance counter interfaces, for example, the string UltraSPARC III+ & IV. This name should not be assumed to be the same as the name the manufacturer might otherwise ascribe to the processor. It simply names the performance counter interfaces as understood by the system, and thus names the set of performance counter events that can be described by that interface.
The cpc_cpuref() function returns a string that describes a reference work that should be consulted to (allow a human to) understand the semantics of the performance counter events that are known to the system. The string returned might be substantially longer than 80 characters. Callers printing to a terminal might want to insert line breaks as appropriate.
The cpc_npic() function returns the number of performance counters accessible on the processor.
The cpc_caps() function returns a bitmap containing the bitwise inclusive-OR of zero or more flags that describe the capabilities of the processor. If CPC_CAP_OVERFLOW_INTERRUPT is present, the processor can generate an interrupt when a hardware performance counter overflows. If CPC_CAP_OVERFLOW_PRECISE is present, the processor can determine precisely which counter overflowed, thereby affecting the behavior of the overflow notification mechanism described in cpc_bind_curlwp(3CPC).
The system maintains a list of performance counter events supported by the underlying processor. Some processors are able to count all events on all hardware counters, while other processors restrict certain events to be counted only on specific hardware counters. The system also maintains a list of processor-specific attributes that can be used for advanced configuration of the performance counter hardware. These functions allow applications to determine what events and attributes are supported by the underlying processor. The reference work pointed to by cpc_cpuref() should be consulted to understand the reasons for and use of the attributes.
The cpc_walk_events_all() function calls the action function on each element of a global event list. The action function is called with each event supported by the processor, regardless of which counter is capable of counting it. The action function is called only once for each event, even if that event can be counted on more than one counter.
The cpc_walk_events_pic() function calls the action function with each event supported by the counter indicated by the picno argument, where picno ranges from 0 to the value returned by cpc_npic().
The system maintains a list of platform independent performance counter events known as generic events (see generic_events(3CPC)).
The cpc_walk_generic_events_all() function calls the action function on each generic event available on the processor. The action function is called for each generic event, regardless of which counter is capable of counting it. The action function is called only once for each event, even if that event can be counted on more than one counter.
The cpc_walk_generic_events_pic() function calls the action function with each generic event supported by the counter indicated by the picno argument, where picno ranges from 0 to the value returned by cpc_npic().
The system maintains a list of attributes that can be used to enable advanced features of the performance counters on the underlying processor. The cpc_walk_attrs() function calls the action function for each supported attribute name. See the reference material as returned by cpc_cpuref(3CPC) for the semantics use of attributes.
The cpc_cciname() function always returns a printable description of the processor performance counter interfaces.
The cpc_cpuref() function always returns a string that describes a reference work.
The cpc_npic() function always returns the number of performance counters accessible on the processor.
The cpc_caps() function always returns a bitmap containing the bitwise inclusive-OR of zero or more flags that describe the capabilities of the processor.
If the user-defined function specified by action is not called, the cpc_walk_events_all(), cpc_walk_events_pic(), cpc_walk_attrs(), cpc_walk_generic_events_pic(), and cpc_walk_generic_events_pic() functions set errno to indicate the error.
The cpc_walk_events_all(), cpc_walk_events_pic(), cpc_walk_attrs(), cpc_walk_generic_events_pic(), and cpc_walk_generic_events_pic() functions will fail if:
There is not enough memory available.
See attributes(5) for descriptions of the following attributes:
|
cpc_bind_curlwp(3CPC), generic_events(3CPC), libcpc(3LIB), attributes(5)