perf script: Add API for filtering via dynamically loaded shared object