PAPI_get_overflow_event_index(3)

πŸ’… PAPI_get_overflow_event_index(3) πŸ’…

okay bestie, welcome to the PAPI manual page for PAPI_get_overflow_event_index(3) β€” yes, the manual name is PAPI, and this function is giving β€œturn the overflow vector into an array of indexes to overflowing events” energy. no cap, let’s get into it 🫢✨

🌸 NAME 🌸

PAPI_get_overflow_event_index β€” converts an overflow vector into an array of indexes to overflowing events πŸŽ€

πŸ¦‹ SYNOPSIS πŸ¦‹

✨ Detailed Description ✨

πŸŽ€ Parameters πŸŽ€

  • EventSet β€” an integer handle to a PAPI event set as created by PAPI_create_eventset πŸ‘‘
  • overflow_vector β€” a vector with bits set for each counter that overflowed. This vector is passed by the system to the overflow handler routine. πŸ’–
  • *array β€” an array of indexes for events in EventSet. No more than *number indexes will be stored into the array. 🌸
  • *number β€” on input the variable determines the size of the array. On output the variable contains the number of indexes in the array. πŸ¦‹

🩷 Return values 🩷

  • PAPI_EINVAL β€” one or more of the arguments is invalid. This could occur if the overflow_vector is empty (zero), if the array or number pointers are NULL, if the value of number is less than one, or if the EventSet is empty. 😭
  • PAPI_ENOEVST β€” the EventSet specified does not exist. πŸ’€

πŸ”₯ Examples πŸ”₯

           void handler(int EventSet, void *address, long_long overflow_vector, void *context){
           int Events[4], number, i;
           int total = 0, retval;
           printf("Overflow #%d\n  Handler(%d) Overflow at %p! vector=%#llx\n",
           total, EventSet, address, overflow_vector);
           total++;
           number = 4;
           retval = PAPI_get_overflow_event_index(EventSet,
           overflow_vector, Events, &number);
           if(retval == PAPI_OK)
           for(i=0; i<number; i++) printf("Event index[%d] = %d", i, Events[i]);}

🌈 See also 🌈

  • PAPI_overflow πŸ’…

πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for PAPI from the source code. 🧚


okay bye bestie πŸ’– β€” this is from PAPI version 7.2.0.0, dated Wed Jun 25 2025, and the footer had that little 19:PAPI_get_overflow_event_index(3) timestamp-ish fragment. slay, periodt. πŸŽ€βœ¨