Sun Microsystems, Inc.
spacerspacer
spacer   www.sun.com docs.sun.com | | |  
spacer
black dot
   
A   B   C   D   E   F   G   H   I   J   K   L   M   N   O   P   Q   R   S   T   U   V   W   X   Y   Z
    
 
CPU Performance Counters Library Functionscpc_event_diff(3CPC)


NAME

 cpc_event_diff, cpc_event_accum - simple difference and accumulate operations

SYNOPSIS

 
cc [ flag... ] file... -lcpc [ library... ]
#include <libcpc.h>
void cpc_event_accum(cpc_event_t *accum, cpc_event_t *event);
 void cpc_event_diff(cpc_event_t *diff, cpc_event_t *after, cpc_event_t *before);

DESCRIPTION

 

The cpc_event_accum() and cpc_event_diff() functions perform common accumulate and difference operations on cpc_event(3CPC) data structures. Use of these functions increases program portability, since structure members are not referenced directly .

cpc_event_accum

 

The cpc_event_accum() function adds the ce_pic fields of event into the corresponding fields of accum. The ce_hrt field of accum is set to the later of the times in event and accum.

SPARC:

The function adds the contents of the ce_tick field of event into the corresponding field of accum.

IA:

The function adds the contents of the ce_tsc field of event into the corresponding field of accum.

cpc_event_diff

 

The cpc_event_diff() function places the difference between the ce_pic fields of after and before and places them in the corresponding field of diff. The ce_hrt field of diff is set to the ce_hrt field of after.

SPARC:

Additionally, the function computes the difference between the ce_tick fields of after and before, and places it in the corresponding field of diff.

IA:

Additionally, the function computes the difference between the ce_tsc fields of after and before, and places it in the corresponding field of diff.

ATTRIBUTES

 

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

ATTRIBUTE TYPEATTRIBUTE VALUE
MT-LevelMT-Safe
AvailabilitySUNWcpcu (32-bit)
 SUNWcpcux (64-bit)
Interface StabilityEvolving

SEE ALSO

 

cpc(3CPC), cpc_event(3CPC), attributes(5).


SunOS 5.9Go To TopLast Changed 14 Sep 1999

 
      
      
Copyright 2002 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.