Tags: paflib/paflib
Tags
ebb: Fixes for PIC and stack alignment in callback This patches fixes the stack alignment for EBB callback for FPR and vector types and also fixes the TOC creation for PIC builds.
ebb: Fix broken EBB sample period
The current implementation of reset_pmcs() in ebb/ebb-priv.h takes
the stored sample_period (passed by the user) and does the following:
mtspr(PMC<n>, sample_period)
for each PMC, 1-6. Performance monitor interrupts are generated wheni
the value in an enabled PMC transitions to where the most significant
bit becomes '1'. If a user wants to get an event based interrupt, say,
every 1,000,000 cycles, then the PMC should be configured to count the
cycles event and its initial value should be set to 0x80000000 - 1000000.
With an initial value set this way, after 1 million cycles events occur,
the PMC value will transition to the value 0x80000000 and generate an
interrupt. The patch fixes the library code to perform this calculation,
instead of expecting clients of the library to do it (which most would
not know, and it's certainly not documented that it's required).