JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
man pages section 3: Extended Library Functions, Volume 1     Oracle Solaris 11 Express 11/10
search filter icon
search icon

Document Information

Preface

Extended Library Functions, Volume 1

au_close(3BSM)

au_open(3BSM)

au_preselect(3BSM)

au_to(3BSM)

au_to_arg32(3BSM)

au_to_arg(3BSM)

au_to_arg64(3BSM)

au_to_attr(3BSM)

au_to_cmd(3BSM)

au_to_data(3BSM)

auto_ef(3EXT)

auto_ef_file(3EXT)

auto_ef_free(3EXT)

auto_ef_get_encoding(3EXT)

auto_ef_get_score(3EXT)

auto_ef_str(3EXT)

au_to_groups(3BSM)

au_to_in_addr(3BSM)

au_to_ipc(3BSM)

au_to_iport(3BSM)

au_to_me(3BSM)

au_to_newgroups(3BSM)

au_to_opaque(3BSM)

au_to_path(3BSM)

au_to_process(3BSM)

au_to_process_ex(3BSM)

au_to_return32(3BSM)

au_to_return(3BSM)

au_to_return64(3BSM)

au_to_socket(3BSM)

au_to_subject(3BSM)

au_to_subject_ex(3BSM)

au_to_text(3BSM)

au_user_mask(3BSM)

au_write(3BSM)

cbc_crypt(3EXT)

CIRCLEQ_EMPTY(3EXT)

CIRCLEQ_ENTRY(3EXT)

CIRCLEQ_FIRST(3EXT)

CIRCLEQ_FOREACH(3EXT)

CIRCLEQ_FOREACH_REVERSE(3EXT)

CIRCLEQ_HEAD(3EXT)

CIRCLEQ_HEAD_INITIALIZER(3EXT)

CIRCLEQ_INIT(3EXT)

CIRCLEQ_INSERT_AFTER(3EXT)

CIRCLEQ_INSERT_BEFORE(3EXT)

CIRCLEQ_INSERT_HEAD(3EXT)

CIRCLEQ_INSERT_TAIL(3EXT)

CIRCLEQ_LAST(3EXT)

CIRCLEQ_LOOP_NEXT(3EXT)

CIRCLEQ_LOOP_PREV(3EXT)

CIRCLEQ_NEXT(3EXT)

CIRCLEQ_PREV(3EXT)

CIRCLEQ_REMOVE(3EXT)

config_admin(3CFGADM)

config_ap_id_cmp(3CFGADM)

config_change_state(3CFGADM)

config_list(3CFGADM)

config_list_ext(3CFGADM)

config_private_func(3CFGADM)

config_stat(3CFGADM)

config_strerror(3CFGADM)

config_test(3CFGADM)

config_unload_libs(3CFGADM)

cpc(3CPC)

cpc_access(3CPC)

cpc_bind_cpu(3CPC)

cpc_bind_curlwp(3CPC)

cpc_bind_event(3CPC)

cpc_bind_pctx(3CPC)

cpc_buf_add(3CPC)

cpc_buf_copy(3CPC)

cpc_buf_create(3CPC)

cpc_buf_destroy(3CPC)

cpc_buf_get(3CPC)

cpc_buf_hrtime(3CPC)

cpc_buf_set(3CPC)

cpc_buf_sub(3CPC)

cpc_buf_tick(3CPC)

cpc_buf_zero(3CPC)

cpc_caps(3CPC)

cpc_cciname(3CPC)

cpc_close(3CPC)

cpc_count_sys_events(3CPC)

cpc_count_usr_events(3CPC)

cpc_cpuref(3CPC)

cpc_disable(3CPC)

cpc_enable(3CPC)

cpc_event(3CPC)

cpc_event_accum(3CPC)

cpc_event_diff(3CPC)

cpc_eventtostr(3CPC)

cpc_getcciname(3CPC)

cpc_getcpuref(3CPC)

cpc_getcpuver(3CPC)

cpc_getnpic(3CPC)

cpc_getusage(3CPC)

cpc_npic(3CPC)

cpc_open(3CPC)

cpc_pctx_bind_event(3CPC)

cpc_pctx_invalidate(3CPC)

cpc_pctx_rele(3CPC)

cpc_pctx_take_sample(3CPC)

cpc_rele(3CPC)

cpc_request_preset(3CPC)

cpc_set_add_request(3CPC)

cpc_set_create(3CPC)

cpc_set_destroy(3CPC)

cpc_seterrfn(3CPC)

cpc_seterrhndlr(3CPC)

cpc_set_restart(3CPC)

cpc_set_sample(3CPC)

cpc_shared_bind_event(3CPC)

cpc_shared_close(3CPC)

cpc_shared_open(3CPC)

cpc_shared_rele(3CPC)

cpc_shared_take_sample(3CPC)

cpc_strtoevent(3CPC)

cpc_take_sample(3CPC)

cpc_unbind(3CPC)

cpc_version(3CPC)

cpc_walk_attrs(3CPC)

cpc_walk_events_all(3CPC)

cpc_walk_events_pic(3CPC)

cpc_walk_generic_events_all(3CPC)

cpc_walk_generic_events_pic(3CPC)

cpc_walk_names(3CPC)

cpc_walk_requests(3CPC)

cplus_demangle(3EXT)

crypt(3EXT)

crypt_close(3EXT)

ct_ctl_abandon(3CONTRACT)

ct_ctl_ack(3CONTRACT)

ct_ctl_adopt(3CONTRACT)

ct_ctl_nack(3CONTRACT)

ct_ctl_newct(3CONTRACT)

ct_ctl_qack(3CONTRACT)

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_free(3CONTRACT)

ct_event_get_ctid(3CONTRACT)

ct_event_get_evid(3CONTRACT)

ct_event_get_flags(3CONTRACT)

ct_event_get_nevid(3CONTRACT)

ct_event_get_newct(3CONTRACT)

ct_event_get_type(3CONTRACT)

ct_event_read(3CONTRACT)

ct_event_read_critical(3CONTRACT)

ct_event_reliable(3CONTRACT)

ct_event_reset(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_free(3CONTRACT)

ct_status_get_cookie(3CONTRACT)

ct_status_get_critical(3CONTRACT)

ct_status_get_holder(3CONTRACT)

ct_status_get_id(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_type(3CONTRACT)

ct_status_get_zoneid(3CONTRACT)

ct_status_read(3CONTRACT)

ct_tmpl_activate(3CONTRACT)

ct_tmpl_clear(3CONTRACT)

ct_tmpl_create(3CONTRACT)

ct_tmpl_get_cookie(3CONTRACT)

ct_tmpl_get_critical(3CONTRACT)

ct_tmpl_get_informative(3CONTRACT)

ct_tmpl_set_cookie(3CONTRACT)

ct_tmpl_set_critical(3CONTRACT)

ct_tmpl_set_informative(3CONTRACT)

dat_cno_create(3DAT)

dat_cno_free(3DAT)

dat_cno_modify_agent(3DAT)

dat_cno_query(3DAT)

dat_cno_wait(3DAT)

dat_cr_accept(3DAT)

dat_cr_handoff(3DAT)

dat_cr_query(3DAT)

dat_cr_reject(3DAT)

dat_ep_connect(3DAT)

dat_ep_create(3DAT)

dat_ep_create_with_srq(3DAT)

dat_ep_disconnect(3DAT)

dat_ep_dup_connect(3DAT)

dat_ep_free(3DAT)

dat_ep_get_status(3DAT)

dat_ep_modify(3DAT)

dat_ep_post_rdma_read(3DAT)

dat_ep_post_rdma_write(3DAT)

dat_ep_post_recv(3DAT)

dat_ep_post_send(3DAT)

dat_ep_query(3DAT)

dat_ep_recv_query(3DAT)

dat_ep_reset(3DAT)

dat_ep_set_watermark(3DAT)

dat_evd_clear_unwaitable(3DAT)

dat_evd_dequeue(3DAT)

dat_evd_disable(3DAT)

dat_evd_enable(3DAT)

dat_evd_free(3DAT)

dat_evd_modify_cno(3DAT)

dat_evd_post_se(3DAT)

dat_evd_query(3DAT)

dat_evd_resize(3DAT)

dat_evd_set_unwaitable(3DAT)

dat_evd_wait(3DAT)

dat_get_consumer_context(3DAT)

dat_get_handle_type(3DAT)

dat_ia_close(3DAT)

dat_ia_open(3DAT)

dat_ia_query(3DAT)

dat_lmr_create(3DAT)

dat_lmr_free(3DAT)

dat_lmr_query(3DAT)

dat_lmr_sync_rdma_read(3DAT)

dat_lmr_sync_rdma_write(3DAT)

dat_provider_fini(3DAT)

dat_provider_init(3DAT)

dat_psp_create(3DAT)

dat_psp_create_any(3DAT)

dat_psp_free(3DAT)

dat_psp_query(3DAT)

dat_pz_create(3DAT)

dat_pz_free(3DAT)

dat_pz_query(3DAT)

dat_registry_add_provider(3DAT)

dat_registry_list_providers(3DAT)

dat_registry_remove_provider(3DAT)

dat_rmr_bind(3DAT)

dat_rmr_create(3DAT)

dat_rmr_free(3DAT)

dat_rmr_query(3DAT)

dat_rsp_create(3DAT)

dat_rsp_free(3DAT)

dat_rsp_query(3DAT)

dat_set_consumer_context(3DAT)

dat_srq_create(3DAT)

dat_srq_free(3DAT)

dat_srq_post_recv(3DAT)

dat_srq_query(3DAT)

dat_srq_resize(3DAT)

dat_srq_set_lw(3DAT)

dat_strerror(3DAT)

demangle(3EXT)

des_crypt(3EXT)

des_encrypt(3EXT)

DES_FAILED(3EXT)

des_setkey(3EXT)

des_setparity(3EXT)

devid_compare(3DEVID)

devid_deviceid_to_nmlist(3DEVID)

devid_free(3DEVID)

devid_free_nmlist(3DEVID)

devid_get(3DEVID)

devid_get_minor_name(3DEVID)

devid_sizeof(3DEVID)

devid_str_decode(3DEVID)

devid_str_encode(3DEVID)

devid_str_free(3DEVID)

devid_valid(3DEVID)

di_binding_name(3DEVINFO)

di_bus_addr(3DEVINFO)

di_child_node(3DEVINFO)

di_compatible_names(3DEVINFO)

di_devfs_minor_path(3DEVINFO)

di_devfs_path(3DEVINFO)

di_devfs_path_free(3DEVINFO)

di_devid(3DEVINFO)

di_devlink_content(3DEVINFO)

di_devlink_dup(3DEVINFO)

di_devlink_fini(3DEVINFO)

di_devlink_free(3DEVINFO)

di_devlink_init(3DEVINFO)

di_devlink_path(3DEVINFO)

di_devlink_type(3DEVINFO)

di_devlink_walk(3DEVINFO)

di_driver_major(3DEVINFO)

di_driver_name(3DEVINFO)

di_driver_ops(3DEVINFO)

di_drv_first_node(3DEVINFO)

di_drv_next_node(3DEVINFO)

di_fini(3DEVINFO)

di_init(3DEVINFO)

di_instance(3DEVINFO)

di_link_next_by_lnode(3DEVINFO)

di_link_next_by_node(3DEVINFO)

di_link_private_get(3DEVINFO)

di_link_private_set(3DEVINFO)

di_link_spectype(3DEVINFO)

di_link_to_lnode(3DEVINFO)

di_lnode_devinfo(3DEVINFO)

di_lnode_devt(3DEVINFO)

di_lnode_name(3DEVINFO)

di_lnode_next(3DEVINFO)

di_lnode_private_get(3DEVINFO)

di_lnode_private_set(3DEVINFO)

di_minor_devt(3DEVINFO)

di_minor_name(3DEVINFO)

di_minor_next(3DEVINFO)

di_minor_nodetype(3DEVINFO)

di_minor_private_get(3DEVINFO)

di_minor_private_set(3DEVINFO)

di_minor_spectype(3DEVINFO)

di_nodeid(3DEVINFO)

di_node_name(3DEVINFO)

di_node_private_get(3DEVINFO)

di_node_private_set(3DEVINFO)

di_parent_node(3DEVINFO)

di_path_bus_addr(3DEVINFO)

di_path_client_devfs_path(3DEVINFO)

di_path_client_next_path(3DEVINFO)

di_path_client_node(3DEVINFO)

di_path_devfs_path(3DEVINFO)

di_path_instance(3DEVINFO)

di_path_node_name(3DEVINFO)

di_path_phci_next_path(3DEVINFO)

di_path_phci_node(3DEVINFO)

di_path_private_get(3DEVINFO)

di_path_private_set(3DEVINFO)

di_path_prop_bytes(3DEVINFO)

di_path_prop_int64s(3DEVINFO)

di_path_prop_ints(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_name(3DEVINFO)

di_path_prop_next(3DEVINFO)

di_path_prop_strings(3DEVINFO)

di_path_prop_type(3DEVINFO)

di_path_state(3DEVINFO)

di_prom_fini(3DEVINFO)

di_prom_init(3DEVINFO)

di_prom_prop_data(3DEVINFO)

di_prom_prop_lookup_bytes(3DEVINFO)

di_prom_prop_lookup_ints(3DEVINFO)

di_prom_prop_lookup_strings(3DEVINFO)

di_prom_prop_name(3DEVINFO)

di_prom_prop_next(3DEVINFO)

di_prop_bytes(3DEVINFO)

di_prop_devt(3DEVINFO)

di_prop_int64(3DEVINFO)

di_prop_ints(3DEVINFO)

di_prop_lookup_bytes(3DEVINFO)

di_prop_lookup_int64(3DEVINFO)

di_prop_lookup_ints(3DEVINFO)

di_prop_lookup_strings(3DEVINFO)

di_prop_name(3DEVINFO)

di_prop_next(3DEVINFO)

di_prop_strings(3DEVINFO)

di_prop_type(3DEVINFO)

di_sibling_node(3DEVINFO)

di_walk_link(3DEVINFO)

di_walk_lnode(3DEVINFO)

di_walk_minor(3DEVINFO)

di_walk_node(3DEVINFO)

ea_alloc(3EXACCT)

ea_attach_to_group(3EXACCT)

ea_attach_to_object(3EXACCT)

ea_close(3EXACCT)

ea_copy_object(3EXACCT)

ea_copy_object_tree(3EXACCT)

ea_error(3EXACCT)

ea_free(3EXACCT)

ea_free_item(3EXACCT)

ea_free_object(3EXACCT)

ea_get_creator(3EXACCT)

ea_get_hostname(3EXACCT)

ea_get_object(3EXACCT)

ea_get_object_tree(3EXACCT)

ea_match_object_catalog(3EXACCT)

ea_next_object(3EXACCT)

ea_open(3EXACCT)

ea_pack_object(3EXACCT)

ea_previous_object(3EXACCT)

ea_set_group(3EXACCT)

ea_set_item(3EXACCT)

ea_strdup(3EXACCT)

ea_strfree(3EXACCT)

ea_unpack_object(3EXACCT)

ea_write_object(3EXACCT)

ecb_crypt(3EXT)

efi_alloc_and_init(3EXT)

efi_alloc_and_read(3EXT)

efi_free(3EXT)

efi_use_whole_disk(3EXT)

efi_write(3EXT)

elf32_checksum(3ELF)

elf32_fsize(3ELF)

elf32_getehdr(3ELF)

elf32_getphdr(3ELF)

elf32_getshdr(3ELF)

elf32_newehdr(3ELF)

elf32_newphdr(3ELF)

elf32_xlatetof(3ELF)

elf32_xlatetom(3ELF)

elf(3ELF)

elf64_checksum(3ELF)

elf64_fsize(3ELF)

elf64_getehdr(3ELF)

elf64_getphdr(3ELF)

elf64_getshdr(3ELF)

elf64_newehdr(3ELF)

elf64_newphdr(3ELF)

elf64_xlatetof(3ELF)

elf64_xlatetom(3ELF)

elf_begin(3ELF)

elf_cntl(3ELF)

elf_end(3ELF)

elf_errmsg(3ELF)

elf_errno(3ELF)

elf_fill(3ELF)

elf_flagdata(3ELF)

elf_flagehdr(3ELF)

elf_flagelf(3ELF)

elf_flagphdr(3ELF)

elf_flagscn(3ELF)

elf_flagshdr(3ELF)

elf_getarhdr(3ELF)

elf_getarsym(3ELF)

elf_getbase(3ELF)

elf_getdata(3ELF)

elf_getident(3ELF)

elf_getphdrnum(3ELF)

elf_getphnum(3ELF)

elf_getscn(3ELF)

elf_getshdrnum(3ELF)

elf_getshdrstrndx(3ELF)

elf_getshnum(3ELF)

elf_getshstrndx(3ELF)

elf_hash(3ELF)

elf_kind(3ELF)

elf_memory(3ELF)

elf_ndxscn(3ELF)

elf_newdata(3ELF)

elf_newscn(3ELF)

elf_next(3ELF)

elf_nextscn(3ELF)

elf_rand(3ELF)

elf_rawdata(3ELF)

elf_rawfile(3ELF)

elf_strptr(3ELF)

elf_update(3ELF)

elf_version(3ELF)

encrypt(3EXT)

endauclass(3BSM)

endauevent(3BSM)

FCOE_CreatePort(3FCOE)

FCOE_DeletePort(3FCOE)

FCOE_GetPortList(3FCOE)

fmev_attr_list(3FM)

fmev_class(3FM)

fmev_dup(3FM)

fmev_errno(3FM)

fmev_ev2shdl(3FM)

fmev_hold(3FM)

fmev_localtime(3FM)

fmev_rele(3FM)

fmev_shdl_alloc(3FM)

fmev_shdlctl_serialize(3FM)

fmev_shdlctl_sigmask(3FM)

fmev_shdlctl_thrattr(3FM)

fmev_shdlctl_thrcreate(3FM)

fmev_shdlctl_thrsetup(3FM)

fmev_shdl_fini(3FM)

fmev_shdl_free(3FM)

fmev_shdl_getauthority(3FM)

fmev_shdl_init(3FM)

fmev_shdl_nvl2str(3FM)

fmev_shdl_strdup(3FM)

fmev_shdl_strfree(3FM)

fmev_shdl_subscribe(3FM)

fmev_shdl_unsubscribe(3FM)

fmev_shdl_zalloc(3FM)

fmev_strerror(3FM)

fmev_time_nsec(3FM)

fmev_time_sec(3FM)

fmev_timespec(3FM)

fstyp_fini(3FSTYP)

fstyp_get_attr(3FSTYP)

fstyp_ident(3FSTYP)

fstyp_init(3FSTYP)

fstyp_mod_dump(3FSTYP)

fstyp_mod_fini(3FSTYP)

fstyp_mod_get_attr(3FSTYP)

fstyp_mod_ident(3FSTYP)

fstyp_mod_init(3FSTYP)

fstyp_strerror(3FSTYP)

gelf(3ELF)

gelf_checksum(3ELF)

gelf_fsize(3ELF)

gelf_getcap(3ELF)

gelf_getclass(3ELF)

gelf_getdyn(3ELF)

gelf_getehdr(3ELF)

gelf_getmove(3ELF)

gelf_getphdr(3ELF)

gelf_getrel(3ELF)

gelf_getrela(3ELF)

gelf_getshdr(3ELF)

gelf_getsym(3ELF)

gelf_getsyminfo(3ELF)

gelf_getsymshndx(3ELF)

gelf_newehdr(3ELF)

gelf_newphdr(3ELF)

gelf_update_cap(3ELF)

gelf_update_dyn(3ELF)

gelf_update_ehdr(3ELF)

gelf_update_getmove(3ELF)

gelf_update_move(3ELF)

gelf_update_phdr(3ELF)

gelf_update_rel(3ELF)

gelf_update_rela(3ELF)

gelf_update_shdr(3ELF)

gelf_update_sym(3ELF)

gelf_update_syminfo(3ELF)

gelf_update_symshndx(3ELF)

gelf_xlatetof(3ELF)

gelf_xlatetom(3ELF)

generic_events(3CPC)

getauclassent(3BSM)

getauclassent_r(3BSM)

getauclassnam(3BSM)

getauclassnam_r(3BSM)

getauditflags(3BSM)

getauditflagsbin(3BSM)

getauditflagschar(3BSM)

getauevent(3BSM)

getauevent_r(3BSM)

getauevnam(3BSM)

getauevnam_r(3BSM)

getauevnonam(3BSM)

getauevnum(3BSM)

getauevnum_r(3BSM)

getfauditflags(3BSM)

idn_decodename2(3EXT)

idn_decodename(3EXT)

idn_enable(3EXT)

idn_encodename(3EXT)

idn_nameinit(3EXT)

la_activity(3EXT)

la_amd64_pltenter(3EXT)

la_i86_pltenter(3EXT)

la_objfilter(3EXT)

la_objopen(3EXT)

la_objsearch(3EXT)

la_pltexit(3EXT)

la_pltexit64(3EXT)

la_preinit(3EXT)

la_sparcv8_pltenter(3EXT)

la_sparcv9_pltenter(3EXT)

la_symbind32(3EXT)

la_symbind64(3EXT)

la_version(3EXT)

ld_atexit(3ext)

ld_atexit64(3ext)

ld_file(3ext)

ld_file64(3ext)

ld_input_done(3ext)

ld_input_section(3ext)

ld_input_section64(3ext)

ld_open(3ext)

ld_open64(3ext)

ld_section(3ext)

ld_section64(3ext)

ld_start(3ext)

ld_start64(3ext)

ld_support(3ext)

ld_version(3ext)

LIST_EMPTY(3EXT)

LIST_ENTRY(3EXT)

LIST_FIRST(3EXT)

LIST_FOREACH(3EXT)

LIST_HEAD(3EXT)

LIST_HEAD_INITIALIZER(3EXT)

LIST_INIT(3EXT)

LIST_INSERT_AFTER(3EXT)

LIST_INSERT_BEFORE(3EXT)

LIST_INSERT_HEAD(3EXT)

LIST_NEXT(3EXT)

LIST_REMOVE(3EXT)

md4(3EXT)

MD4Final(3EXT)

MD4Init(3EXT)

MD4Update(3EXT)

md5(3EXT)

md5_calc(3EXT)

MD5Final(3EXT)

MD5Init(3EXT)

MD5Update(3EXT)

nlist(3ELF)

NOTE(3EXT)

_NOTE(3EXT)

pctx_capture(3CPC)

pctx_create(3CPC)

pctx_release(3CPC)

pctx_run(3CPC)

pctx_set_events(3CPC)

queue(3EXT)

rd_delete(3EXT)

rd_errstr(3EXT)

rd_event_addr(3EXT)

rd_event_enable(3EXT)

rd_event_getmsg(3EXT)

rd_init(3EXT)

rd_loadobj_iter(3EXT)

rd_log(3EXT)

rd_new(3EXT)

rd_objpad_enable(3EXT)

rd_plt_resolution(3EXT)

rd_reset(3EXT)

read_vtoc(3EXT)

rtld_audit(3EXT)

rtld_db(3EXT)

run_crypt(3EXT)

run_setkey(3EXT)

sendfile(3EXT)

sendfilev(3EXT)

setauclass(3BSM)

setauevent(3BSM)

setkey(3EXT)

sha1(3EXT)

SHA1Final(3EXT)

SHA1Init(3EXT)

SHA1Update(3EXT)

sha2(3EXT)

SHA256Final(3EXT)

SHA256Init(3EXT)

SHA256Update(3EXT)

SHA2Final(3EXT)

SHA2Init(3EXT)

SHA2Update(3EXT)

SHA384Final(3EXT)

SHA384Init(3EXT)

SHA384Update(3EXT)

SHA512Final(3EXT)

SHA512Init(3EXT)

SHA512Update(3EXT)

SIMPLEQ_EMPTY(3EXT)

SIMPLEQ_ENTRY(3EXT)

SIMPLEQ_FIRST(3EXT)

SIMPLEQ_FOREACH(3EXT)

SIMPLEQ_HEAD(3EXT)

SIMPLEQ_HEAD_INITIALIZER(3EXT)

SIMPLEQ_INIT(3EXT)

SIMPLEQ_INSERT_AFTER(3EXT)

SIMPLEQ_INSERT_HEAD(3EXT)

SIMPLEQ_INSERT_TAIL(3EXT)

SIMPLEQ_NEXT(3EXT)

SIMPLEQ_REMOVE(3EXT)

SIMPLEQ_REMOVE_HEAD(3EXT)

SLIST_EMPTY(3EXT)

SLIST_ENTRY(3EXT)

SLIST_FIRST(3EXT)

SLIST_FOREACH(3EXT)

SLIST_HEAD(3EXT)

SLIST_HEAD_INITIALIZER(3EXT)

SLIST_INIT(3EXT)

SLIST_INSERT_AFTER(3EXT)

SLIST_INSERT_HEAD(3EXT)

SLIST_NEXT(3EXT)

SLIST_REMOVE(3EXT)

SLIST_REMOVE_HEAD(3EXT)

STAILQ_CONCAT(3EXT)

STAILQ_EMPTY(3EXT)

STAILQ_ENTRY(3EXT)

STAILQ_FIRST(3EXT)

STAILQ_FOREACH(3EXT)

STAILQ_HEAD(3EXT)

STAILQ_HEAD_INITIALIZER(3EXT)

STAILQ_INIT(3EXT)

STAILQ_INSERT_AFTER(3EXT)

STAILQ_INSERT_HEAD(3EXT)

STAILQ_INSERT_TAIL(3EXT)

STAILQ_NEXT(3EXT)

STAILQ_REMOVE(3EXT)

STAILQ_REMOVE_HEAD(3EXT)

stdarg(3EXT)

SUNW_C_GetMechSession(3EXT)

SUNW_C_KeyToObject(3EXT)

TAILQ_CONCAT(3EXT)

TAILQ_EMPTY(3EXT)

TAILQ_ENTRY(3EXT)

TAILQ_FIRST(3EXT)

TAILQ_FOREACH(3EXT)

TAILQ_FOREACH_REVERSE(3EXT)

TAILQ_HEAD(3EXT)

TAILQ_HEAD_INITIALIZER(3EXT)

TAILQ_INIT(3EXT)

TAILQ_INSERT_AFTER(3EXT)

TAILQ_INSERT_BEFORE(3EXT)

TAILQ_INSERT_HEAD(3EXT)

TAILQ_INSERT_TAIL(3EXT)

TAILQ_LAST(3EXT)

TAILQ_NEXT(3EXT)

TAILQ_PREV(3EXT)

TAILQ_REMOVE(3EXT)

tsalarm_get(3EXT)

tsalarm_set(3EXT)

v12n(3EXT)

v12n_capabilities(3EXT)

v12n_chassis_serialno(3EXT)

v12n_ctrl_domain(3EXT)

v12n_domain_name(3EXT)

v12n_domain_roles(3EXT)

v12n_domain_uuid(3EXT)

varargs(3EXT)

write_vtoc(3EXT)

cpc_bind_curlwp

, cpc_bind_pctx

, cpc_bind_cpu

, cpc_unbind

, cpc_request_preset

, cpc_set_restart

- bind request sets to hardware counters

Synopsis

cc [ flag… ] file-lcpc [ library… ] 
#include <libcpc.h>

int cpc_bind_curlwp(cpc_t *cpc, cpc_set_t *set, uint_t flags);
int cpc_bind_pctx(cpc_t *cpc, pctx_t *pctx, id_t id, cpc_set_t *set,
     uint_t flags);
int cpc_bind_cpu(cpc_t *cpc, processorid_t id, cpc_set_t *set,
     uint_t flags);
int cpc_unbind(cpc_t *cpc, cpc_set_t *set);
int cpc_request_preset(cpc_t *cpc, int index, uint64_t preset);
int cpc_set_restart(cpc_t *cpc, cpc_set_t *set);

Description

These functions program the processor's hardware counters according to the requests contained in the set argument. If these functions are successful, then upon return the physical counters will have been assigned to count events on behalf of each request in the set, and each counter will be enabled as configured.

The cpc_bind_curlwp() function binds the set to the calling LWP. If successful, a performance counter context is associated with the LWP that allows the system to virtualize the hardware counters to that specific LWP.

By default, the system binds the set to the current LWP only. If the CPC_BIND_LWP_INHERIT flag is present in the flags argument, however, any subsequent LWPs created by the current LWP will inherit a copy of the request set. The newly created LWP will have its virtualized 64-bit counters initialized to the preset values specified in set, and the counters will be enabled and begin counting events on behalf of the new LWP. This automatic inheritance behavior can be useful when dealing with multithreaded programs to determine aggregate statistics for the program as a whole.

If the CPC_BIND_LWP_INHERIT flag is specified and any of the requests in the set have the CPC_OVF_NOTIFY_EMT flag set, the process will immediately dispatch a SIGEMT signal to the freshly created LWP so that it can preset its counters appropriately on the new LWP. This initialization condition can be detected using cpc_set_sample(3CPC) and looking at the counter value for any requests with CPC_OVF_NOTIFY_EMT set. The value of any such counters will be UINT64_MAX.

The cpc_bind_pctx() function binds the set to the LWP specified by the pctx-id pair, where pctx refers to a handle returned from libpctx and id is the ID of the desired LWP in the target process. If successful, a performance counter context is associated with the specified LWP and the system virtualizes the hardware counters to that specific LWP. The flags argument is reserved for future use and must always be 0.

The cpc_bind_cpu() function binds the set to the specified CPU and measures events occurring on that CPU regardless of which LWP is running. Only one such binding can be active on the specified CPU at a time. As long as any application has bound a set to a CPU, per-LWP counters are unavailable and any attempt to use either cpc_bind_curlwp() or cpc_bind_pctx() returns EAGAIN. The first invocation of cpc_bind_cpu() invalidates all currently bound per-LWP counter sets, and any attempt to sample an invalidated set returns EAGAIN. To bind to a CPU, the library binds the calling LWP to the measured CPU with processor_bind(2). The application must not change its processor binding until after it has unbound the set with cpc_unbind(). The flags argument is reserved for future use and must always be 0.

The cpc_request_preset() function updates the preset and current value stored in the indexed request within the currently bound set, thereby changing the starting value for the specified request for the calling LWP only, which takes effect at the next call to cpc_set_restart().

When a performance counter counting on behalf of a request with the CPC_OVF_NOTIFY_EMT flag set overflows, the performance counters are frozen and the LWP to which the set is bound receives a SIGEMT signal. The cpc_set_restart() function can be called from a SIGEMT signal handler function to quickly restart the hardware counters. Counting begins from each request's original preset (see cpc_set_add_request(3CPC)), or from the preset specified in a prior call to cpc_request_preset(). Applications performing performance counter overflow profiling should use the cpc_set_restart() function to quickly restart counting after receiving a SIGEMT overflow signal and recording any relevant program state.

The cpc_unbind() function unbinds the set from the resource to which it is bound. All hardware resources associated with the bound set are freed and if the set was bound to a CPU, the calling LWP is unbound from the corresponding CPU. See processor_bind(2).

Return Values

Upon successful completion these functions return 0. Otherwise, -1 is returned and errno is set to indicate the error.

Errors

Applications wanting to get detailed error values should register an error handler with cpc_seterrhndlr(3CPC). Otherwise, the library will output a specific error description to stderr.

These functions will fail if:

EACCES

For cpc_bind_curlwp(), the system has Pentium 4 processors with HyperThreading and at least one physical processor has more than one hardware thread online. See NOTES.

For cpc_bind_cpu(), the process does not have the cpc_cpu privilege to access the CPU's counters.

For cpc_bind_curlwp(), cpc_bind_cpc(), and cpc_bind_pctx(), access to the requested hypervisor event was denied.

EAGAIN

For cpc_bind_curlwp() and cpc_bind_pctx(), the performance counters are not available for use by the application.

For cpc_bind_cpu(), another process has already bound to this CPU. Only one process is allowed to bind to a CPU at a time and only one set can be bound to a CPU at a time.

EINVAL

The set does not contain any requests or cpc_set_add_request() was not called.

The value given for an attribute of a request is out of range.

The system could not assign a physical counter to each request in the system. See NOTES.

One or more requests in the set conflict and might not be programmed simultaneously.

The set was not created with the same cpc handle.

For cpc_bind_cpu(), the specified processor does not exist.

For cpc_unbind(), the set is not bound.

For cpc_request_preset() and cpc_set_restart(), the calling LWP does not have a bound set.

ENOSYS

For cpc_bind_cpu(), the specified processor is not online.

ENOTSUP

The cpc_bind_curlwp() function was called with the CPC_OVF_NOTIFY_EMT flag, but the underlying processor is not capable of detecting counter overflow.

ESRCH

For cpc_bind_pctx(), the specified LWP in the target process does not exist.

Examples

Example 1 Use hardware performance counters to measure events in a process.

The following example demonstrates how a standalone application can be instrumented with the libcpc(3LIB) functions to use hardware performance counters to measure events in a process. The application performs 20 iterations of a computation, measuring the counter values for each iteration. By default, the example makes use of two counters to measure external cache references and external cache hits. These options are only appropriate for UltraSPARC processors. By setting the EVENT0 and EVENT1 environment variables to other strings (a list of which can be obtained from the -h option of the cpustat(1M) or cputrack(1) utilities), other events can be counted. The error() routine is assumed to be a user-provided routine analogous to the familiar printf(3C) function from the C library that also performs an exit(2) after printing the message.

#include <inttypes.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <libcpc.h>
#include <errno.h>

int
main(int argc, char *argv[])
{
int iter;
char *event0 = NULL, *event1 = NULL;
cpc_t *cpc;
cpc_set_t *set;
cpc_buf_t *diff, *after, *before;
int ind0, ind1;
uint64_t val0, val1;

if ((cpc = cpc_open(CPC_VER_CURRENT)) == NULL)
        error("perf counters unavailable: %s", strerror(errno));

if ((event0 = getenv("EVENT0")) == NULL)
     event0 = "EC_ref";
if ((event1 = getenv("EVENT1")) == NULL)
     event1 = "EC_hit";

if ((set = cpc_set_create(cpc)) == NULL)
        error("could not create set: %s", strerror(errno));

if ((ind0 = cpc_set_add_request(cpc, set, event0, 0, CPC_COUNT_USER, 0,
        NULL)) == -1)
        error("could not add first request: %s", strerror(errno));

if ((ind1 = cpc_set_add_request(cpc, set, event1, 0, CPC_COUNT_USER, 0,
        NULL)) == -1)
        error("could not add first request: %s", strerror(errno));

if ((diff = cpc_buf_create(cpc, set)) == NULL)
        error("could not create buffer: %s", strerror(errno));
if ((after = cpc_buf_create(cpc, set)) == NULL)
        error("could not create buffer: %s", strerror(errno));
if ((before = cpc_buf_create(cpc, set)) == NULL)
        error("could not create buffer: %s", strerror(errno));

if (cpc_bind_curlwp(cpc, set, 0) == -1)
         error("cannot bind lwp%d: %s", _lwp_self(), strerror(errno));

for (iter = 1; iter <= 20; iter++) {

        if (cpc_set_sample(cpc, set, before) == -1)
             break;

         /* ==> Computation to be measured goes here <== */
 
        if (cpc_set_sample(cpc, set, after) == -1)
             break;
 
        cpc_buf_sub(cpc, diff, after, before);
        cpc_buf_get(cpc, diff, ind0, &val0);
        cpc_buf_get(cpc, diff, ind1, &val1);
        
         (void) printf("%3d: %" PRId64 " %" PRId64 "\n", iter,
                val0, val1);
}

 if (iter != 21)
        error("cannot sample set: %s",  strerror(errno));

cpc_close(cpc);

return (0);
}

Example 2 Write a signal handler to catch overflow signals.

The following example builds on Example 1 and demonstrates how to write the signal handler to catch overflow signals. A counter is preset so that it is 1000 counts short of overflowing. After 1000 counts the signal handler is invoked.

The signal handler:

cpc_t     *cpc;
cpc_set_t *set;
cpc_buf_t *buf;
int       index;

void
emt_handler(int sig, siginfo_t *sip, void *arg)
{
     ucontext_t *uap = arg;
     uint64_t val;

     if (sig != SIGEMT || sip->si_code != EMT_CPCOVF) {
         psignal(sig, "example");
         psiginfo(sip, "example");
         return;
     }   

     (void) printf("lwp%d - si_addr %p ucontext: %%pc %p %%sp %p\n",
         _lwp_self(), (void *)sip->si_addr,
         (void *)uap->uc_mcontext.gregs[PC],
         (void *)uap->uc_mcontext.gregs[SP]);

     if (cpc_set_sample(cpc, set, buf) != 0)
         error("cannot sample: %s", strerror(errno));

     cpc_buf_get(cpc, buf, index, &val);

     (void) printf("0x%" PRIx64"\n", val);
     (void) fflush(stdout);

     /*
     * Update a request's preset and restart the counters. Counters which 
     * have not been preset with cpc_request_preset() will resume counting 
     * from their current value. 
     */
     (cpc_request_preset(cpc, ind1, val1) != 0) 
        error("cannot set preset for request %d: %s", ind1, 
             strerror(errno)); 
        if (cpc_set_restart(cpc, set) != 0)                                   
             error("cannot restart lwp%d: %s", _lwp_self(), strerror(errno));
}

The setup code, which can be positioned after the code that opens the CPC library and creates a set:

#define PRESET (UINT64_MAX - 999ull)
 
     struct sigaction act;
     ... 
     act.sa_sigaction = emt_handler;
     bzero(&act.sa_mask, sizeof (act.sa_mask));
     act.sa_flags = SA_RESTART|SA_SIGINFO;
     if (sigaction(SIGEMT, &act, NULL) == -1)
         error("sigaction: %s", strerror(errno));
 
     if ((index = cpc_set_add_request(cpc, set, event, PRESET,
        CPC_COUNT_USER | CPC_OVF_NOTIFY_EMT, 0, NULL)) != 0)
        error("cannot add request to set: %s", strerror(errno));
 
     if ((buf = cpc_buf_create(cpc, set)) == NULL)
        error("cannot create buffer: %s", strerror(errno));
 
     if (cpc_bind_curlwp(cpc, set, 0) == -1)
         error("cannot bind lwp%d: %s", _lwp_self(), strerror(errno));
 
     for (iter = 1; iter <= 20; iter++) {
         /* ==> Computation to be measured goes here <== */
     }
 
     cpc_unbind(cpc, set);      /* done */

Attributes

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Interface Stability
Committed
MT-Level
Safe

See Also

cpustat(1M), cputrack(1), psrinfo(1M), processor_bind(2), cpc_seterrhndlr(3CPC), cpc_set_sample(3CPC), libcpc(3LIB), attributes(5)

Notes

When a set is bound, the system assigns a physical hardware counter to count on behalf of each request in the set. If such an assignment is not possible for all requests in the set, the bind function returns -1 and sets errno to EINVAL. The assignment of requests to counters depends on the capabilities of the available counters. Some processors (such as Pentium 4) have a complicated counter control mechanism that requires the reservation of limited hardware resources beyond the actual counters. It could occur that two requests for different events might be impossible to count at the same time due to these limited hardware resources. See the processor manual as referenced by cpc_cpuref(3CPC) for details about the underlying processor's capabilities and limitations.

Some processors can be configured to dispatch an interrupt when a physical counter overflows. The most obvious use for this facility is to ensure that the full 64-bit counter values are maintained without repeated sampling. Certain hardware, such as the UltraSPARC processor, does not record which counter overflowed. A more subtle use for this facility is to preset the counter to a value slightly less than the maximum value, then use the resulting interrupt to catch the counter overflow associated with that event. The overflow can then be used as an indication of the frequency of the occurrence of that event.

The interrupt generated by the processor might not be particularly precise. That is, the particular instruction that caused the counter overflow might be earlier in the instruction stream than is indicated by the program counter value in the ucontext.

When a request is added to a set with the CPC_OVF_NOTIFY_EMT flag set, then as before, the control registers and counter are preset from the 64-bit preset value given. When the flag is set, however, the kernel arranges to send the calling process a SIGEMT signal when the overflow occurs. The si_code member of the corresponding siginfo structure is set to EMT_CPCOVF and the si_addr member takes the program counter value at the time the overflow interrupt was delivered. Counting is disabled until the set is bound again.

If the CPC_CAP_OVERFLOW_PRECISE bit is set in the value returned by cpc_caps(3CPC), the processor is able to determine precisely which counter has overflowed after receiving the overflow interrupt. On such processors, the SIGEMT signal is sent only if a counter overflows and the request that the counter is counting has the CPC_OVF_NOTIFY_EMT flag set. If the capability is not present on the processor, the system sends a SIGEMT signal to the process if any of its requests have the CPC_OVF_NOTIFY_EMT flag set and any counter in its set overflows.

Different processors have different counter ranges available, though all processors supported by Solaris allow at least 31 bits to be specified as a counter preset value. Portable preset values lie in the range UINT64_MAX to UINT64_MAX-INT32_MAX.

The appropriate preset value will often need to be determined experimentally. Typically, this value will depend on the event being measured as well as the desire to minimize the impact of the act of measurement on the event being measured. Less frequent interrupts and samples lead to less perturbation of the system.

If the processor cannot detect counter overflow, bind will fail and return ENOTSUP. Only user events can be measured using this technique. See Example 2.

Pentium 4

Most Pentium 4 events require the specification of an event mask for counting. The event mask is specified with the emask attribute.

Pentium 4 processors with HyperThreading Technology have only one set of hardware counters per physical processor. To use cpc_bind_curlwp() or cpc_bind_pctx() to measure per-LWP events on a system with Pentium 4 HT processors, a system administrator must first take processors in the system offline until each physical processor has only one hardware thread online (See the -p option to psrinfo(1M)). If a second hardware thread is brought online, all per-LWP bound contexts will be invalidated and any attempt to sample or bind a CPC set will return EAGAIN.

Only one CPC set at a time can be bound to a physical processor with cpc_bind_cpu(). Any call to cpc_bind_cpu() that attempts to bind a set to a processor that shares a physical processor with a processor that already has a CPU-bound set returns an error.

To measure the shared state on a Pentium 4 processor with HyperThreading, the count_sibling_usr and count_sibling_sys attributes are provided for use with cpc_bind_cpu(). These attributes behave exactly as the CPC_COUNT_USER and CPC_COUNT_SYSTEM request flags, except that they act on the sibling hardware thread sharing the physical processor with the CPU measured by cpc_bind_cpu(). Some CPC sets will fail to bind due to resource constraints. The most common type of resource constraint is an ESCR conflict among one or more requests in the set. For example, the branch_retired event cannot be measured on counters 12 and 13 simultaneously because both counters require the CRU_ESCR2 ESCR to measure this event. To measure branch_retired events simultaneously on more than one counter, use counters such that one counter uses CRU_ESCR2 and the other counter uses CRU_ESCR3. See the processor documentation for details.