src/components/rocm_smi/linux-rocm-smi.c
//----------------------------------------------------------------------------
// addScanEvent: Called from rocm_iterator, adds to list in ScanEvents.
//----------------------------------------------------------------------------
Called from rocm_iterator, adds to list in ScanEvents.
Called from rocm_iterator adds to list in ScanEvents .
void addScanEvent(const char* routine, int32_t device, uint64_t variant, uint64_t subvariant)
{
    MakeRoomScanEvents();                                                           
    strncpy(ScanEvents[TotalScanEvents].funcname, routine, scanEventFuncNameLen);   
    ScanEvents[TotalScanEvents].device=device;                                      
    ScanEvents[TotalScanEvents].variant=variant;                                    
    ScanEvents[TotalScanEvents].subvariant=subvariant;                              
    TotalScanEvents++;                                                              
}
void addScanEvent ( const char * routine , int32_t device , uint64_t variant , uint64_t subvariant ) { MakeRoomScanEvents ( ) ; strncpy ( ScanEvents [ TotalScanEvents ] . funcname , routine , scanEventFuncNameLen ) ; ScanEvents [ TotalScanEvents ] . device = device ; ScanEvents [ TotalScanEvents ] . variant = variant ; ScanEvents [ TotalScanEvents ] . subvariant = subvariant ; TotalScanEvents ++ ; }
addScanEvent: Called from rocm_iterator, adds to list in ScanEvents.
addScanEvent : Called from rocm_iterator adds to list in ScanEvents .
// Make room if needed. // Copy name. // Device ID. // variant is typically enum, may be a type. // subvariant is typically a sensor-ID. // Count this one.