perf scripting: No need to pass thread twice to the scripting callbacks