|
PAPI
5.1.0.2
|
00001 /****************************/ 00002 /* THIS IS OPEN SOURCE CODE */ 00003 /****************************/ 00004 00020 #include "linux-L2unit.h" 00021 00022 /* Declare our vector in advance */ 00023 papi_vector_t _L2unit_vector; 00024 00025 /* prototypes */ 00026 void user_signal_handler_L2UNIT( int hEvtSet, uint64_t address, uint64_t ovfVector, const ucontext_t *pContext ); 00027 00028 /***************************************************************************** 00029 ******************* BEGIN PAPI's COMPONENT REQUIRED FUNCTIONS ************* 00030 *****************************************************************************/ 00031 00032 /* 00033 * This is called whenever a thread is initialized 00034 */ 00035 int 00036 L2UNIT_init_thread( hwd_context_t * ctx ) 00037 { 00038 #ifdef DEBUG_BGQ 00039 printf( "L2UNIT_init_thread\n" ); 00040 #endif 00041 00042 ( void ) ctx; 00043 return PAPI_OK; 00044 } 00045 00046 00047 /* Initialize hardware counters, setup the function vector table 00048 * and get hardware information, this routine is called when the 00049 * PAPI process is initialized (IE PAPI_library_init) 00050 */ 00051 int 00052 L2UNIT_init_component( int cidx ) 00053 { 00054 #ifdef DEBUG_BGQ 00055 printf( "L2UNIT_init_component\n" ); 00056 #endif 00057 00058 _L2unit_vector.cmp_info.CmpIdx = cidx; 00059 #ifdef DEBUG_BGQ 00060 printf( "L2UNIT_init_component cidx = %d\n", cidx ); 00061 #endif 00062 00063 return ( PAPI_OK ); 00064 } 00065 00066 00067 /* 00068 * Control of counters (Reading/Writing/Starting/Stopping/Setup) 00069 * functions 00070 */ 00071 int 00072 L2UNIT_init_control_state( hwd_control_state_t * ptr ) 00073 { 00074 #ifdef DEBUG_BGQ 00075 printf( "L2UNIT_init_control_state\n" ); 00076 #endif 00077 00078 L2UNIT_control_state_t * this_state = ( L2UNIT_control_state_t * ) ptr; 00079 00080 this_state->EventGroup = Bgpm_CreateEventSet(); 00081 CHECK_BGPM_ERROR( this_state->EventGroup, "Bgpm_CreateEventSet" ); 00082 00083 // initialize overflow flag to OFF (0) 00084 this_state->overflow = 0; 00085 this_state->overflow_threshold = 0; 00086 this_state->overflow_EventIndex = 0; 00087 // initialized BGPM eventGroup flag to NOT applied yet (0) 00088 this_state->bgpm_eventset_applied = 0; 00089 00090 return PAPI_OK; 00091 } 00092 00093 00094 /* 00095 * 00096 */ 00097 int 00098 L2UNIT_start( hwd_context_t * ctx, hwd_control_state_t * ptr ) 00099 { 00100 #ifdef DEBUG_BGQ 00101 printf( "L2UNIT_start\n" ); 00102 #endif 00103 ( void ) ctx; 00104 int retval; 00105 L2UNIT_control_state_t * this_state = ( L2UNIT_control_state_t * ) ptr; 00106 00107 retval = Bgpm_Apply( this_state->EventGroup ); 00108 CHECK_BGPM_ERROR( retval, "Bgpm_Apply" ); 00109 00110 // set flag to 1: BGPM eventGroup HAS BEEN applied 00111 this_state->bgpm_eventset_applied = 1; 00112 00113 /* Bgpm_Apply() does an implicit reset; 00114 hence no need to use Bgpm_ResetStart */ 00115 retval = Bgpm_Start( this_state->EventGroup ); 00116 CHECK_BGPM_ERROR( retval, "Bgpm_Start" ); 00117 00118 return ( PAPI_OK ); 00119 } 00120 00121 00122 /* 00123 * 00124 */ 00125 int 00126 L2UNIT_stop( hwd_context_t * ctx, hwd_control_state_t * ptr ) 00127 { 00128 #ifdef DEBUG_BGQ 00129 printf( "L2UNIT_stop\n" ); 00130 #endif 00131 ( void ) ctx; 00132 int retval; 00133 L2UNIT_control_state_t * this_state = ( L2UNIT_control_state_t * ) ptr; 00134 00135 retval = Bgpm_Stop( this_state->EventGroup ); 00136 CHECK_BGPM_ERROR( retval, "Bgpm_Stop" ); 00137 00138 return ( PAPI_OK ); 00139 } 00140 00141 00142 /* 00143 * 00144 */ 00145 int 00146 L2UNIT_read( hwd_context_t * ctx, hwd_control_state_t * ptr, 00147 long_long ** events, int flags ) 00148 { 00149 #ifdef DEBUG_BGQ 00150 printf( "L2UNIT_read\n" ); 00151 #endif 00152 ( void ) ctx; 00153 ( void ) flags; 00154 int i, numEvts; 00155 L2UNIT_control_state_t * this_state = ( L2UNIT_control_state_t * ) ptr; 00156 00157 numEvts = Bgpm_NumEvents( this_state->EventGroup ); 00158 if ( numEvts == 0 ) { 00159 #ifdef DEBUG_BGPM 00160 printf ("Error: ret value is %d for BGPM API function Bgpm_NumEvents.\n", numEvts ); 00161 #endif 00162 //return ( EXIT_FAILURE ); 00163 } 00164 00165 for ( i = 0; i < numEvts; i++ ) 00166 this_state->counters[i] = _common_getEventValue( i, this_state->EventGroup ); 00167 00168 *events = this_state->counters; 00169 00170 return ( PAPI_OK ); 00171 } 00172 00173 00174 /* 00175 * 00176 */ 00177 int 00178 L2UNIT_shutdown_thread( hwd_context_t * ctx ) 00179 { 00180 #ifdef DEBUG_BGQ 00181 printf( "L2UNIT_shutdown_thread\n" ); 00182 #endif 00183 00184 ( void ) ctx; 00185 return ( PAPI_OK ); 00186 } 00187 00188 00189 00190 00191 /* 00192 * user_signal_handler 00193 * 00194 * This function is used when hardware overflows are working or when 00195 * software overflows are forced 00196 */ 00197 void 00198 user_signal_handler_L2UNIT( int hEvtSet, uint64_t address, uint64_t ovfVector, const ucontext_t *pContext ) 00199 { 00200 #ifdef DEBUG_BGQ 00201 printf( "user_signal_handler_L2UNIT\n" ); 00202 #endif 00203 ( void ) address; 00204 int retval; 00205 unsigned i; 00206 int isHardware = 1; 00207 int cidx = _L2unit_vector.cmp_info.CmpIdx; 00208 long_long overflow_bit = 0; 00209 caddr_t address1; 00210 _papi_hwi_context_t ctx; 00211 ctx.ucontext = ( hwd_ucontext_t * ) pContext; 00212 ThreadInfo_t *thread = _papi_hwi_lookup_thread( 0 ); 00213 EventSetInfo_t *ESI; 00214 ESI = thread->running_eventset[cidx]; 00215 // Get the indices of all events which have overflowed. 00216 unsigned ovfIdxs[BGPM_MAX_OVERFLOW_EVENTS]; 00217 unsigned len = BGPM_MAX_OVERFLOW_EVENTS; 00218 00219 retval = Bgpm_GetOverflowEventIndices( hEvtSet, ovfVector, ovfIdxs, &len ); 00220 if ( retval < 0 ) { 00221 #ifdef DEBUG_BGPM 00222 printf ( "Error: ret value is %d for BGPM API function Bgpm_GetOverflowEventIndices.\n", 00223 retval ); 00224 #endif 00225 return; 00226 } 00227 00228 if ( thread == NULL ) { 00229 PAPIERROR( "thread == NULL in user_signal_handler!" ); 00230 return; 00231 } 00232 00233 if ( ESI == NULL ) { 00234 PAPIERROR( "ESI == NULL in user_signal_handler!"); 00235 return; 00236 } 00237 00238 if ( ESI->overflow.flags == 0 ) { 00239 PAPIERROR( "ESI->overflow.flags == 0 in user_signal_handler!"); 00240 return; 00241 } 00242 00243 for ( i = 0; i < len; i++ ) { 00244 uint64_t hProf; 00245 Bgpm_GetEventUser1( hEvtSet, ovfIdxs[i], &hProf ); 00246 if ( hProf ) { 00247 overflow_bit ^= 1 << ovfIdxs[i]; 00248 break; 00249 } 00250 00251 } 00252 00253 if ( ESI->overflow.flags & PAPI_OVERFLOW_FORCE_SW ) { 00254 #ifdef DEBUG_BGQ 00255 printf("OVERFLOW_SOFTWARE\n"); 00256 #endif 00257 address1 = GET_OVERFLOW_ADDRESS( ctx ); 00258 _papi_hwi_dispatch_overflow_signal( ( void * ) &ctx, address1, NULL, 0, 0, &thread, cidx ); 00259 return; 00260 } 00261 else if ( ESI->overflow.flags & PAPI_OVERFLOW_HARDWARE ) { 00262 #ifdef DEBUG_BGQ 00263 printf("OVERFLOW_HARDWARE\n"); 00264 #endif 00265 address1 = GET_OVERFLOW_ADDRESS( ctx ); 00266 _papi_hwi_dispatch_overflow_signal( ( void * ) &ctx, address1, &isHardware, overflow_bit, 0, &thread, cidx ); 00267 } 00268 else { 00269 #ifdef DEBUG_BGQ 00270 printf("OVERFLOW_NONE\n"); 00271 #endif 00272 PAPIERROR( "ESI->overflow.flags is set to something other than PAPI_OVERFLOW_HARDWARE or PAPI_OVERFLOW_FORCE_SW (%x)", thread->running_eventset[cidx]->overflow.flags); 00273 } 00274 } 00275 00276 00277 /* 00278 * Set Overflow 00279 * 00280 * This is commented out in BG/L/P - need to explore and complete... 00281 * However, with true 64-bit counters in BG/Q and all counters for PAPI 00282 * always starting from a true zero (we don't allow write...), the possibility 00283 * for overflow is remote at best... 00284 */ 00285 int 00286 L2UNIT_set_overflow( EventSetInfo_t * ESI, int EventIndex, int threshold ) 00287 { 00288 #ifdef DEBUG_BGQ 00289 printf("BEGIN L2UNIT_set_overflow\n"); 00290 #endif 00291 L2UNIT_control_state_t * this_state = ( L2UNIT_control_state_t * ) ESI->ctl_state; 00292 int retval; 00293 int evt_idx; 00294 00295 /* 00296 * In case an BGPM eventGroup HAS BEEN applied or attached before 00297 * overflow is set, delete the eventGroup and create an new empty one, 00298 * and rebuild as it was prior to deletion 00299 */ 00300 #ifdef DEBUG_BGQ 00301 printf( "L2UNIT_set_overflow: bgpm_eventset_applied = %d\n", 00302 this_state->bgpm_eventset_applied ); 00303 #endif 00304 if ( 1 == this_state->bgpm_eventset_applied ) { 00305 _common_deleteRecreate( &this_state->EventGroup ); 00306 _common_rebuildEventgroup( this_state->count, 00307 this_state->EventGroup_local, 00308 &this_state->EventGroup ); 00309 00310 /* set BGPM eventGroup flag back to NOT applied yet (0) 00311 * because the eventGroup has been recreated from scratch */ 00312 this_state->bgpm_eventset_applied = 0; 00313 } 00314 00315 evt_idx = ESI->EventInfoArray[EventIndex].pos[0]; 00316 SUBDBG( "Hardware counter %d (vs %d) used in overflow, threshold %d\n", 00317 evt_idx, EventIndex, threshold ); 00318 #ifdef DEBUG_BGQ 00319 printf( "Hardware counter %d (vs %d) used in overflow, threshold %d\n", 00320 evt_idx, EventIndex, threshold ); 00321 #endif 00322 /* If this counter isn't set to overflow, it's an error */ 00323 if ( threshold == 0 ) { 00324 /* Remove the signal handler */ 00325 retval = _papi_hwi_stop_signal( _L2unit_vector.cmp_info.hardware_intr_sig ); 00326 if ( retval != PAPI_OK ) 00327 return ( retval ); 00328 } 00329 else { 00330 this_state->overflow = 1; 00331 this_state->overflow_threshold = threshold; 00332 this_state->overflow_EventIndex = evt_idx; 00333 00334 #ifdef DEBUG_BGQ 00335 printf( "L2UNIT_set_overflow: Enable the signal handler\n" ); 00336 #endif 00337 /* Enable the signal handler */ 00338 retval = _papi_hwi_start_signal( _L2unit_vector.cmp_info.hardware_intr_sig, 00339 NEED_CONTEXT, 00340 _L2unit_vector.cmp_info.CmpIdx ); 00341 if ( retval != PAPI_OK ) 00342 return ( retval ); 00343 00344 _common_set_overflow_BGPM( this_state->EventGroup, 00345 this_state->overflow_EventIndex, 00346 this_state->overflow_threshold, 00347 user_signal_handler_L2UNIT ); 00348 } 00349 00350 return ( PAPI_OK ); 00351 } 00352 00353 00354 00355 /* This function sets various options in the component 00356 * The valid codes being passed in are PAPI_SET_DEFDOM, 00357 * PAPI_SET_DOMAIN, PAPI_SETDEFGRN, PAPI_SET_GRANUL * and PAPI_SET_INHERIT 00358 */ 00359 int 00360 L2UNIT_ctl( hwd_context_t * ctx, int code, _papi_int_option_t * option ) 00361 { 00362 #ifdef DEBUG_BGQ 00363 printf( "L2UNIT_ctl\n" ); 00364 #endif 00365 00366 ( void ) ctx; 00367 ( void ) code; 00368 ( void ) option; 00369 return ( PAPI_OK ); 00370 } 00371 00372 00373 /* 00374 * PAPI Cleanup Eventset 00375 * Destroy and re-create the BGPM / L2unit EventSet 00376 */ 00377 int 00378 L2UNIT_cleanup_eventset( hwd_control_state_t * ctrl ) 00379 { 00380 #ifdef DEBUG_BGQ 00381 printf( "L2UNIT_cleanup_eventset\n" ); 00382 #endif 00383 00384 L2UNIT_control_state_t * this_state = ( L2UNIT_control_state_t * ) ctrl; 00385 00386 // create a new empty bgpm eventset 00387 // reason: bgpm doesn't permit to remove events from an eventset; 00388 // hence we delete the old eventset and create a new one 00389 _common_deleteRecreate( &this_state->EventGroup ); 00390 00391 // set overflow flag to OFF (0) 00392 this_state->overflow = 0; 00393 this_state->overflow_threshold = 0; 00394 this_state->overflow_EventIndex = 0; 00395 // set BGPM eventGroup flag back to NOT applied yet (0) 00396 this_state->bgpm_eventset_applied = 0; 00397 00398 return ( PAPI_OK ); 00399 } 00400 00401 00402 /* 00403 * 00404 */ 00405 int 00406 L2UNIT_update_control_state( hwd_control_state_t * ptr, 00407 NativeInfo_t * native, int count, 00408 hwd_context_t * ctx ) 00409 { 00410 #ifdef DEBUG_BGQ 00411 printf( "L2UNIT_update_control_state: count = %d\n", count ); 00412 #endif 00413 00414 ( void ) ctx; 00415 int retval, index, i; 00416 L2UNIT_control_state_t * this_state = ( L2UNIT_control_state_t * ) ptr; 00417 00418 // Delete and re-create BGPM eventset 00419 _common_deleteRecreate( &this_state->EventGroup ); 00420 00421 #ifdef DEBUG_BGQ 00422 printf( "L2UNIT_update_control_state: EventGroup=%d, overflow = %d\n", 00423 this_state->EventGroup, this_state->overflow ); 00424 #endif 00425 00426 00427 // otherwise, add the events to the eventset 00428 for ( i = 0; i < count; i++ ) { 00429 index = ( native[i].ni_event ) + OFFSET; 00430 00431 native[i].ni_position = i; 00432 00433 #ifdef DEBUG_BGQ 00434 printf("L2UNIT_update_control_state: ADD event: i = %d, index = %d\n", i, index ); 00435 #endif 00436 00437 this_state->EventGroup_local[i] = index; 00438 00439 00440 /* Add events to the BGPM eventGroup */ 00441 retval = Bgpm_AddEvent( this_state->EventGroup, index ); 00442 CHECK_BGPM_ERROR( retval, "Bgpm_AddEvent" ); 00443 } 00444 00445 // store how many events we added to an EventSet 00446 this_state->count = count; 00447 00448 // since update_control_state trashes overflow settings, this puts things 00449 // back into balance for BGPM 00450 if ( 1 == this_state->overflow ) { 00451 _common_set_overflow_BGPM( this_state->EventGroup, 00452 this_state->overflow_EventIndex, 00453 this_state->overflow_threshold, 00454 user_signal_handler_L2UNIT ); 00455 } 00456 00457 return ( PAPI_OK ); 00458 } 00459 00460 00461 /* 00462 * This function has to set the bits needed to count different domains 00463 * In particular: PAPI_DOM_USER, PAPI_DOM_KERNEL PAPI_DOM_OTHER 00464 * By default return PAPI_EINVAL if none of those are specified 00465 * and PAPI_OK with success 00466 * PAPI_DOM_USER is only user context is counted 00467 * PAPI_DOM_KERNEL is only the Kernel/OS context is counted 00468 * PAPI_DOM_OTHER is Exception/transient mode (like user TLB misses) 00469 * PAPI_DOM_ALL is all of the domains 00470 */ 00471 int 00472 L2UNIT_set_domain( hwd_control_state_t * cntrl, int domain ) 00473 { 00474 #ifdef DEBUG_BGQ 00475 printf( "L2UNIT_set_domain\n" ); 00476 #endif 00477 int found = 0; 00478 ( void ) cntrl; 00479 00480 if ( PAPI_DOM_USER & domain ) 00481 found = 1; 00482 00483 if ( PAPI_DOM_KERNEL & domain ) 00484 found = 1; 00485 00486 if ( PAPI_DOM_OTHER & domain ) 00487 found = 1; 00488 00489 if ( !found ) 00490 return ( PAPI_EINVAL ); 00491 00492 return ( PAPI_OK ); 00493 } 00494 00495 00496 /* 00497 * 00498 */ 00499 int 00500 L2UNIT_reset( hwd_context_t * ctx, hwd_control_state_t * ptr ) 00501 { 00502 #ifdef DEBUG_BGQ 00503 printf( "L2UNIT_reset\n" ); 00504 #endif 00505 ( void ) ctx; 00506 int retval; 00507 L2UNIT_control_state_t * this_state = ( L2UNIT_control_state_t * ) ptr; 00508 00509 /* we can't simply call Bgpm_Reset() since PAPI doesn't have the 00510 restriction that an EventSet has to be stopped before resetting is 00511 possible. However, BGPM does have this restriction. 00512 Hence we need to stop, reset and start */ 00513 retval = Bgpm_Stop( this_state->EventGroup ); 00514 CHECK_BGPM_ERROR( retval, "Bgpm_Stop" ); 00515 00516 retval = Bgpm_ResetStart( this_state->EventGroup ); 00517 CHECK_BGPM_ERROR( retval, "Bgpm_ResetStart" ); 00518 00519 return ( PAPI_OK ); 00520 } 00521 00522 00523 /* 00524 * Native Event functions 00525 */ 00526 int 00527 L2UNIT_ntv_enum_events( unsigned int *EventCode, int modifier ) 00528 { 00529 #ifdef DEBUG_BGQ 00530 //printf( "L2UNIT_ntv_enum_events, EventCode = %x\n", *EventCode ); 00531 #endif 00532 00533 switch ( modifier ) { 00534 case PAPI_ENUM_FIRST: 00535 *EventCode = 0; 00536 00537 return ( PAPI_OK ); 00538 break; 00539 00540 case PAPI_ENUM_EVENTS: 00541 { 00542 int index = ( *EventCode ) + OFFSET; 00543 00544 if ( index < L2UNIT_MAX_COUNTERS ) { 00545 *EventCode = *EventCode + 1; 00546 return ( PAPI_OK ); 00547 } else 00548 return ( PAPI_ENOEVNT ); 00549 00550 break; 00551 } 00552 default: 00553 return ( PAPI_EINVAL ); 00554 } 00555 return ( PAPI_EINVAL ); 00556 } 00557 00558 00559 /* 00560 * 00561 */ 00562 int 00563 L2UNIT_ntv_name_to_code( char *name, unsigned int *event_code ) 00564 { 00565 #ifdef DEBUG_BGQ 00566 printf( "L2UNIT_ntv_name_to_code\n" ); 00567 #endif 00568 int ret; 00569 00570 /* Return event id matching a given event label string */ 00571 ret = Bgpm_GetEventIdFromLabel ( name ); 00572 00573 if ( ret <= 0 ) { 00574 #ifdef DEBUG_BGPM 00575 printf ("Error: ret value is %d for BGPM API function '%s'.\n", 00576 ret, "Bgpm_GetEventIdFromLabel" ); 00577 #endif 00578 return PAPI_ENOEVNT; 00579 } 00580 else if ( ret < OFFSET || ret > L2UNIT_MAX_COUNTERS ) // not a L2Unit event 00581 return PAPI_ENOEVNT; 00582 else 00583 *event_code = ( ret - OFFSET ); 00584 00585 return PAPI_OK; 00586 } 00587 00588 00589 /* 00590 * 00591 */ 00592 int 00593 L2UNIT_ntv_code_to_name( unsigned int EventCode, char *name, int len ) 00594 { 00595 #ifdef DEBUG_BGQ 00596 //printf( "L2UNIT_ntv_code_to_name\n" ); 00597 #endif 00598 int index; 00599 00600 index = ( EventCode ) + OFFSET; 00601 00602 if ( index >= MAX_COUNTERS ) 00603 return PAPI_ENOEVNT; 00604 00605 strncpy( name, Bgpm_GetEventIdLabel( index ), len ); 00606 00607 if ( name == NULL ) { 00608 #ifdef DEBUG_BGPM 00609 printf ("Error: ret value is NULL for BGPM API function Bgpm_GetEventIdLabel.\n" ); 00610 #endif 00611 return PAPI_ENOEVNT; 00612 } 00613 00614 return ( PAPI_OK ); 00615 } 00616 00617 00618 /* 00619 * 00620 */ 00621 int 00622 L2UNIT_ntv_code_to_descr( unsigned int EventCode, char *name, int len ) 00623 { 00624 #ifdef DEBUG_BGQ 00625 //printf( "L2UNIT_ntv_code_to_descr\n" ); 00626 #endif 00627 int retval, index; 00628 00629 index = ( EventCode ) + OFFSET; 00630 00631 retval = Bgpm_GetLongDesc( index, name, &len ); 00632 CHECK_BGPM_ERROR( retval, "Bgpm_GetLongDesc" ); 00633 00634 return ( PAPI_OK ); 00635 } 00636 00637 00638 /* 00639 * 00640 */ 00641 int 00642 L2UNIT_ntv_code_to_bits( unsigned int EventCode, hwd_register_t * bits ) 00643 { 00644 #ifdef DEBUG_BGQ 00645 printf( "L2UNIT_ntv_code_to_bits\n" ); 00646 #endif 00647 ( void ) EventCode; 00648 ( void ) bits; 00649 return ( PAPI_OK ); 00650 } 00651 00652 00653 /* 00654 * 00655 */ 00656 papi_vector_t _L2unit_vector = { 00657 .cmp_info = { 00658 /* default component information (unspecified values are initialized to 0) */ 00659 .name = "bgpm/L2Unit", 00660 .short_name = "L2Unit", 00661 .description = "Blue Gene/Q L2Unit component", 00662 .num_cntrs = L2UNIT_MAX_COUNTERS, 00663 .num_mpx_cntrs = L2UNIT_MAX_COUNTERS, 00664 .default_domain = PAPI_DOM_USER, 00665 .available_domains = PAPI_DOM_USER | PAPI_DOM_KERNEL, 00666 .default_granularity = PAPI_GRN_THR, 00667 .available_granularities = PAPI_GRN_THR, 00668 00669 .hardware_intr_sig = PAPI_INT_SIGNAL, 00670 .hardware_intr = 1, 00671 00672 .kernel_multiplex = 0, 00673 00674 /* component specific cmp_info initializations */ 00675 .fast_real_timer = 0, 00676 .fast_virtual_timer = 0, 00677 .attach = 0, 00678 .attach_must_ptrace = 0, 00679 } 00680 , 00681 00682 /* sizes of framework-opaque component-private structures */ 00683 .size = { 00684 .context = sizeof ( L2UNIT_context_t ), 00685 .control_state = sizeof ( L2UNIT_control_state_t ), 00686 .reg_value = sizeof ( L2UNIT_register_t ), 00687 .reg_alloc = sizeof ( L2UNIT_reg_alloc_t ), 00688 } 00689 , 00690 /* function pointers in this component */ 00691 .init_thread = L2UNIT_init_thread, 00692 .init_component = L2UNIT_init_component, 00693 .init_control_state = L2UNIT_init_control_state, 00694 .start = L2UNIT_start, 00695 .stop = L2UNIT_stop, 00696 .read = L2UNIT_read, 00697 .shutdown_thread = L2UNIT_shutdown_thread, 00698 .set_overflow = L2UNIT_set_overflow, 00699 .cleanup_eventset = L2UNIT_cleanup_eventset, 00700 .ctl = L2UNIT_ctl, 00701 00702 .update_control_state = L2UNIT_update_control_state, 00703 .set_domain = L2UNIT_set_domain, 00704 .reset = L2UNIT_reset, 00705 00706 .ntv_name_to_code = L2UNIT_ntv_name_to_code, 00707 .ntv_enum_events = L2UNIT_ntv_enum_events, 00708 .ntv_code_to_name = L2UNIT_ntv_code_to_name, 00709 .ntv_code_to_descr = L2UNIT_ntv_code_to_descr, 00710 .ntv_code_to_bits = L2UNIT_ntv_code_to_bits 00711 };